Note another place we use sha1
[tor/rransom.git] / doc / spec / proposals / ideas / xxx-what-uses-sha1.txt
blob00ea56bc3a895aaa5072e6972a1dd776ecbbae23
1 Filename: xxx-what-uses-sha1.txt
2 Title: Where does Tor use SHA-1 today?
3 Version: $Revision$
4 Last-Modified: $Date$
5 Author: Nick Mathewson
6 Created: 30-Dec-2008
7 Status: Meta
10 Introduction:
12    Tor uses SHA-1 as a message digest. SHA-1 is showing its age:
13    theoretical attacks for finding collisions against it get better
14    every year or two, and it will likely be broken in practice before
15    too long.
17    According to smart crypto people, the SHA-2 functions (SHA-256, etc)
18    share too much of SHA-1's structure to be very good.  Some people
19    like other hash functions; most of these have not seen enough
20    analysis to be widely regarded as an extra-good idea.
22    By 2012, the NIST SHA-3 competition will be done, and with luck we'll
23    have something good to switch too.  But it's probably a bad idea to
24    wait until 2012 to figure out _how_ to migrate to a new hash
25    function, for two reasons:
26          1) It's not inconceivable we'll want to migrate in a hurry
27             some time before then.
28          2) It's likely that migrating to a new hash function will
29             require protocol changes, and it's easiest to make protocol
30             changes backward compatible if we lay the groundwork in
31             advance.  It would suck to have to break compatibility with
32             a big hard-to-test "flag day" protocol change.
34    This document attempts to list everything Tor uses SHA-1 for today.
35    This is the first step in getting all the design work done to switch
36    to something else.
38    This document SHOULD NOT be a clearinghouse of what to do about our
39    use of SHA-1.  That's better left for other individual proposals.
42 Why now?
44    The recent publication of "MD5 considered harmful today: Creating a
45    rogue CA certificate" by Alexander Sotirov, Marc Stevens, Jacob
46    Appelbaum, Arjen Lenstra, David Molnar, Dag Arne Osvik, and Benne de
47    Weger has reminded me that:
49        * You can't rely on theoretical attacks to stay theoretical.
50        * It's quite unpleasant when theoretical attacks become practical
51          and public on days you were planning to leave for vacation.
52        * Broken hash functions (which SHA-1 is not quite yet AFAIU)
53          should be dropped like hot potatoes.  Failure to do so can make
54          one look silly.
58 What Tor uses hashes for today:
60 1. Infrastructure.
62    A. Our X.509 certificates are signed with SHA-1.
63    B. TLS uses SHA-1 (and MD5) internally to generate keys.
64    C. Some of the TLS ciphersuites we allow use SHA-1.
65    D. When we sign our code with GPG, it might be using SHA-1.
66    E. Our GPG keys might be authenticated with SHA-1.
67    F. OpenSSL's random number generator uses SHA-1, I believe.
69 2. The Tor protocol
71    A. Everything we sign, we sign using SHA-1-based OAEP-MGF1.
72    B. Our CREATE cell format uses SHA-1 for: OAEP padding.
73    C. Our EXTEND cells use SHA-1 to hash the identity key of the
74       target server.
75    D. Our CREATED cells use SHA-1 to hash the derived key data.
76    E. The data we use in CREATE_FAST cells to generate a key is the
77       length of a SHA-1.
78    F. The data we send back in a CREATED/CREATED_FAST cell is the length
79       of a SHA-1.
80    G. We use SHA-1 to derive our circuit keys from the negotiated g^xy value.
81    H. We use SHA-1 to derive the digest field of each RELAY cell, but that's
82       used more as a checksum than as a strong digest.
84 3. Directory services
86    A. All signatures are generated on the SHA-1 of their corresponding
87       documents, using PKCS1 padding.
88    B. Router descriptors identify their corresponding extra-info documents
89       by their SHA-1 digest.
90    C. Fingerprints in router descriptors are taken using SHA-1.
91    D. Fingerprints in authority certs are taken using SHA-1.
92    E. Fingerprints in dir-source lines of votes and consensuses are taken
93       using SHA-1.
94    F. Networkstatuses refer to routers identity keys and descriptors by their
95       SHA-1 digests.
96    G. Directory-signature lines identify which key is doing the signing by
97       the SHA-1 digests of the authority's signing key and its identity key.
98    H. The following items are downloaded by the SHA-1 of their contents:
99       XXXX list them
100    I. The following items are downloaded by the SHA-1 of an identity key:
101       XXXX list them too.
103 4. The rendezvous protocol
105    XXXX write me
107 5. The bridge protocol
109    XXXX write me
111 6. The Tor user interface
113    A. We log information about servers based on SHA-1 hashes of their
114       identity keys.
115    B. The controller identifies servers based on SHA-1 hashes of their
116       identity keys.
117    C. Nearly all of our configuration options that list servers allow SHA-1
118       hashes of their identity keys.
119    E. The deprecated .exit notation uses SHA-1 hashes of identity keys