New sort order for server choice of ciphersuites.
commitbd3db82906a2efcd678b5f4b61fef26c93828777
authorNick Mathewson <nickm@torproject.org>
Mon, 14 Apr 2014 18:10:05 +0000 (14 14:10 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 14 Apr 2014 18:16:49 +0000 (14 14:16 -0400)
tree9dcd77ff5d7de0059741299a7ec3a8c1a8cc0923
parent47f7085de7a496b6bfa79de9e1b22ca4a28b0f27
New sort order for server choice of ciphersuites.

Back in 175b2678, we allowed servers to recognize clients who are
telling them the truth about their ciphersuites, and select the best
cipher from on that list. This implemented the server side of proposal
198.

In bugs 11492, 11498, and 11499, cypherpunks found a bunch of mistakes
and omissions and typos in the UNRESTRICTED_SERVER_CIPHER_LIST we had.
In #11513, I found a couple more.

Rather than try to hand-edit this list, I wrote a short python script
to generate our ciphersuite preferences from the openssl headers.

The new rules are:
  * Require forward secrecy.
  * Require RSA (since our servers only configure RSA keys)
  * Require AES or 3DES. (This means, reject RC4, DES, SEED, CAMELLIA,
    and NULL.)
  * No export ciphersuites.

Then:
  * Prefer AES to 3DES.
  * If both suites have the same cipher, prefer ECDHE to DHE.
  * If both suites have the same DHE group type, prefer GCM to CBC.
  * If both suites have the same cipher mode, prefer SHA384 to SHA256
    to SHA1.
  * If both suites have the same digest, prefer AES256 to AES128.
changes/bug11513 [new file with mode: 0644]
src/common/gen_server_ciphers.py [new file with mode: 0755]
src/common/tortls.c