Skip to content

Commit a52460c

Browse files
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.
1 parent f8a9d94 commit a52460c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/psa/crypto_values.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1282,8 +1282,8 @@
12821282
#define PSA_ALG_TLS12_PSK_TO_MS_GET_HASH(hkdf_alg) \
12831283
(PSA_ALG_CATEGORY_HASH | ((hkdf_alg) & PSA_ALG_HASH_MASK))
12841284

1285-
#define PSA_ALG_KEY_DERIVATION_MASK ((psa_algorithm_t)0x080fffff)
1286-
#define PSA_ALG_KEY_AGREEMENT_MASK ((psa_algorithm_t)0x10f00000)
1285+
#define PSA_ALG_KEY_DERIVATION_MASK ((psa_algorithm_t)0x0803ffff)
1286+
#define PSA_ALG_KEY_AGREEMENT_MASK ((psa_algorithm_t)0x10fc0000)
12871287

12881288
/** Macro to build a combined algorithm that chains a key agreement with
12891289
* a key derivation.

0 commit comments

Comments
 (0)