boringssl/crypto
David Benjamin c49c9e7e61 Optimize constant-time base64 implementation slightly.
Rather than comparing against both endpoints, subtract the minimum and
rely on unsigned wraparound to do both comparisons at once. This seems
to be slightly faster.

In addition, constant_time_lt_8 becomes much simpler if it can assume
that |a| and |b| have the same MSB. But we can arrange that by casting
up to |crypto_word_t| (which is otherwise happening anyway).

Change-Id: I82bd676e487eb7bb079ba7286df724c1c380bbb4
Reviewed-on: https://boringssl-review.googlesource.com/16445
Reviewed-by: Adam Langley <agl@google.com>
2017-05-17 23:11:47 +00:00
..
asn1 Fix time offset calculation. 2017-05-03 16:23:16 +00:00
base64 Optimize constant-time base64 implementation slightly. 2017-05-17 23:11:47 +00:00
bio Convert bio_test to GTest. 2017-03-21 17:39:57 +00:00
bn_extra Move bn/ into crypto/fipsmodule/ 2017-05-01 22:51:25 +00:00
buf Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
bytestring Convert bytestring_test to GTest. 2017-04-17 14:19:47 +00:00
chacha Remove filename argument to x86 asm_init. 2017-05-12 14:58:27 +00:00
cipher_extra Add AES-GCM-SIV tests for counter wrapping. 2017-05-15 16:08:46 +00:00
cmac Convert cmac_test to GTest. 2017-04-24 20:25:22 +00:00
conf Fix out-of-memory condition in conf. 2017-03-21 16:19:22 +00:00
curve25519 Convert spake25519_test to GTest. 2017-04-24 20:26:02 +00:00
dh Move bn/ into crypto/fipsmodule/ 2017-05-01 22:51:25 +00:00
digest_extra First part of the FIPS module. 2017-04-07 00:05:34 +00:00
dsa Move bn/ into crypto/fipsmodule/ 2017-05-01 22:51:25 +00:00
ec_extra Tidy up FIPS module dependencies. 2017-05-05 23:10:24 +00:00
ecdh Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
ecdsa_extra Tidy up FIPS module dependencies. 2017-05-05 23:10:24 +00:00
engine Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
err Update BN_enhanced_miller_rabin_primality_test to enforce preconditions and accept BN_prime_checks. 2017-04-21 22:24:01 +00:00
evp Add a flag to toggle the buggy RSA parser. 2017-05-10 15:49:33 +00:00
fipsmodule Add FIPS-compliant key generation that calls check_fips for RSA and EC. 2017-05-17 16:30:48 +00:00
hkdf Convert hkdf_test to C++. 2017-01-04 01:40:44 +00:00
hmac_extra First part of the FIPS module. 2017-04-07 00:05:34 +00:00
lhash Remove lh_new's default hash and comparator. 2017-01-04 01:44:10 +00:00
obj Teach crypto/x509 how to verify an Ed25519 signature. 2017-04-05 23:35:30 +00:00
pem Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
perlasm Remove filename argument to x86 asm_init. 2017-05-12 14:58:27 +00:00
pkcs7 Add PKCS7_get_raw_certificates. 2017-04-19 17:30:31 +00:00
pkcs8 First part of the FIPS module. 2017-04-07 00:05:34 +00:00
poly1305 Fix Android build. 2017-04-07 17:33:24 +00:00
pool Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
rand_extra Fix fuzzer build. 2017-04-25 16:42:28 +00:00
rc4 Simplify RC4 code and remove assembly. 2016-08-30 15:32:31 +00:00
rsa_extra Add FIPS-compliant key generation that calls check_fips for RSA and EC. 2017-05-17 16:30:48 +00:00
stack Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
test Move OPENSSL_ASAN to base.h. 2017-05-16 20:16:52 +00:00
x509 Move PKCS#7 functions into their own directory. 2017-04-19 17:24:51 +00:00
x509v3 Fix some error path logic in i2v_AUTHORITY_INFO_ACCESS and i2v_GENERAL_NAME 2017-05-03 17:18:27 +00:00
CMakeLists.txt Only fixup CMAKE_ASM_FLAGS -isysroot if CMAKE_OSX_SYSROOT is set. 2017-05-11 22:14:07 +00:00
compiler_test.cc Fix build on android_aarch64. 2017-04-21 22:52:10 +00:00
constant_time_test.cc Switch constant-time functions to using |crypto_word_t|. 2017-04-21 22:06:05 +00:00
cpu-aarch64-linux.c
cpu-arm-linux.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
cpu-arm.c
cpu-intel.c
cpu-ppc64le.c Make the POWER hardware capability value a global in crypto.c. 2017-04-04 18:19:19 +00:00
crypto.c Revise OPENSSL_ia32cap_P strategy to avoid TEXTRELs. 2017-04-27 21:07:33 +00:00
ex_data.c Fix CRYPTO_dup_ex_data. 2017-04-04 18:21:49 +00:00
internal.h Switch constant-time functions to using |crypto_word_t|. 2017-04-21 22:06:05 +00:00
mem.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
refcount_c11.c
refcount_lock.c
refcount_test.cc Convert constant_time_test and refcount_test to C++. 2017-01-04 01:36:49 +00:00
thread_none.c
thread_pthread.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
thread_test.c Move ec/ and ecdsa/ into fipsmodule/ 2017-05-04 20:27:23 +00:00
thread_win.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
thread.c Remove a bunch of unnecessary includes. 2016-06-28 20:31:14 +00:00