TODO 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. Obvious things I'd like to do that won't break anything:
  2. * Abstract out crypto calls, with the eventual goal of moving
  3. from openssl to something with a more flexible license.
  4. * Test suite. We need one.
  5. * Switch the "return -1" cases that really mean "you've got a bug"
  6. into calls to assert().
  7. * Since my OR can handle multiple circuits through a given OP,
  8. I think it's clear that the OP should pass new create cells through the
  9. same channel. Thus we can take advantage of the padding we're already
  10. getting. Does that mean the choose_onion functions should be changed
  11. to always pick a favorite OR first, so the OP can minimize the number
  12. of outgoing connections it must sustain?
  13. * Rewrite the OP to be non-blocking single-process.
  14. * Add autoconf support.
  15. Figure out what .h files we're actually using, and how portable
  16. those are.
  17. * Since we're using a stream cipher, an adversary's cell arriving with the
  18. same aci will forever trash our circuit. Since each side picks half
  19. the aci, for each cell the adversary has a 1/256 chance of trashing a
  20. circuit. This is really nasty. We want to make ACIs something reasonably
  21. hard to collide with, such as 20 bytes.
  22. While we're at it, I'd like more than 4 bits for Version. :)
  23. * Exit policies. Since we don't really know what protocol is being spoken,
  24. it really comes down to an IP range and port range that we
  25. allow/disallow. The 'application' connection can evaluate it and make
  26. a decision.
  27. * We currently block on gethostbyname in OR. This is poor. The complex
  28. solution is to have a separate process that we talk to. There are some
  29. free software versions we can use, but they'll still be tricky. The
  30. better answer is to realize that the OP can do the resolution and
  31. simply hand the OR an IP directly.
  32. A) This prevents us from doing sneaky things like having the name resolve
  33. differently at the OR than at the OP. I'm ok with that.
  34. B) It actually just shunts the "dns lookups block" problem back onto the
  35. OP. But that's ok too, because the OP doesn't have to be as robust.
  36. (Heck, can we have the application proxy resolve it, even?)
  37. * I'd like a cleaner interface for the configuration files, keys, etc.
  38. Perhaps the next step is a central repository where we download router
  39. lists? Something that takes the human more out of the loop.
  40. We should look into a 'topology communication protocol'; there's one
  41. mentioned in the spec that Paul has, but I haven't looked at it to
  42. know how complete it is or how well it would work. This would also
  43. allow us to add new ORs on the fly. Directory servers, a la the ones
  44. we're developing for Mixminion (see http://mixminion.net/), are also
  45. a very nice approach to consider.
  46. * Should ORs rotate their link keys periodically?
  47. * We probably want OAEP padding for RSA.
  48. * The parts of the code that say 'FIXME'
  49. Non-obvious things I'd like to do:
  50. (Many of these topics are inter-related. It's clear that we need more
  51. analysis before we can guess which approaches are good.)
  52. * Padding between ORs, and correct padding between OPs. The ORs currently
  53. send no padding cells between each other. Currently the OP seems to
  54. send padding at a steady rate, but data cells can come more quickly
  55. than that. This doesn't provide much protection at all. I'd like to
  56. investigate a synchronous mixing approach, where cells are sent at fixed
  57. intervals. We need to investigate the effects of this on DoS resistance
  58. -- what do we do when we have too many packets? One approach is to
  59. do traffic shaping rather than traffic padding -- we gain a bit more
  60. resistance to DoS at the expense of some anonymity. Can we compare this
  61. analysis to that of the Cottrell Mix, and learn something new? We'll
  62. need to decide on exactly how the traffic shaping algorithm works.
  63. * Make the connection buf's grow dynamically as needed. This won't
  64. really solve the fundamental problem above, though, that a buffer
  65. can be given an adversary-controlled number of cells.
  66. * I'd like to add a scheduler of some sort. Currently we only need one
  67. for sending out padding cells, and if these events are periodic and
  68. synchronized, we don't yet need a scheduler per se, but rather we just
  69. need to have poll return every so often and avoid sending cells onto
  70. the sockets except at the appointed time. We're nearly ready to do
  71. that as it is, with the separation of write_to_buf() and flush_buf().
  72. Edge case: what do we do with circuits that receive a destroy
  73. cell before all data has been sent out? Currently there's only one
  74. (outgoing) buffer per connection, so since it's crypted, a circuit
  75. can't recognize its own packet once it's been queued. We could mark
  76. the circuits for destruction, and go through and cull them once the
  77. buffer is entirely flushed; but with the synchronous approach above,
  78. the buffer may never become empty. Perhaps I should implement a callback
  79. system, so a function can get called when a particular cell gets sent
  80. out. That sounds very flexible, but might also be overkill.
  81. * Currently when a connection goes down, it generates a destroy cell
  82. (either in both directions or just the appropriate one). When a
  83. destroy cell arrives to an OR (and it gets read after all previous
  84. cells have arrived), it delivers a destroy cell for the "other side"
  85. of the circuit: if the other side is an OP or APP, it closes the entire
  86. connection as well.
  87. But by "a connection going down", I mean "I read eof from it". Yet
  88. reading an eof simply means that it promises not to send any more
  89. data. It may still be perfectly fine receiving data (read "man 2
  90. shutdown"). In fact, some webservers work that way -- the client sends
  91. his entire request, and when the webserver reads an eof it begins
  92. its response. We currently don't support that sort of protocol; we
  93. may want to switch to some sort of a two-way-destry-ripple technique
  94. (where a destroy makes its way all the way to the end of the circuit
  95. before being echoed back, and data stops flowing only when a destroy
  96. has been received from both sides of the circuit); this extends the
  97. one-hop-ack approach that Matej used.
  98. * Reply onions. Hrm.