157-specific-cert-download.txt 3.3 KB

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