From 1368cac8b5e6c8baa55a54e0ca55eff11be5082e Mon Sep 17 00:00:00 2001 From: John Safranek Date: Fri, 26 Feb 2021 10:17:51 -0800 Subject: [PATCH] Add RSA PAT. --- wolfcrypt/src/error.c | 3 +++ wolfssl/wolfcrypt/error-crypt.h | 3 ++- wolfssl/wolfcrypt/fips_test.h | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/wolfcrypt/src/error.c b/wolfcrypt/src/error.c index f5ee7b203..89d13ceba 100644 --- a/wolfcrypt/src/error.c +++ b/wolfcrypt/src/error.c @@ -521,6 +521,9 @@ const char* wc_GetErrorString(int error) case ECDSA_KAT_FIPS_E: return "wolfcrypt FIPS ECDSA Known Answer Test Failure"; + case RSA_PAT_FIPS_E: + return "wolfcrypt FIPS RSA Pairwise Agreement Test Failure"; + default: return "unknown error number"; diff --git a/wolfssl/wolfcrypt/error-crypt.h b/wolfssl/wolfcrypt/error-crypt.h index b64a72ddc..ed497eea3 100644 --- a/wolfssl/wolfcrypt/error-crypt.h +++ b/wolfssl/wolfcrypt/error-crypt.h @@ -235,8 +235,9 @@ enum { CHACHA_POLY_OVERFLOW =-274, /* ChaCha20Poly1305 limit overflow */ ASN_SELF_SIGNED_E = -275, /* ASN self-signed certificate error */ ECDSA_KAT_FIPS_E = -276, /* ECDSA KAT failure */ + RSA_PAT_FIPS_E = -277, /* RSA Pairwise failure */ - WC_LAST_E = -276, /* Update this to indicate last error */ + WC_LAST_E = -277, /* Update this to indicate last error */ MIN_CODE_E = -300 /* errors -101 - -299 */ /* add new companion error id strings for any new error codes diff --git a/wolfssl/wolfcrypt/fips_test.h b/wolfssl/wolfcrypt/fips_test.h index 46815b83e..eff1732c9 100644 --- a/wolfssl/wolfcrypt/fips_test.h +++ b/wolfssl/wolfcrypt/fips_test.h @@ -40,6 +40,7 @@ enum FipsCastId { FIPS_CAST_HMAC_SHA3_256, FIPS_CAST_DRBG, FIPS_CAST_RSA_SIGN_PKCS1v15, + FIPS_CAST_RSA_PAIRWISE, FIPS_CAST_ECC_CDH, FIPS_CAST_ECC_PRIMITIVE_Z, FIPS_CAST_DH_PRIMITIVE_Z,