103-multilevel-keys.txt 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. Filename: 103-multilevel-keys.txt
  2. Title: Splitting identity key from regularly used signing key.
  3. Version: $Revision$
  4. Last-Modified: $Date$
  5. Author: Nick Mathewson
  6. Created:
  7. Status: Open
  8. Overview:
  9. This document proposes a change in the way identity keys are used, so that
  10. highly sensitive keys can be password-protected and seldom loaded into RAM.
  11. It presents options; it is not yet a complete proposal.
  12. Proposal:
  13. Replacing a directory authority's identity key in the event of a compromise
  14. would be tremendously annoying. We'd need to tell every client to switch
  15. their configuration, or update to a new version with an uploaded list. So
  16. long as some weren't upgraded, they'd be at risk from whoever had
  17. compromised the key.
  18. With this in mind, it's a shame that our current protocol forces us to
  19. store identity keys unencrypted in RAM. We need some kind of signing key
  20. stored unencrypted, since we need to generate new descriptors/directories
  21. and rotate link and onion keys regularly. (And since, of course, we can't
  22. ask server operators to be on-hand to enter a passphrase every time we
  23. want to rotate keys or sign a descriptor.)
  24. The obvious solution seems to be to have a signing-only key that lives
  25. indefinitely (months or longer) and signs descriptors and link keys, and a
  26. separate identity key that's used to sign the signing key. Tor servers
  27. could run in one of several modes:
  28. 1. Identity key stored encrypted. You need to pick a passphrase when
  29. you enable this mode, and re-enter this passphrase every time you
  30. rotate the signing key.
  31. 1'. Identity key stored separate. You save your identity key to a
  32. floppy, and use the floppy when you need to rotate the signing key.
  33. 2. All keys stored unencrypted. In this case, we might not want to even
  34. *have* a separate signing key. (We'll need to support no-separate-
  35. signing-key mode anyway to keep old servers working.)
  36. 3. All keys stored encrypted. You need to enter a passphrase to start
  37. Tor.
  38. (Of course, we might not want to implement all of these.)
  39. Case 1 is probably most usable and secure, if we assume that people don't
  40. forget their passphrases or lose their floppies. We could mitigate this a
  41. bit by encouraging people to PGP-encrypt their passphrases to themselves,
  42. or keep a cleartext copy of their secret key secret-split into a few
  43. pieces, or something like that.
  44. Migration presents another difficulty, especially with the authorities. If
  45. we use the current set of identity keys as the new identity keys, we're in
  46. the position of having sensitive keys that have been stored on
  47. media-of-dubious-encryption up to now. Also, we need to keep old clients
  48. (who will expect descriptors to be signed by the identity keys they know
  49. and love, and who will not understand signing keys) happy.
  50. A possible solution:
  51. One thing to consider is that router identity keys are not very sensitive:
  52. if an OR disappears and reappears with a new key, the network treats it as
  53. though an old router had disappeared and a new one had joined the network.
  54. The Tor network continues unharmed; this isn't a disaster.
  55. Thus, the ideas above are mostly relevant for authorities.
  56. The most straightforward solution for the authorities is probably to take
  57. advantage of the protocol transition that will come with proposal 101, and
  58. introduce a new set of signing _and_ identity keys used only to sign votes
  59. and consensus network-status documents. Signing and identity keys could be
  60. delivered to users in a separate, rarely changing "keys" document, so that
  61. the consensus network-status documents wouldn't need to include N signing
  62. keys, N identity keys, and N certifications.
  63. Note also that there is no reason that the identity/signing keys used by
  64. directory authorities would necessarily have to be the same as the identity
  65. keys those authorities use in their capacity as routers. Decoupling these
  66. keys would give directory authorities the following set of keys:
  67. Directory authority identity:
  68. Highly confidential; stored encrypted and/or offline. Used to
  69. identity directory authorities. Shipped with clients. Used to
  70. sign Directory authority signing keys.
  71. Directory authority signing key:
  72. Stored online, accessible to regular Tor process. Used to sign
  73. votes and consensus directories. Downloaded as part of a "keys"
  74. document.
  75. [Administrators SHOULD rotate their signing keys every month or
  76. two, just to keep in practice and keep from forgetting the
  77. password to the authority identity.]
  78. V1-V2 directory authority identity:
  79. Stored online, never changed. Used to sign legacy network-status
  80. and directory documents.
  81. Router identity:
  82. Stored online, seldom changed. Used to sign server descriptors
  83. for this authority in its role as a router. Implicitly certified
  84. by being listed in network-status documents.
  85. Onion key, link key:
  86. As in tor-spec.txt
  87. Extensions to Proposal 101.
  88. Add the following elements to vote documents:
  89. "dir-identity-key": The long-term identity key for this authority.
  90. "dir-key-published": The time when this directory's signing key was last
  91. changed.
  92. "dir-key-certification": A signature of the fields "fingerprint",
  93. "dir-key-published", "dir-signing-key", and "dir-identity-key",
  94. concatenated, in that order. The signed material extends from the
  95. beginning of "fingerprint" through the newline after
  96. "dir-key-certification". The identity key is used to generate this
  97. signature.
  98. The elements "fingerprint", "dir-key-published", "dir-signing-key",
  99. "dir-identity-key", and "dir-key-certification" together constitute a
  100. "key certificate". These are generated offline when starting a v3
  101. authority.
  102. The elements "dir-signing-key", "dir-key-published", and
  103. "dir-identity-key", "dir-key-certification" and MUST NOT appear in
  104. consensus documents.
  105. The "fingerprint" field is generated based on the identity key, not
  106. the signing key.
  107. Consensus network statuses change as follows:
  108. Remove dir-signing-key.
  109. Change "directory-signature" to take a fingerprint of the authority's
  110. identity key rather than the authority's nickname.
  111. Add a new document type:
  112. A "keys" document contains all currently known key certification
  113. certificates. All authorities serve it at
  114. http://<hostname>/tor/status/keys.z
  115. Caches and clients download the keys document whenever they receive a
  116. consensus vote that uses a key they do not recognize. Caches download
  117. from authorities; clients download from caches.
  118. Verification:
  119. [XXXX write me]