1 /** 2 * This file is intended to be used to build PSA test driver libraries. It is 3 * intended to be appended by the test build system to the crypto_config.h file 4 * of the Mbed TLS library the test library will be linked to. It mirrors the 5 * PSA_ACCEL_* macros defining the cryptographic operations the test library 6 * supports. 7 */ 8 9 #if defined(PSA_WANT_ALG_CBC_NO_PADDING) 10 #if defined(MBEDTLS_PSA_ACCEL_ALG_CBC_NO_PADDING) 11 #undef MBEDTLS_PSA_ACCEL_ALG_CBC_NO_PADDING 12 #else 13 #define MBEDTLS_PSA_ACCEL_ALG_CBC_NO_PADDING 1 14 #endif 15 #endif 16 17 #if defined(PSA_WANT_ALG_CBC_PKCS7) 18 #if defined(MBEDTLS_PSA_ACCEL_ALG_CBC_PKCS7) 19 #undef MBEDTLS_PSA_ACCEL_ALG_CBC_PKCS7 20 #else 21 #define MBEDTLS_PSA_ACCEL_ALG_CBC_PKCS7 1 22 #endif 23 #endif 24 25 #if defined(PSA_WANT_ALG_CFB) 26 #if defined(MBEDTLS_PSA_ACCEL_ALG_CFB) 27 #undef MBEDTLS_PSA_ACCEL_ALG_CFB 28 #else 29 #define MBEDTLS_PSA_ACCEL_ALG_CFB 1 30 #endif 31 #endif 32 33 #if defined(PSA_WANT_ALG_CTR) 34 #if defined(MBEDTLS_PSA_ACCEL_ALG_CTR) 35 #undef MBEDTLS_PSA_ACCEL_ALG_CTR 36 #else 37 #define MBEDTLS_PSA_ACCEL_ALG_CTR 1 38 #endif 39 #endif 40 41 #if defined(PSA_WANT_ALG_DETERMINISTIC_ECDSA) 42 #if defined(MBEDTLS_PSA_ACCEL_ALG_DETERMINISTIC_ECDSA) 43 #undef MBEDTLS_PSA_ACCEL_ALG_DETERMINISTIC_ECDSA 44 #else 45 #define MBEDTLS_PSA_ACCEL_ALG_DETERMINISTIC_ECDSA 1 46 #endif 47 #endif 48 49 #if defined(PSA_WANT_ALG_ECDSA) 50 #if defined(MBEDTLS_PSA_ACCEL_ALG_ECDSA) 51 #undef MBEDTLS_PSA_ACCEL_ALG_ECDSA 52 #else 53 #define MBEDTLS_PSA_ACCEL_ALG_ECDSA 1 54 #endif 55 #endif 56 57 #if defined(PSA_WANT_ALG_MD5) 58 #if defined(MBEDTLS_PSA_ACCEL_ALG_MD5) 59 #undef MBEDTLS_PSA_ACCEL_ALG_MD5 60 #else 61 #define MBEDTLS_PSA_ACCEL_ALG_MD5 1 62 #endif 63 #endif 64 65 #if defined(PSA_WANT_ALG_OFB) 66 #if defined(MBEDTLS_PSA_ACCEL_ALG_OFB) 67 #undef MBEDTLS_PSA_ACCEL_ALG_OFB 68 #else 69 #define MBEDTLS_PSA_ACCEL_ALG_OFB 1 70 #endif 71 #endif 72 73 #if defined(PSA_WANT_ALG_RIPEMD160) 74 #if defined(MBEDTLS_PSA_ACCEL_ALG_RIPEMD160) 75 #undef MBEDTLS_PSA_ACCEL_ALG_RIPEMD160 76 #else 77 #define MBEDTLS_PSA_ACCEL_ALG_RIPEMD160 1 78 #endif 79 #endif 80 81 #if defined(PSA_WANT_ALG_RSA_PKCS1V15_SIGN) 82 #if defined(MBEDTLS_PSA_ACCEL_ALG_RSA_PKCS1V15_SIGN) 83 #undef MBEDTLS_PSA_ACCEL_ALG_RSA_PKCS1V15_SIGN 84 #else 85 #define MBEDTLS_PSA_ACCEL_ALG_RSA_PKCS1V15_SIGN 1 86 #endif 87 #endif 88 89 #if defined(PSA_WANT_ALG_RSA_PSS) 90 #if defined(MBEDTLS_PSA_ACCEL_ALG_RSA_PSS) 91 #undef MBEDTLS_PSA_ACCEL_ALG_RSA_PSS 92 #else 93 #define MBEDTLS_PSA_ACCEL_ALG_RSA_PSS 1 94 #endif 95 #endif 96 97 #if defined(PSA_WANT_ALG_SHA_1) 98 #if defined(MBEDTLS_PSA_ACCEL_ALG_SHA_1) 99 #undef MBEDTLS_PSA_ACCEL_ALG_SHA_1 100 #else 101 #define MBEDTLS_PSA_ACCEL_ALG_SHA_1 1 102 #endif 103 #endif 104 105 #if defined(PSA_WANT_ALG_SHA_224) 106 #if defined(MBEDTLS_PSA_ACCEL_ALG_SHA_224) 107 #undef MBEDTLS_PSA_ACCEL_ALG_SHA_224 108 #else 109 #define MBEDTLS_PSA_ACCEL_ALG_SHA_224 1 110 #endif 111 #endif 112 113 #if defined(PSA_WANT_ALG_SHA_256) 114 #if defined(MBEDTLS_PSA_ACCEL_ALG_SHA_256) 115 #undef MBEDTLS_PSA_ACCEL_ALG_SHA_256 116 #else 117 #define MBEDTLS_PSA_ACCEL_ALG_SHA_256 1 118 #endif 119 #endif 120 121 #if defined(PSA_WANT_ALG_SHA_384) 122 #if defined(MBEDTLS_PSA_ACCEL_ALG_SHA_384) 123 #undef MBEDTLS_PSA_ACCEL_ALG_SHA_384 124 #else 125 #define MBEDTLS_PSA_ACCEL_ALG_SHA_384 1 126 #endif 127 #endif 128 129 #if defined(PSA_WANT_ALG_SHA_512) 130 #if defined(MBEDTLS_PSA_ACCEL_ALG_SHA_512) 131 #undef MBEDTLS_PSA_ACCEL_ALG_SHA_512 132 #else 133 #define MBEDTLS_PSA_ACCEL_ALG_SHA_512 1 134 #endif 135 #endif 136 137 #if defined(PSA_WANT_ALG_XTS) 138 #if defined(MBEDTLS_PSA_ACCEL_ALG_XTS) 139 #undef MBEDTLS_PSA_ACCEL_ALG_XTS 140 #else 141 #define MBEDTLS_PSA_ACCEL_ALG_XTS 1 142 #endif 143 #endif 144 145 #if defined(PSA_WANT_KEY_TYPE_AES) 146 #if defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_AES) 147 #undef MBEDTLS_PSA_ACCEL_KEY_TYPE_AES 148 #else 149 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_AES 1 150 #endif 151 #endif 152 153 #if defined(PSA_WANT_KEY_TYPE_ARIA) 154 #if defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_ARIA) 155 #undef MBEDTLS_PSA_ACCEL_KEY_TYPE_ARIA 156 #else 157 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_ARIA 1 158 #endif 159 #endif 160 161 #if defined(PSA_WANT_KEY_TYPE_CAMELLIA) 162 #if defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_CAMELLIA) 163 #undef MBEDTLS_PSA_ACCEL_KEY_TYPE_CAMELLIA 164 #else 165 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_CAMELLIA 1 166 #endif 167 #endif 168 169 #if defined(PSA_WANT_KEY_TYPE_ECC_KEY_PAIR) 170 #if defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_KEY_PAIR) 171 #undef MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_KEY_PAIR 172 #else 173 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_KEY_PAIR 1 174 #endif 175 #endif 176 177 #if defined(PSA_WANT_KEY_TYPE_RSA_KEY_PAIR) 178 #if defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_KEY_PAIR) 179 #undef MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_KEY_PAIR 180 #else 181 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_KEY_PAIR 1 182 #endif 183 #endif 184 185 #define MBEDTLS_PSA_ACCEL_ALG_CBC_MAC 1 186 #define MBEDTLS_PSA_ACCEL_ALG_CCM 1 187 #define MBEDTLS_PSA_ACCEL_ALG_CHACHA20_POLY1305 1 188 #define MBEDTLS_PSA_ACCEL_ALG_CMAC 1 189 #define MBEDTLS_PSA_ACCEL_ALG_ECB_NO_PADDING 1 190 #define MBEDTLS_PSA_ACCEL_ALG_ECDH 1 191 #define MBEDTLS_PSA_ACCEL_ALG_GCM 1 192 #define MBEDTLS_PSA_ACCEL_ALG_HKDF 1 193 #define MBEDTLS_PSA_ACCEL_ALG_HMAC 1 194 #define MBEDTLS_PSA_ACCEL_ALG_RSA_OAEP 1 195 #define MBEDTLS_PSA_ACCEL_ALG_RSA_PKCS1V15_CRYPT 1 196 #define MBEDTLS_PSA_ACCEL_ALG_STREAM_CIPHER 1 197 #define MBEDTLS_PSA_ACCEL_ALG_TLS12_PRF 1 198 #define MBEDTLS_PSA_ACCEL_ALG_TLS12_PSK_TO_MS 1 199 200 #if defined(MBEDTLS_PSA_ACCEL_ALG_ECDSA) 201 #define MBEDTLS_PSA_ACCEL_ECC_BRAINPOOL_P_R1_256 1 202 #define MBEDTLS_PSA_ACCEL_ECC_BRAINPOOL_P_R1_384 1 203 #define MBEDTLS_PSA_ACCEL_ECC_BRAINPOOL_P_R1_512 1 204 #define MBEDTLS_PSA_ACCEL_ECC_MONTGOMERY_255 1 205 #define MBEDTLS_PSA_ACCEL_ECC_MONTGOMERY_448 1 206 #define MBEDTLS_PSA_ACCEL_ECC_SECP_K1_192 1 207 #define MBEDTLS_PSA_ACCEL_ECC_SECP_K1_224 1 208 #define MBEDTLS_PSA_ACCEL_ECC_SECP_K1_256 1 209 #define MBEDTLS_PSA_ACCEL_ECC_SECP_R1_192 1 210 #define MBEDTLS_PSA_ACCEL_ECC_SECP_R1_224 1 211 #define MBEDTLS_PSA_ACCEL_ECC_SECP_R1_256 1 212 #define MBEDTLS_PSA_ACCEL_ECC_SECP_R1_384 1 213 #define MBEDTLS_PSA_ACCEL_ECC_SECP_R1_521 1 214 #endif 215 216 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_DERIVE 1 217 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_HMAC 1 218 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_CHACHA20 1 219 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_DES 1 220 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_PUBLIC_KEY 1 221 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_RAW_DATA 1 222 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_PUBLIC_KEY 1 223