157-specific-cert-download.txt 3.5 KB

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