boringssl/crypto/fipsmodule
David Benjamin 05821b0ee3 Consistently check length in RSA_add_pkcs1_prefix.
We check the length for MD5+SHA1 but not the normal cases. Instead,
EVP_PKEY_sign externally checks the length (largely because the silly
RSA-PSS padding function forces it). We especially should be checking
the length for these because otherwise the prefix built into the ASN.1
prefix is wrong.

The primary motivation is to avoid putting EVP_PKEY inside the FIPS
module. This means all logic for supported algorithms should live in
crypto/rsa.

This requires fixing up the verify_recover logic and some tests,
including bcm.c's KAT bits.

(evp_tests.txt is now this odd mixture of EVP-level and RSA-level error
codes. A follow-up change will add new APIs for RSA-PSS which will allow
p_rsa.c to be trimmed down and make things consistent.)

Change-Id: I29158e9695b28e8632b06b449234a5dded35c3e7
Reviewed-on: https://boringssl-review.googlesource.com/15824
Reviewed-by: Adam Langley <agl@google.com>
2017-05-02 20:29:47 +00:00
..
aes Revise OPENSSL_ia32cap_P strategy to avoid TEXTRELs. 2017-04-27 21:07:33 +00:00
bn Move bn/ into crypto/fipsmodule/ 2017-05-01 22:51:25 +00:00
des Move des/ to crypto/fipsmodule/ 2017-05-02 19:21:02 +00:00
digest Be less clever about .rel.ro avoidance. 2017-04-07 15:20:26 +00:00
hmac
md4
md5
modes Revise OPENSSL_ia32cap_P strategy to avoid TEXTRELs. 2017-04-27 21:07:33 +00:00
rand Don't print message when waiting for urandom entropy. 2017-04-27 21:38:21 +00:00
sha Revise OPENSSL_ia32cap_P strategy to avoid TEXTRELs. 2017-04-27 21:07:33 +00:00
ar.go Include the correct ar.go. 2017-04-07 00:37:30 +00:00
bcm.c Consistently check length in RSA_add_pkcs1_prefix. 2017-05-02 20:29:47 +00:00
CMakeLists.txt Move bn/ into crypto/fipsmodule/ 2017-05-01 22:51:25 +00:00
const.go Be less clever about .rel.ro avoidance. 2017-04-07 15:20:26 +00:00
delocate.go Move bn/ into crypto/fipsmodule/ 2017-05-01 22:51:25 +00:00
delocate.h Move much of rand/ into the FIPS module. 2017-04-21 22:03:18 +00:00
FIPS.md Inject FIPS hash without running module. 2017-04-12 23:09:38 +00:00
inject-hash.go Allow raw object files to be passed into inject-hash.go. 2017-04-21 22:20:23 +00:00
intcheck1.png
intcheck2.png Inject FIPS hash without running module. 2017-04-12 23:09:38 +00:00
intcheck3.png
is_fips.c