rendezvous.txt 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. How to make rendezvous points work
  2. 1-11Jun2003
  3. 1. Overview
  4. This document provides a design overview for rendezvous points, as
  5. discussed by Nick and Roger after Discex.
  6. Rendezvous points are an implementation of server anonymity /
  7. location-hidden servers in the onion routing network. There are
  8. three components needed for rendezvous points:
  9. A) A means for the client ("Alice") to tell a server ("Bob") where
  10. to contact her in order to establish a connection. (Notification)
  11. B) A means for Bob to contact Alice to actually establish the
  12. connection, and for them to communicate later. (Meeting)
  13. C) Necessary glue code so that Alice can view webpages on a
  14. location-hidden webserver, and Bob can run a location-hidden
  15. server with minimal invasive changes. (Application)
  16. We'll tackle these in order. In all cases, I'll assume that both
  17. Alice and Bob have local OPs.
  18. 2. Notification service
  19. Bob wants to learn about client requests for communication, but
  20. wants to avoid responding unnecessarily to unauthorized clients.
  21. Bob's proxy opens a circuit, and tells some onion router on that
  22. circuit to expect incoming connections, and notify Bob of them.
  23. When establishing such a notification point, Bob provides the onion
  24. router with a public "notification" key. The hash of this public
  25. key uniquely identifies Bob, and prevents anybody else from
  26. usurping Bob's notification point in the future. Additionally, Bob
  27. can use the same public key to establish a notification point on
  28. another OR, and Alice can still be confident that Bob is the same
  29. server.
  30. (The set-up-a-notification-point command should come via a
  31. RELAY_BIND_NOTIFICATION cell. This cell creates a new stream on the
  32. circuit from Bob to the notification point.)
  33. ORs that support notification run a notification service on a
  34. separate port. When Alice wants to notify Bob of a meeting point,
  35. she connects (directly or via Tor) to the notification port, and
  36. sends the following:
  37. MEETING REQUEST
  38. Encrypted with server's public key:
  39. Hash of Bob's public key (identifies which Bob to notify)
  40. Initial authentication [optional]
  41. Encrypted with Bob's public key:
  42. Meeting point
  43. Meeting cookie
  44. End-to-end forward key
  45. End-to-end backward key
  46. End-to-end authentication [optional]
  47. [Add a Nonce or some kind of replay prevention mechanism? -NM]
  48. [Should this use DH instead? -NM]
  49. The meeting point and meeting cookie allow Bob to contact Alice and
  50. prove his identity; the end-to-end authentication enables Bob to
  51. decide whether to talk to Alice; the initial authentication enables
  52. the meeting point to pre-screen notification requests before
  53. sending them to Bob. (See 3 for a discussion of meeting points;
  54. see 2.1 for a proposed authentication mechanism.)
  55. When the notification point receives a valid meeting request, it
  56. sends the portion encrypted with Bob's public key along the stream
  57. created by Bob's RELAY_BIND_NOTIFICATION. Bob then, at his
  58. discretion, connects to Alice's meeting point.
  59. 2.1. Proposed authentication for notification services
  60. Bob makes two short-term secrets SB and SN, and tells the
  61. notification point about SN. Bob gives Alice a cookie consisting
  62. of A,B,C such that H(A|SB)=B and H(A|SN)=C. Alice's initial
  63. authentication is <A,C>; Alice's end-to-end authentication is <A,B>.
  64. [Maybe] Bob keeps a replay cache of A values, and doesn't allow any
  65. value to be used twice. Over time, Bob rotates SB and SN.
  66. [Maybe] Each 'A' has an expiration time built in to it.
  67. 3. Meeting points
  68. For Bob to actually reply to Alice, Alice first establishes a
  69. circuit to an onion router R, and sends a RELAY_BIND_MEETING cell
  70. to that onion router. The RELAY_BIND_MEETING cell contains a
  71. 'Meeting cookie' (MC) that Bob can use to authenticate to R. R
  72. remembers the cookie and associates it with Alice.
  73. Later, Bob also routes to R and sends R a RELAY_JOIN_MEETING cell
  74. with the meeting cookie MC. After this point, R routes all traffic
  75. from Bob's circuit or Alice's circuit as if the two circuits were
  76. joined: any RELAY cells that are not for a recognized topic are
  77. passed down Alice or Bob's circuit.
  78. To prevent R from reading their traffic, Alice and Bob use the two
  79. end-to-end keys in Alice's original notification to Bob: Bob uses
  80. the 'forward' key and Alice the 'backward' key. (These keys are
  81. used in addition to the series of encryption keys already in use on
  82. Alice and Bob's circuits.)
  83. Bob's OP accepts RELAY_BEGIN, RELAY_DATA, RELAY_END, and
  84. RELAY_SENDME cells from Alice. Alice's OP accepts RELAY_DATA,
  85. RELAY_END, and RELAY_SENDME cells from Bob. All RELAY_BEGIN cells
  86. to Bob must have target IP and port of zero; Bob's OP will redirect
  87. them to the actual target IP and port of Bob's server.
  88. Alice and Bob's OPs disallow CREATE or RELAY_EXTEND cells as usual.
  89. 4. Application interface
  90. 4.1. Application interface: client side
  91. Because we require that the client interface remain a SOCKS proxy,
  92. we can't have clients explicitly connect to Bob. Instead, we have
  93. the OP map DNS addresses used by the client to the
  94. <Notification point, Bob's PK, Authentication>
  95. tuples needed to establish a connection to Bob.
  96. [We had earlier hoped encode this information into the DNS address,
  97. but that won't work. The data needed will be at least ~1024 bits
  98. long (for Bob's public key). You'd need over 197 characters to
  99. encode a blob that long, and you'd wind up triggering pathological
  100. cases in a lot of client code. -NM]
  101. I propose that the client OP receive this mapping information
  102. outside of the Tor protocol: either from true out-of-band entry, or
  103. from protocol-specific transmission.
  104. (For example of protocol-specific, an HTTP server could include
  105. notification information in reply headers, or cookies, or
  106. something.)