106-less-tls-constraint.txt 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. Filename: 106-less-tls-constraint.txt
  2. Title: Checking fewer things during TLS handshakes
  3. Version: $Revision$
  4. Last-Modified: $Date$
  5. Author: Nick Mathewson
  6. Created: 9-Feb-2007
  7. Status: Closed
  8. Overview:
  9. This document proposes that we relax our requirements on the context of
  10. X.509 certificates during initial TLS handshakes.
  11. Motivation:
  12. Later, we want to try harder to avoid protocol fingerprinting attacks.
  13. This means that we'll need to make our connection handshake look closer
  14. to a regular HTTPS connection: one certificate on the server side and
  15. zero certificates on the client side. For now, about the best we
  16. can do is to stop requiring things during handshake that we don't
  17. actually use.
  18. What we check now, and where we check it:
  19. tor_tls_check_lifetime:
  20. peer has certificate
  21. notBefore <= now <= notAfter
  22. tor_tls_verify:
  23. peer has at least one certificate
  24. There is at least one certificate in the chain
  25. At least one of the certificates in the chain is not the one used to
  26. negotiate the connection. (The "identity cert".)
  27. The certificate _not_ used to negotiate the connection has signed the
  28. link cert
  29. tor_tls_get_peer_cert_nickname:
  30. peer has a certificate.
  31. certificate has a subjectName.
  32. subjectName has a commonName.
  33. commonName consists only of characters in LEGAL_NICKNAME_CHARACTERS. [2]
  34. tor_tls_peer_has_cert:
  35. peer has a certificate.
  36. connection_or_check_valid_handshake:
  37. tor_tls_peer_has_cert [1]
  38. tor_tls_get_peer_cert_nickname [1]
  39. tor_tls_verify [1]
  40. If nickname in cert is a known, named router, then its identity digest
  41. must be as expected.
  42. If we initiated the connection, then we got the identity digest we
  43. expected.
  44. USEFUL THINGS WE COULD DO:
  45. [1] We could just not force clients to have any certificate at all, let alone
  46. an identity certificate. Internally to the code, we could assign the
  47. identity_digest field of these or_connections to a random number, or even
  48. not add them to the identity_digest->or_conn map.
  49. [so if somebody connects with no certs, we let them. and mark them as
  50. a client and don't treat them as a server. great. -rd]
  51. [2] Instead of using a restricted nickname character set that makes our
  52. commonName structure look unlike typical SSL certificates, we could treat
  53. the nickname as extending from the start of the commonName up to but not
  54. including the first non-nickname character.
  55. Alternatively, we could stop checking commonNames entirely. We don't
  56. actually _do_ anything based on the nickname in the certificate, so
  57. there's really no harm in letting every router have any commonName it
  58. wants.
  59. [this is the better choice -rd]
  60. [agreed. -nm]
  61. REMAINING WAYS TO RECOGNIZE CLIENT->SERVER CONNECTIONS:
  62. Assuming that we removed the above requirements, we could then (in a later
  63. release) have clients not send certificates, and sometimes and started
  64. making our DNs a little less formulaic, client->server OR connections would
  65. still be recognizable by:
  66. having a two-certificate chain sent by the server
  67. using a particular set of ciphersuites
  68. traffic patterns
  69. probing the server later
  70. OTHER IMPLICATIONS:
  71. If we stop verifying the above requirements:
  72. It will be slightly (but only slightly) more common to connect to a non-Tor
  73. server running TLS, and believe that you're talking to a Tor server (until
  74. you send the first cell).
  75. It will be far easier for non-Tor SSL clients to accidentally connect to
  76. Tor servers and speak HTTPS or whatever to them.
  77. If, in a later release, we have clients not send certificates, and we make
  78. DNs less recognizable:
  79. If clients don't send certs, servers don't need to verify them: win!
  80. If we remove these restrictions, it will be easier for people to write
  81. clients to fuzz our protocol: sorta win!
  82. If clients don't send certs, they look slightly less like servers.
  83. OTHER SPEC CHANGES:
  84. When a client doesn't give us an identity, we should never extend any
  85. circuits to it (duh), and we should allow it to set circuit ID however it
  86. wants.