157-specific-cert-download.txt 3.6 KB

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