boringssl/crypto
David Benjamin 73535ab252 Fix undefined block128_f, etc., casts.
This one is a little thorny. All the various block cipher modes
functions and callbacks take a void *key. This allows them to be used
with multiple kinds of block ciphers.

However, the implementations of those callbacks are the normal typed
functions, like AES_encrypt. Those take AES_KEY *key. While, at the ABI
level, this is perfectly fine, C considers this undefined behavior.

If we wish to preserve this genericness, we could either instantiate
multiple versions of these mode functions or create wrappers of
AES_encrypt, etc., that take void *key.

The former means more code and is tedious without C++ templates (maybe
someday...). The latter would not be difficult for a compiler to
optimize out. C mistakenly allowed comparing function pointers for
equality, which means a compiler cannot replace pointers to wrapper
functions with the real thing. (That said, the performance-sensitive
bits already act in chunks, e.g. ctr128_f, so the function call overhead
shouldn't matter.)

But our only 128-bit block cipher is AES anyway, so I just switched
things to use AES_KEY throughout. AES is doing fine, and hopefully we
would have the sense not to pair a hypothetical future block cipher with
so many modes!

Change-Id: Ied3e843f0e3042a439f09e655b29847ade9d4c7d
Reviewed-on: https://boringssl-review.googlesource.com/32107
Reviewed-by: Adam Langley <agl@google.com>
2018-10-01 17:35:02 +00:00
..
asn1 Fix undefined function pointer casts in {d2i,i2d}_Foo_{bio,fp} 2018-10-01 17:34:53 +00:00
base64 Flatten most of the crypto target. 2018-09-05 23:41:25 +00:00
bio Fix undefined function pointer casts in {d2i,i2d}_Foo_{bio,fp} 2018-10-01 17:34:53 +00:00
bn_extra Replace BIO_new + BIO_set_fp with BIO_new_fp. 2018-09-26 17:21:08 +00:00
buf Flatten most of the crypto target. 2018-09-05 23:41:25 +00:00
bytestring Flatten most of the crypto target. 2018-09-05 23:41:25 +00:00
chacha Flatten most of the crypto target. 2018-09-05 23:41:25 +00:00
cipher_extra Flatten most of the crypto target. 2018-09-05 23:41:25 +00:00
cmac Flatten most of the crypto target. 2018-09-05 23:41:25 +00:00
conf Flatten most of the crypto target. 2018-09-05 23:41:25 +00:00
curve25519 Automatically disable assembly with MSAN. 2018-09-07 21:12:37 +00:00
dh Flatten most of the crypto target. 2018-09-05 23:41:25 +00:00
digest_extra Flatten most of the crypto target. 2018-09-05 23:41:25 +00:00
dsa Flatten most of the crypto target. 2018-09-05 23:41:25 +00:00
ec_extra Flatten most of the crypto target. 2018-09-05 23:41:25 +00:00
ecdh_extra Flatten most of the crypto target. 2018-09-05 23:41:25 +00:00
ecdsa_extra Flatten most of the crypto target. 2018-09-05 23:41:25 +00:00
engine Flatten most of the crypto target. 2018-09-05 23:41:25 +00:00
err Push an error on sigalg mismatch in X509_verify. 2018-09-19 03:44:50 +00:00
evp Flatten most of the crypto target. 2018-09-05 23:41:25 +00:00
fipsmodule Fix undefined block128_f, etc., casts. 2018-10-01 17:35:02 +00:00
hkdf Flatten most of the crypto target. 2018-09-05 23:41:25 +00:00
hmac_extra
lhash Flatten most of the crypto target. 2018-09-05 23:41:25 +00:00
obj Flatten most of the crypto target. 2018-09-05 23:41:25 +00:00
pem Fix ERR_GET_REASON checks. 2018-09-26 19:02:42 +00:00
perlasm Don't include quotes in heredocs. 2018-09-14 16:51:00 +00:00
pkcs7 Fix undefined function pointer casts in {d2i,i2d}_Foo_{bio,fp} 2018-10-01 17:34:53 +00:00
pkcs8 Fix undefined function pointer casts in {d2i,i2d}_Foo_{bio,fp} 2018-10-01 17:34:53 +00:00
poly1305 Automatically disable assembly with MSAN. 2018-09-07 21:12:37 +00:00
pool Rename OPENSSL_NO_THREADS, part 1. 2018-09-26 19:10:02 +00:00
rand_extra Disable RandTest.Fork on iOS. 2018-09-28 15:42:18 +00:00
rc4 Flatten most of the crypto target. 2018-09-05 23:41:25 +00:00
rsa_extra Rename OPENSSL_NO_THREADS, part 1. 2018-09-26 19:10:02 +00:00
stack Const-correct sk_find and sk_delete_ptr. 2018-09-27 16:18:18 +00:00
test Add some RAND_bytes tests. 2018-09-06 23:54:57 +00:00
x509 Fix undefined function pointer casts in {d2i,i2d}_Foo_{bio,fp} 2018-10-01 17:34:53 +00:00
x509v3 Fix undefined function pointer casts in {d2i,i2d}_Foo_{bio,fp} 2018-10-01 17:34:53 +00:00
CMakeLists.txt Add a test for STACK_OF(T). 2018-09-26 23:28:50 +00:00
compiler_test.cc
constant_time_test.cc
cpu-aarch64-fuchsia.c
cpu-aarch64-linux.c
cpu-arm-linux_test.cc Fix GCC (8.2.1) build error. 2018-09-06 15:38:11 +00:00
cpu-arm-linux.c Fix corner case in cpuinfo parser. 2018-09-05 00:00:14 +00:00
cpu-arm-linux.h Fix corner case in cpuinfo parser. 2018-09-05 00:00:14 +00:00
cpu-arm.c
cpu-intel.c Change OPENSSL_cpuid_setup to reserve more extended feature space. 2018-04-19 20:48:58 +00:00
cpu-ppc64le.c
crypto.c Automatically disable assembly with MSAN. 2018-09-07 21:12:37 +00:00
ex_data.c
internal.h Rename OPENSSL_NO_THREADS, part 1. 2018-09-26 19:10:02 +00:00
mem.c Use sdallocx, if available, when deallocating. 2018-09-17 21:02:59 +00:00
refcount_c11.c
refcount_lock.c
refcount_test.cc Rename OPENSSL_NO_THREADS, part 1. 2018-09-26 19:10:02 +00:00
self_test.cc Extract FIPS KAT tests into a function. 2018-01-22 20:16:38 +00:00
thread_none.c Rename OPENSSL_NO_THREADS, part 1. 2018-09-26 19:10:02 +00:00
thread_pthread.c
thread_test.cc Rename OPENSSL_NO_THREADS, part 1. 2018-09-26 19:10:02 +00:00
thread_win.c Reland "Fix bssl client/server's error-handling." 2018-05-07 17:19:59 +00:00
thread.c