Skip to content

Commit 1a60fa1

Browse files
Merge pull request #328 from gilles-peskine-arm/psa-ecdsa_deterministic_flag
Remove dependency of crypto_values.h on crypto_extra.h
2 parents 7bb1a7e + 972630e commit 1a60fa1

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

include/psa/crypto_extra.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ psa_status_t mbedtls_psa_inject_entropy(const uint8_t *seed,
384384
#define PSA_ALG_DSA(hash_alg) \
385385
(PSA_ALG_DSA_BASE | ((hash_alg) & PSA_ALG_HASH_MASK))
386386
#define PSA_ALG_DETERMINISTIC_DSA_BASE ((psa_algorithm_t)0x10050000)
387-
#define PSA_ALG_DSA_DETERMINISTIC_FLAG ((psa_algorithm_t)0x00010000)
387+
#define PSA_ALG_DSA_DETERMINISTIC_FLAG PSA_ALG_ECDSA_DETERMINISTIC_FLAG
388388
/** Deterministic DSA signature with hashing.
389389
*
390390
* This is the deterministic variant defined by RFC 6979 of

include/psa/crypto_values.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1197,11 +1197,12 @@
11971197
*/
11981198
#define PSA_ALG_DETERMINISTIC_ECDSA(hash_alg) \
11991199
(PSA_ALG_DETERMINISTIC_ECDSA_BASE | ((hash_alg) & PSA_ALG_HASH_MASK))
1200+
#define PSA_ALG_ECDSA_DETERMINISTIC_FLAG ((psa_algorithm_t)0x00010000)
12001201
#define PSA_ALG_IS_ECDSA(alg) \
1201-
(((alg) & ~PSA_ALG_HASH_MASK & ~PSA_ALG_DSA_DETERMINISTIC_FLAG) == \
1202+
(((alg) & ~PSA_ALG_HASH_MASK & ~PSA_ALG_ECDSA_DETERMINISTIC_FLAG) == \
12021203
PSA_ALG_ECDSA_BASE)
12031204
#define PSA_ALG_ECDSA_IS_DETERMINISTIC(alg) \
1204-
(((alg) & PSA_ALG_DSA_DETERMINISTIC_FLAG) != 0)
1205+
(((alg) & PSA_ALG_ECDSA_DETERMINISTIC_FLAG) != 0)
12051206
#define PSA_ALG_IS_DETERMINISTIC_ECDSA(alg) \
12061207
(PSA_ALG_IS_ECDSA(alg) && PSA_ALG_ECDSA_IS_DETERMINISTIC(alg))
12071208
#define PSA_ALG_IS_RANDOMIZED_ECDSA(alg) \

0 commit comments

Comments
 (0)