157-specific-cert-download.txt 3.6 KB

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