|
54 | 54 | #error "MBEDTLS_HAVE_TIME_DATE without MBEDTLS_HAVE_TIME does not make sense" |
55 | 55 | #endif |
56 | 56 |
|
57 | | -/* Check that each MBEDTLS_ECP_DP_xxx symbol has its PSA_WANT_ECC_xxx counterpart |
58 | | - * when PSA crypto is enabled. */ |
59 | | -#if defined(MBEDTLS_PSA_CRYPTO_CONFIG) || defined(MBEDTLS_PSA_CRYPTO_C) |
60 | | - |
61 | | -#if defined(MBEDTLS_ECP_DP_BP256R1_ENABLED) && !defined(PSA_WANT_ECC_BRAINPOOL_P_R1_256) |
62 | | -#error "MBEDTLS_ECP_DP_BP256R1_ENABLED defined, but not its PSA counterpart" |
63 | | -#endif |
64 | | - |
65 | | -#if defined(MBEDTLS_ECP_DP_BP384R1_ENABLED) && !defined(PSA_WANT_ECC_BRAINPOOL_P_R1_384) |
66 | | -#error "MBEDTLS_ECP_DP_BP384R1_ENABLED defined, but not its PSA counterpart" |
67 | | -#endif |
68 | | - |
69 | | -#if defined(MBEDTLS_ECP_DP_BP512R1_ENABLED) && !defined(PSA_WANT_ECC_BRAINPOOL_P_R1_512) |
70 | | -#error "MBEDTLS_ECP_DP_BP512R1_ENABLED defined, but not its PSA counterpart" |
71 | | -#endif |
72 | | - |
73 | | -#if defined(MBEDTLS_ECP_DP_CURVE25519_ENABLED) && !defined(PSA_WANT_ECC_MONTGOMERY_255) |
74 | | -#error "MBEDTLS_ECP_DP_CURVE25519_ENABLED defined, but not its PSA counterpart" |
75 | | -#endif |
76 | | - |
77 | | -#if defined(MBEDTLS_ECP_DP_CURVE448_ENABLED) && !defined(PSA_WANT_ECC_MONTGOMERY_448) |
78 | | -#error "MBEDTLS_ECP_DP_CURVE448_ENABLED defined, but not its PSA counterpart" |
79 | | -#endif |
80 | | - |
81 | | -#if defined(MBEDTLS_ECP_DP_SECP192R1_ENABLED) && !defined(PSA_WANT_ECC_SECP_R1_192) |
82 | | -#error "MBEDTLS_ECP_DP_SECP192R1_ENABLED defined, but not its PSA counterpart" |
83 | | -#endif |
84 | | - |
85 | | -#if defined(MBEDTLS_ECP_DP_SECP224R1_ENABLED) && !defined(PSA_WANT_ECC_SECP_R1_224) |
86 | | -#error "MBEDTLS_ECP_DP_SECP224R1_ENABLED defined, but not its PSA counterpart" |
87 | | -#endif |
88 | | - |
89 | | -#if defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED) && !defined(PSA_WANT_ECC_SECP_R1_256) |
90 | | -#error "MBEDTLS_ECP_DP_SECP256R1_ENABLED defined, but not its PSA counterpart" |
91 | | -#endif |
92 | | - |
93 | | -#if defined(MBEDTLS_ECP_DP_SECP384R1_ENABLED) && !defined(PSA_WANT_ECC_SECP_R1_384) |
94 | | -#error "MBEDTLS_ECP_DP_SECP384R1_ENABLED defined, but not its PSA counterpart" |
95 | | -#endif |
96 | | - |
97 | | -#if defined(MBEDTLS_ECP_DP_SECP521R1_ENABLED) && !defined(PSA_WANT_ECC_SECP_R1_521) |
98 | | -#error "MBEDTLS_ECP_DP_SECP521R1_ENABLED defined, but not its PSA counterpart" |
99 | | -#endif |
100 | | - |
101 | | -#if defined(MBEDTLS_ECP_DP_SECP192K1_ENABLED) && !defined(PSA_WANT_ECC_SECP_K1_192) |
102 | | -#error "MBEDTLS_ECP_DP_SECP192K1_ENABLED defined, but not its PSA counterpart" |
103 | | -#endif |
104 | | - |
105 | | -/* SECP224K1 is buggy in PSA API so we skip this check */ |
106 | | -#if 0 && defined(MBEDTLS_ECP_DP_SECP224K1_ENABLED) && !defined(PSA_WANT_ECC_SECP_K1_224) |
107 | | -#error "MBEDTLS_ECP_DP_SECP224K1_ENABLED defined, but not its PSA counterpart" |
108 | | -#endif |
109 | | - |
110 | | -#if defined(MBEDTLS_ECP_DP_SECP256K1_ENABLED) && !defined(PSA_WANT_ECC_SECP_K1_256) |
111 | | -#error "MBEDTLS_ECP_DP_SECP256K1_ENABLED defined, but not its PSA counterpart" |
112 | | -#endif |
113 | | - |
114 | | -#endif /* MBEDTLS_PSA_CRYPTO_CONFIG || MBEDTLS_PSA_CRYPTO_C */ |
115 | | - |
116 | 57 | /* Limitations on ECC key types acceleration: if we have any of `PUBLIC_KEY`, |
117 | 58 | * `KEY_PAIR_BASIC`, `KEY_PAIR_IMPORT`, `KEY_PAIR_EXPORT` then we must have |
118 | 59 | * all 4 of them. |
|
0 commit comments