From 9673cc8255fe01dc0bab2685ca4f120efc317279 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Wed, 11 Apr 2018 16:57:49 +0200 Subject: [PATCH] Define PSA_ALG_RSA_OAEP_MGF1(hash) --- include/psa/crypto.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/psa/crypto.h b/include/psa/crypto.h index f5db4d26b..f25837bfd 100644 --- a/include/psa/crypto.h +++ b/include/psa/crypto.h @@ -331,7 +331,11 @@ typedef uint32_t psa_algorithm_t; #define PSA_ALG_RSA_PKCS1V15_SIGN(hash_alg) \ (PSA_ALG_RSA_PKCS1V15_SIGN_RAW | ((hash_alg) & PSA_ALG_HASH_MASK)) #define PSA_ALG_IS_RSA_PKCS1V15_SIGN(alg) \ - (((alg) & 0x7fffff00) == PSA_ALG_RSA_PKCS1V15_SIGN_RAW) + (((alg) & ~PSA_ALG_HASH_MASK) == PSA_ALG_RSA_PKCS1V15_SIGN_RAW) +#define PSA_ALG_RSA_OAEP_MGF1(hash_alg) \ + (PSA_ALG_RSA_OAEP_MGF1_RAW | ((hash_alg) & PSA_ALG_HASH_MASK)) +#define PSA_ALG_IS_RSA_OAEP_MGF1(alg) \ + (((alg) & ~PSA_ALG_HASH_MASK) == PSA_ALG_RSA_OAEP_MGF1_RAW) #define PSA_ALG_RSA_GET_HASH(alg) \ (((alg) & PSA_ALG_HASH_MASK) | PSA_ALG_CATEGORY_HASH)