boringssl/crypto/cipher
David Benjamin ea72bd0b60 Implement all TLS ciphers with stateful AEADs.
The EVP_CIPHER codepath should no longer be used with TLS. It still exists for
DTLS and SSLv3. The AEAD construction in TLS does not allow for
variable-overhead AEADs, so stateful AEADs do not include the length in the ad
parameter. Rather the AEADs internally append the unpadded length once it is
known. EVP_aead_rc4_md5_tls is modified to account for this.

Tests are added (and RC4-MD5's regenerated) for each of the new AEADs. The
cipher tests are all moved into crypto/cipher/test because there's now a lot of
them and they clutter the directory listing.

In ssl/, the stateful AEAD logic is also modified to account for stateful AEADs
with a fixed IV component, and for AEADs which use a random nonce (for the
explicit-IV CBC mode ciphers).

The new implementation fixes a bug/quirk in stateless CBC mode ciphers where
the fixed IV portion of the keyblock was generated regardless. This is at the
end, so it's only relevant for EAP-TLS which generates a MSK from the end of
the key block.

Change-Id: I2d8b8aa11deb43bde2fd733f4f90b5d5b8cb1334
Reviewed-on: https://boringssl-review.googlesource.com/2692
Reviewed-by: Adam Langley <agl@google.com>
2015-01-14 20:30:26 +00:00
..
test Implement all TLS ciphers with stateful AEADs. 2015-01-14 20:30:26 +00:00
aead_test.c Implement all TLS ciphers with stateful AEADs. 2015-01-14 20:30:26 +00:00
aead.c AEAD interface. 2014-06-20 13:17:34 -07:00
cipher_error.c Implement all TLS ciphers with stateful AEADs. 2015-01-14 20:30:26 +00:00
cipher_test.c Add a CRYPTO_library_init and static-initializer-less build option. 2014-09-12 00:10:53 +00:00
cipher.c Don't include strings.h because of Windows. 2014-09-29 17:57:38 -07:00
CMakeLists.txt Implement all TLS ciphers with stateful AEADs. 2015-01-14 20:30:26 +00:00
derive_key.c Inital import. 2014-06-20 13:17:32 -07:00
e_aes.c s/comparision/comparison/. 2015-01-06 10:49:48 -08:00
e_chacha20poly1305.c Convert all zero-argument functions to '(void)' 2014-08-21 01:06:07 +00:00
e_des.c Inital import. 2014-06-20 13:17:32 -07:00
e_null.c Inital import. 2014-06-20 13:17:32 -07:00
e_rc2.c Shush some dead assignments. 2014-11-06 01:34:33 +00:00
e_rc4.c Implement all TLS ciphers with stateful AEADs. 2015-01-14 20:30:26 +00:00
e_tls.c Implement all TLS ciphers with stateful AEADs. 2015-01-14 20:30:26 +00:00
internal.h Replicate s3_cbc.c under crypto/cipher/internal.h. 2015-01-14 19:48:35 +00:00
tls_cbc.c Implement all TLS ciphers with stateful AEADs. 2015-01-14 20:30:26 +00:00