boringssl/crypto
David Benjamin 31a07798a5 Factor SSL_AEAD_CTX into a dedicated type.
tls1_enc is now SSL_AEAD_CTX_{open,seal}. This starts tidying up a bit
of the record-layer logic. This removes rr->input, as encrypting and
decrypting records no longer refers to various globals. It also removes
wrec altogether. SSL3_RECORD is now only used to maintain state about
the current incoming record. Outgoing records go straight to the write
buffer.

This also removes the outgoing alignment memcpy and simply calls
SSL_AEAD_CTX_seal with the parameters as appropriate. From bssl speed
tests, this seems to be faster on non-ARM and a bit of a wash on ARM.

Later it may be worth recasting these open/seal functions to write into
a CBB (tweaked so it can be malloc-averse), but for now they take an
out/out_len/max_out trio like their EVP_AEAD counterparts.

BUG=468889

Change-Id: Ie9266a818cc053f695d35ef611fd74c5d4def6c3
Reviewed-on: https://boringssl-review.googlesource.com/4792
Reviewed-by: Adam Langley <agl@google.com>
2015-05-21 17:59:15 +00:00
..
aes Don't use .arch in aarch64 asm with Clang. 2015-05-05 00:28:03 +00:00
asn1 Convert reference counts in crypto/ 2015-05-20 19:15:26 +00:00
base64 Convert base64_test to C++. 2015-04-01 19:54:13 +00:00
bio Convert reference counts in crypto/ 2015-05-20 19:15:26 +00:00
bn Always include x86_64-gcc.c in the standalone build. 2015-05-15 22:37:49 +00:00
buf Precompute sorted array for error strings. 2015-02-09 17:35:31 -08:00
bytestring Remove unnecessary NULL checks, part 1. 2015-05-04 23:05:17 +00:00
chacha Switch nonce type in chacha_vec.c to uint32_t. 2015-02-13 13:16:59 -08:00
cipher Port cipher_test to file_test. 2015-05-13 17:00:55 +00:00
cmac Add support for CMAC (RFC 4493). 2015-05-07 21:13:41 +00:00
conf Add NCONF_load_bio. 2015-04-06 16:58:45 -07:00
des Implement |DES_ede2_cbc_encrypt|. 2015-05-20 18:36:01 +00:00
dh Convert reference counts in crypto/ 2015-05-20 19:15:26 +00:00
digest Replace MD5 in examples with SHA-256. 2015-04-13 20:55:48 +00:00
dsa Convert reference counts in crypto/ 2015-05-20 19:15:26 +00:00
ec Convert reference counts in crypto/ 2015-05-20 19:15:26 +00:00
ecdh Add in missing curly braces part 2. 2015-02-11 23:14:04 +00:00
ecdsa Remove unnecessary NULL checks, part 3. 2015-05-04 23:12:04 +00:00
engine Precompute sorted array for error strings. 2015-02-09 17:35:31 -08:00
err Factor SSL_AEAD_CTX into a dedicated type. 2015-05-21 17:59:15 +00:00
evp Convert reference counts in crypto/ 2015-05-20 19:15:26 +00:00
hkdf Rename BIO_print_errors_fp back to ERR_print_errors_fp & refactor it. 2015-04-13 20:23:29 +00:00
hmac Add evp_test, loosely based on upstream's version. 2015-05-11 21:44:36 +00:00
lhash Remove more bits of ERR_STRING_DATA. 2015-02-10 02:10:46 +00:00
md4 Eliminate unnecessary includes from low-level crypto modules. 2015-04-13 20:49:18 +00:00
md5 Remove explicit .hiddens from x86_64 perlasm files. 2015-02-25 21:26:16 +00:00
modes Fix invalid assert in CRYPTO_ctr128_encrypt. 2015-05-12 19:26:53 +00:00
obj Remove unnecessary NULL checks, part 4. 2015-05-04 23:13:12 +00:00
pem Eliminate unnecessary includes from low-level crypto modules. 2015-04-13 20:49:18 +00:00
perlasm Add assembly support for 32-bit iOS. 2015-05-04 22:44:24 +00:00
pkcs8 Convert pkcs12_test to C++. 2015-05-11 18:51:13 +00:00
poly1305 Fix ARM Clang build. 2015-05-05 00:24:59 +00:00
rand Don't use uninitialized memory in RAND_bytes. 2015-05-15 20:31:27 +00:00
rc4 Mind the end of the buffer in aligned case of generic RC4 implementation. 2015-05-12 19:31:09 +00:00
rsa Convert reference counts in crypto/ 2015-05-20 19:15:26 +00:00
sha Add assembly support for 32-bit iOS. 2015-05-04 22:44:24 +00:00
stack Remove unnecessary NULL checks, part 4. 2015-05-04 23:13:12 +00:00
test Port cipher_test to file_test. 2015-05-13 17:00:55 +00:00
x509 Remove last references to named locks. 2015-05-20 19:18:30 +00:00
x509v3 Remove remaining calls to the old lock functions. 2015-05-20 19:18:13 +00:00
arm_arch.h aarch64 support. 2015-01-14 23:38:11 +00:00
CMakeLists.txt Add infrastructure for reference counts. 2015-05-20 19:14:59 +00:00
constant_time_test.c
cpu-arm-asm.S Don't probe for NEON with SIGILL on aarch64. 2015-02-03 19:56:25 +00:00
cpu-arm.c Support Trusty, an embedded platform. 2015-05-08 18:34:55 +00:00
cpu-intel.c Eliminate unnecessary includes from low-level crypto modules. 2015-04-13 20:49:18 +00:00
cpu-x86_64-asm.pl Remove explicit .hiddens from x86_64 perlasm files. 2015-02-25 21:26:16 +00:00
cpu-x86-asm.pl Never set RC4_CHAR. 2015-02-20 23:59:59 +00:00
crypto.c Fix |SSLeay|. 2015-05-20 17:44:44 +00:00
directory_posix.c Eliminate unnecessary includes from low-level crypto modules. 2015-04-13 20:49:18 +00:00
directory_win.c Eliminate unnecessary includes from low-level crypto modules. 2015-04-13 20:49:18 +00:00
directory.h
ex_data.c Remove unnecessary NULL checks, part 3. 2015-05-04 23:12:04 +00:00
header_removed.h
internal.h Try to fix MSVC and __STDC_VERSION__ again. 2015-05-20 13:42:12 -07:00
mem.c Lowercase some Windows headers. 2015-03-31 22:21:42 +00:00
refcount_c11.c Cast refcounts to _Atomic before use. 2015-05-20 13:39:22 -07:00
refcount_lock.c Add infrastructure for reference counts. 2015-05-20 19:14:59 +00:00
refcount_test.c Specify argc and argv arguments to refcount_test:main. 2015-05-20 13:49:41 -07:00
thread_none.c Support Trusty, an embedded platform. 2015-05-08 18:34:55 +00:00
thread_pthread.c Support Trusty, an embedded platform. 2015-05-08 18:34:55 +00:00
thread_test.c Support Trusty, an embedded platform. 2015-05-08 18:34:55 +00:00
thread_win.c Support Trusty, an embedded platform. 2015-05-08 18:34:55 +00:00
thread.c Remove leftovers of the old-style locks. 2015-05-20 19:18:44 +00:00
time_support.c Eliminate unnecessary includes from low-level crypto modules. 2015-04-13 20:49:18 +00:00