boringssl/crypto/fipsmodule
David Benjamin 378cca8016 Handle a modulus of -1 correctly.
Historically, OpenSSL's modular exponentiation functions tolerated negative
moduli by ignoring the sign bit. The special case for a modulus of 1 should do
the same. That said, this is ridiculous and the only reason I'm importing this
is BN_abs_is_word(1) is marginally more efficient than BN_is_one() and we
haven't gotten around to enforcing positive moduli yet.

Thanks to Guido Vranken and OSSFuzz for finding this issue and reporting to
OpenSSL.

(Imported from upstream's 235119f015e46a74040b78b10fd6e954f7f07774.)

Change-Id: I526889dfbe2356753aa1e6ecfd3aa3dc3a8cd2b8
Reviewed-on: https://boringssl-review.googlesource.com/31085
Commit-Queue: Adam Langley <agl@google.com>
Reviewed-by: Adam Langley <agl@google.com>
2018-08-16 15:57:10 +00:00
..
aes Rename |asm_AES_*| to |aes_nohw_*|. 2018-05-15 23:02:52 +00:00
bn Handle a modulus of -1 correctly. 2018-08-16 15:57:10 +00:00
cipher Add EVP_CTRL_AEAD_* constants. 2018-08-09 17:08:15 +00:00
des Move OPENSSL_FALLTHROUGH to internal headers. 2018-01-29 18:17:57 +00:00
digest Match OpenSSL's EVP_MD_CTX_reset return value. 2018-05-29 17:07:16 +00:00
ec Zero-initialize tmp in ec_GFp_simple_mul_single. 2018-06-13 19:58:24 +00:00
ecdh Add ECDH_compute_key_fips inside the module. 2018-07-30 22:40:31 +00:00
ecdsa Align ECDSA sign/verify scalar inversions. 2018-04-24 16:00:12 +00:00
hmac Switch OPENSSL_VERSION_NUMBER to 1.1.0. 2017-09-29 04:51:27 +00:00
md4 Run the comment converter on libcrypto. 2017-08-18 21:49:04 +00:00
md5 Run the comment converter on libcrypto. 2017-08-18 21:49:04 +00:00
modes Update several assembly files from upstream. 2018-08-07 18:57:17 +00:00
policydocs Update FIPS documentation with pointer to the cert and security policy. 2017-07-20 03:32:08 +00:00
rand Update several assembly files from upstream. 2018-08-07 18:57:17 +00:00
rsa Spell Falko Strenzke's name correctly. 2018-05-21 18:18:04 +00:00
self_check Write error messages in the FIPS module to stderr. 2018-06-25 10:30:42 +00:00
sha Update several assembly files from upstream. 2018-08-07 18:57:17 +00:00
tls Fix include path. 2018-05-08 16:26:05 +00:00
bcm.c Add ECDH_compute_key_fips inside the module. 2018-07-30 22:40:31 +00:00
CMakeLists.txt Align on a single CMake style. 2018-08-10 16:22:31 +00:00
delocate.h Use a pool of |rand_state| objects. 2018-07-06 21:25:37 +00:00
FIPS.md Update link to CMVP certificate. 2018-02-26 22:14:35 +00:00
intcheck1.png
intcheck2.png
intcheck3.png
is_fips.c Add some more compatibility functions. 2018-05-08 20:51:15 +00:00