157-specific-cert-download.txt 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. Filename: 157-specific-cert-download.txt
  2. Title: Make certificate downloads specific
  3. Version: $Revision$
  4. Last-Modified: $Date$
  5. Author: Nick Mathewson
  6. Created: 2-Dec-2008
  7. Status: Accepted
  8. Target: 0.2.1.x
  9. History:
  10. 2008 Dec 2, 22:34
  11. Changed name of cross certification field to match the other authority
  12. certificate fields.
  13. Status:
  14. Cross-certification is implemented for new certificates, but not yet
  15. required.
  16. Overview:
  17. Tor's directory specification gives two ways to download a certificate:
  18. by its identity fingerprint, or by the digest of its signing key. Both
  19. are error-prone. We propose a new download mechanism to make sure that
  20. clients get the certificates they want.
  21. Motivation:
  22. When a client wants a certificate to verify a consensus, it has two choices
  23. currently:
  24. - Download by identity key fingerprint. In this case, the client risks
  25. getting a certificate for the same authority, but with a different
  26. signing key than the one used to sign the consensus.
  27. - Download by signing key fingerprint. In this case, the client risks
  28. getting a forged certificate that contains the right signing key
  29. signed with the wrong identity key. (Since caches are willing to
  30. cache certs from authorities they do not themselves recognize, the
  31. attacker wouldn't need to compromise an authority's key to do this.)
  32. Current solution:
  33. Clients fetch by identity keys, and re-fetch with backoff if they don't get
  34. certs with the signing key they want.
  35. Proposed solution:
  36. Phase 1: Add a URL type for clients to download certs by identity _and_
  37. signing key fingerprint. Unless both fields match, the client doesn't
  38. accept the certificate(s). Clients begin using this method when their
  39. randomly chosen directory cache supports it.
  40. Phase 1A: Simultaneously, add a cross-certification element to
  41. certificates.
  42. Phase 2: Once many directory caches support phase 1, clients should prefer
  43. to fetch certificates using that protocol when available.
  44. Phase 2A: Once all authorities are generating cross-certified certificates
  45. as in phase 1A, require cross-certification.
  46. Specification additions:
  47. The key certificate whose identity key fingerprint is <F> and whose signing
  48. key fingerprint is <S> should be available at:
  49. http://<hostname>/tor/keys/fp-sk/<F>-<S>.z
  50. As usual, clients may request multiple certificates using:
  51. http://<hostname>/tor/keys/fp-sk/<F1>-<S1>+<F2>-<S2>.z
  52. Clients SHOULD use this format whenever they know both key fingerprints for
  53. a desired certificate.
  54. Certificates SHOULD contain the following field (at most once):
  55. "dir-key-crosscert" NL CrossSignature NL
  56. where CrossSignature is a signature, made using the certificate's signing
  57. key, of the digest of the PKCS1-padded hash of the certificate's identity
  58. key. For backward compatibility with broken versions of the parser, we
  59. wrap the base64-encoded signature in -----BEGIN ID SIGNATURE---- and
  60. -----END ID SIGNATURE----- tags. (See bug 880.) Implementations MUST allow
  61. the "ID " portion to be omitted, however.
  62. When encountering a certificate with a dir-key-crosscert entry,
  63. implementations MUST verify that the signature is a correct signature of
  64. the hash of the identity key using the signing key.
  65. (In a future version of this specification, dir-key-crosscert entries will
  66. be required.)
  67. Why cross-certify too?
  68. Cross-certification protects clients who haven't updated yet, by reducing
  69. the number of caches that are willing to hold and serve bogus certificates.
  70. References:
  71. This is related to part 2 of bug 854.