summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorShane Lontis <shane.lontis@oracle.com>2020-09-16 14:10:23 +1000
committerShane Lontis <shane.lontis@oracle.com>2020-09-16 14:10:23 +1000
commit4343a4187d28d719006642a610afea6e186832bf (patch)
tree1dfeffe1ad5f1b6e823163d7e1c21657c3307eb8 /include
parenta268ed3acf16948c0e19ba67b2b3f89b3312a416 (diff)
Add self tests for rsa encryption
SP800-56br2 requires seperate KAT's (fips self tests) to be tested for both encryption and decryption using the RSA primitive (i.e. no padding). This is specified in FIPS140-2 IG D.9 A copy of the methods EVP_PKEY_encrypt_init(), EVP_PKEY_encrypt(), EVP_PKEY_decrypt_init(), EVP_PKEY_decrypt() are now in the fips module. Removed the #ifdef FIPS_MODULE in evp_pkey_ctx_free_old_ops(). Added corruption test Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/12835)
Diffstat (limited to 'include')
-rw-r--r--include/openssl/self_test.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/openssl/self_test.h b/include/openssl/self_test.h
index aa153581fa..4d99aaa4e3 100644
--- a/include/openssl/self_test.h
+++ b/include/openssl/self_test.h
@@ -30,6 +30,7 @@ extern "C" {
# define OSSL_SELF_TEST_TYPE_CRNG "Continuous_RNG_Test"
# define OSSL_SELF_TEST_TYPE_PCT "Pairwise_Consistency_Test"
# define OSSL_SELF_TEST_TYPE_KAT_CIPHER "KAT_Cipher"
+# define OSSL_SELF_TEST_TYPE_KAT_ASYM_CIPHER "KAT_AsymmetricCipher"
# define OSSL_SELF_TEST_TYPE_KAT_DIGEST "KAT_Digest"
# define OSSL_SELF_TEST_TYPE_KAT_SIGNATURE "KAT_Signature"
# define OSSL_SELF_TEST_TYPE_KAT_KDF "KAT_KDF"
@@ -44,6 +45,8 @@ extern "C" {
# define OSSL_SELF_TEST_DESC_PCT_DSA "DSA"
# define OSSL_SELF_TEST_DESC_CIPHER_AES_GCM "AES_GCM"
# define OSSL_SELF_TEST_DESC_CIPHER_TDES "TDES"
+# define OSSL_SELF_TEST_DESC_ASYM_RSA_ENC "RSA_Encrypt"
+# define OSSL_SELF_TEST_DESC_ASYM_RSA_DEC "RSA_Decrypt"
# define OSSL_SELF_TEST_DESC_MD_SHA1 "SHA1"
# define OSSL_SELF_TEST_DESC_MD_SHA2 "SHA2"
# define OSSL_SELF_TEST_DESC_MD_SHA3 "SHA3"