xxx-bridge-disbursement.txt 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. How to hand out bridges.
  2. Divide bridges into 'strategies' as they come in. Do this uniformly
  3. at random for now.
  4. For each strategy, we'll hand out bridges in a different way to
  5. clients. This document describes two strategies: email-based and
  6. IP-based.
  7. 0. Notation:
  8. HMAC(k,v) : an HMAC of v using the key k.
  9. A|B: The string A concatenated with the string B.
  10. 1. Email-based.
  11. Goal: bootstrap based on one or more popular email service's sybil
  12. prevention algorithms.
  13. Parameters:
  14. HMAC -- an HMAC function
  15. P -- a time period
  16. K -- the number of bridges to send in a period.
  17. Setup: Generate two nonces, N and M.
  18. As bridges arrive, put them into a ring according to HMAC(N,ID)
  19. where ID is the bridges's identity digest.
  20. Divide time into divisions of length P.
  21. When we get an email:
  22. If it's not from a supported email service, reject it.
  23. If we already sent a response to that email address (normalized)
  24. in this period, send _exactly_ the same response.
  25. If it is from a supported service, generate X = HMAC(M,PS|E) where E
  26. is the lowercased normalized email address for the user, and
  27. where PS is the start of the currrent period. Send
  28. the first K bridges in the ring after point X.
  29. To normalize an email address:
  30. Start with the RFC822 address. Consider only the mailbox {???}
  31. portion of the address (username@host). Put this into lowercase
  32. ascii.
  33. Questions:
  34. What to do with weird character encodings? Look up the RFC.
  35. Notes:
  36. Make sure that you can't force a single email address to appear
  37. in lots of different ways. IOW, if nickm@freehaven.net and
  38. NICKM@freehaven.net aren't treated the same, then I can get lots
  39. more bridges than I should.
  40. Make sure you can't construct a distinct address to match an
  41. existing one. IOW, if we treat nickm@X and nickm@Y as the same
  42. user, then anybody can register nickm@Z and use it to tell which
  43. bridges nickm@X got (or would get).
  44. Make sure that we actually check headers so we can't be trivially
  45. used to sapam people.
  46. 2. IP-based.
  47. Goal: avoid handing out all the bridges to users in a similar IP
  48. space and time.
  49. Parameters:
  50. T_Flush -- how long it should take a user on a single network to
  51. see a whole cluster of bridges.
  52. N_C
  53. K -- the number of bridges we hand out in response to a single
  54. request.
  55. Setup: using an AS map or a geoip map or some other flawed input
  56. source, divide IP space into "areas" such that surveying a large
  57. collection of "areas" is hard. For v0, use /24 adress blocks.
  58. Group areas into N_C clusters.
  59. Generate nonces L, M, N.
  60. Set the period P such that P*(bridges-per-cluster/K) = T_flush.
  61. Don't set P to greater than a week, or less than three hours.
  62. When we get a bridge:
  63. Based on HMAC(L,ID), assign the bridge to a cluster. Within each
  64. cluster, keep the bridges in a ring based on HMAC(M,ID).
  65. When we get a connection:
  66. If it's http, redirect it to https.
  67. Let net be the incoming IP network. Let PS be the current
  68. period. Compute X = HMAC(N, PS|net). Return the next K bridges
  69. in the ring after X.
  70. 3. Open issues
  71. Denial of service attacks
  72. A good view of network topology