189-authorize-cell.txt 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. Filename: 189-authorize-cell.txt
  2. Title: AUTHORIZE and AUTHORIZED cells
  3. Author: George Kadianakis
  4. Created: 04 Nov 2011
  5. Status: Obsolete
  6. 1. Overview
  7. Proposal 187 introduced the concept of the AUTHORIZE cell, a cell
  8. whose purpose is to make Tor bridges resistant to scanning attacks.
  9. This is achieved by having the bridge and the client share a secret
  10. out-of-band and then use AUTHORIZE cells to validate that the
  11. client indeed knows that secret before proceeding with the Tor
  12. protocol.
  13. This proposal specifies the format of the AUTHORIZE cell and also
  14. introduces the AUTHORIZED cell, a way for bridges to announce to
  15. clients that the authorization process is complete and successful.
  16. 2. Motivation
  17. AUTHORIZE cells should be able to perform a variety of
  18. authorization protocols based on a variety of shared secrets. This
  19. forces the AUTHORIZE cell to have a dynamic format based on the
  20. authorization method used.
  21. AUTHORIZED cells are used by bridges to signal the end of a
  22. successful bridge client authorization and the beginning of the
  23. actual link handshake. AUTHORIZED cells have no other use and for
  24. this reason their format is very simple.
  25. Both AUTHORIZE and AUTHORIZED cells are to be used under censorship
  26. conditions and they should look innocuous to any adversary capable
  27. of monitoring network traffic.
  28. As an attack example, an adversary could passively monitor the
  29. traffic of a bridge host, looking at the packets directly after the
  30. TLS handshake and trying to deduce from their packet size if they
  31. are AUTHORIZE and AUTHORIZED cells. For this reason, AUTHORIZE and
  32. AUTHORIZED cells are padded with a random amount of padding before
  33. sending.
  34. 3. Design
  35. 3.1. AUTHORIZE cell
  36. The AUTHORIZE cell is a variable-sized cell.
  37. The generic AUTHORIZE cell format is:
  38. AuthMethod [1 octet]
  39. MethodFields [...]
  40. PadLen [2 octets]
  41. Padding ['PadLen' octets]
  42. where:
  43. 'AuthMethod', is the authorization method to be used.
  44. 'MethodFields', is dependent on the authorization Method used. It's
  45. a meta-field hosting an arbitrary amount of fields.
  46. 'PadLen', specifies the amount of padding in octets.
  47. Implementations SHOULD pick 'PadLen' to be a random integer from 1
  48. to 3141 inclusive.
  49. 'Padding', is 'PadLen' octets of random content.
  50. 3.2. AUTHORIZED cell format
  51. The AUTHORIZED cell is a variable-sized cell.
  52. The AUTHORIZED cell format is:
  53. 'AuthMethod' [1 octet]
  54. 'PadLen' [2 octets]
  55. 'Padding' ['PadLen' octets]
  56. where all fields have the same meaning as in section 3.1.
  57. 3.3. Cell parsing
  58. Implementations MUST ignore the contents of 'Padding'.
  59. Implementations MUST reject an AUTHORIZE or AUTHORIZED cell where
  60. the 'Padding' field is not 'PadLen' octets long.
  61. Implementations MUST reject an AUTHORIZE cell with an 'AuthMethod'
  62. they don't recognize.
  63. 4. Discussion
  64. 4.1. What's up with the [1,3141] padding bytes range?
  65. The upper limit is larger than the Ethernet MTU so that AUTHORIZE
  66. and AUTHORIZED cells are not always transmitted into a single
  67. packet. Other than that, it's indeed pretty much arbitrary.
  68. 4.2. Why not let the pluggable transports do the padding, like they
  69. are supposed to do for the rest of the Tor protocol?
  70. The arguments of section "Alternative design: Just use pluggable
  71. transports" of proposal 187, apply here as well:
  72. All bridges who use client authorization will also need padded
  73. AUTHORIZE and AUTHORIZED cells.
  74. 4.3. How should multiple round-trip authorization protocols be handled?
  75. Protocols that require multiple round trips between the client and
  76. the bridge should use AUTHORIZE cells for communication.
  77. The format of the AUTHORIZE cell is flexible enough to support
  78. messages from the client to the bridge and the reverse.
  79. At the end of a successful multiple-round-trip protocol, an
  80. AUTHORIZED cell must be issued from the bridge to the client.
  81. 4.4. AUTHORIZED seems useless. Why not use VPADDING instead?
  82. As noted in proposal 187, the Tor protocol uses VPADDING cells for
  83. padding; any other use of VPADDING makes the Tor protocol kludgy.
  84. In the future, and in the example case of a v3 handshake, a client
  85. can optimistically send a VERSIONS cell along with the final
  86. AUTHORIZE cell of an authorization protocol. That allows the
  87. bridge, in the case of successful authorization, to also process
  88. the VERSIONS cell and begin the v3 handshake promptly.
  89. 4.5. What should actually happen when a bridge rejects an AUTHORIZE
  90. cell?
  91. When a bridge detects a badly formed or malicious AUTHORIZE cell,
  92. it should assume that the other side is an adversary scanning for
  93. bridges. The bridge should then act accordingly to avoid detection.
  94. This proposal does not try to specify how a bridge can avoid
  95. detection by an adversary.