diff --git a/include/psa/crypto.h b/include/psa/crypto.h index f1c836834..95fe42d69 100644 --- a/include/psa/crypto.h +++ b/include/psa/crypto.h @@ -610,13 +610,14 @@ typedef uint32_t psa_algorithm_t; #define PSA_ALG_CFB_BASE ((psa_algorithm_t)0x04000002) #define PSA_ALG_OFB_BASE ((psa_algorithm_t)0x04000003) #define PSA_ALG_XTS_BASE ((psa_algorithm_t)0x04000004) -#define PSA_ALG_STREAM_CIPHER ((psa_algorithm_t)0x04800000) + +#define PSA_ALG_STREAM_CIPHER_BASE ((psa_algorithm_t)0x04800000) #define PSA_ALG_CTR ((psa_algorithm_t)0x04800001) #define PSA_ALG_ARC4 ((psa_algorithm_t)0x04800002) #define PSA_ALG_IS_STREAM_CIPHER(alg) \ (((alg) & (PSA_ALG_CATEGORY_MASK | PSA_ALG_CIPHER_SUBCATEGORY_MASK)) == \ - PSA_ALG_STREAM_CIPHER) + PSA_ALG_STREAM_CIPHER_BASE) #define PSA_ALG_CCM ((psa_algorithm_t)0x06000001) #define PSA_ALG_GCM ((psa_algorithm_t)0x06000002) diff --git a/library/psa_crypto.c b/library/psa_crypto.c index 9145a6df1..50a99904c 100644 --- a/library/psa_crypto.c +++ b/library/psa_crypto.c @@ -1191,7 +1191,7 @@ static const mbedtls_cipher_info_t *mbedtls_cipher_info_from_psa( switch( alg ) { - case PSA_ALG_STREAM_CIPHER: + case PSA_ALG_STREAM_CIPHER_BASE: mode = MBEDTLS_MODE_STREAM; break; case PSA_ALG_CBC_BASE: