From a52460c3ed79e861b7a2d76bf2ffb1a782b66dc7 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Fri, 12 Apr 2019 00:11:21 +0200 Subject: [PATCH] Algorithm encoding: move two bits from derivation to agreement This gives a little more room to encode key agreement algorithms, while keeping enough space for key derivation algorithms. This doesn't affect any of the already-defined algorithms. --- include/psa/crypto_values.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/psa/crypto_values.h b/include/psa/crypto_values.h index f9ac00a81..eddf63262 100644 --- a/include/psa/crypto_values.h +++ b/include/psa/crypto_values.h @@ -1282,8 +1282,8 @@ #define PSA_ALG_TLS12_PSK_TO_MS_GET_HASH(hkdf_alg) \ (PSA_ALG_CATEGORY_HASH | ((hkdf_alg) & PSA_ALG_HASH_MASK)) -#define PSA_ALG_KEY_DERIVATION_MASK ((psa_algorithm_t)0x080fffff) -#define PSA_ALG_KEY_AGREEMENT_MASK ((psa_algorithm_t)0x10f00000) +#define PSA_ALG_KEY_DERIVATION_MASK ((psa_algorithm_t)0x0803ffff) +#define PSA_ALG_KEY_AGREEMENT_MASK ((psa_algorithm_t)0x10fc0000) /** Macro to build a combined algorithm that chains a key agreement with * a key derivation.