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_ECDH) 58 #if defined(MBEDTLS_PSA_ACCEL_ALG_ECDH) 59 #undef MBEDTLS_PSA_ACCEL_ALG_ECDH 60 #else 61 #define MBEDTLS_PSA_ACCEL_ALG_ECDH 1 62 #endif 63 #endif 64 65 #if defined(PSA_WANT_ALG_MD5) 66 #if defined(MBEDTLS_PSA_ACCEL_ALG_MD5) 67 #undef MBEDTLS_PSA_ACCEL_ALG_MD5 68 #else 69 #define MBEDTLS_PSA_ACCEL_ALG_MD5 1 70 #endif 71 #endif 72 73 #if defined(PSA_WANT_ALG_OFB) 74 #if defined(MBEDTLS_PSA_ACCEL_ALG_OFB) 75 #undef MBEDTLS_PSA_ACCEL_ALG_OFB 76 #else 77 #define MBEDTLS_PSA_ACCEL_ALG_OFB 1 78 #endif 79 #endif 80 81 #if defined(PSA_WANT_ALG_RIPEMD160) 82 #if defined(MBEDTLS_PSA_ACCEL_ALG_RIPEMD160) 83 #undef MBEDTLS_PSA_ACCEL_ALG_RIPEMD160 84 #else 85 #define MBEDTLS_PSA_ACCEL_ALG_RIPEMD160 1 86 #endif 87 #endif 88 89 #if defined(PSA_WANT_ALG_RSA_PKCS1V15_SIGN) 90 #if defined(MBEDTLS_PSA_ACCEL_ALG_RSA_PKCS1V15_SIGN) 91 #undef MBEDTLS_PSA_ACCEL_ALG_RSA_PKCS1V15_SIGN 92 #else 93 #define MBEDTLS_PSA_ACCEL_ALG_RSA_PKCS1V15_SIGN 1 94 #endif 95 #endif 96 97 #if defined(PSA_WANT_ALG_RSA_PSS) 98 #if defined(MBEDTLS_PSA_ACCEL_ALG_RSA_PSS) 99 #undef MBEDTLS_PSA_ACCEL_ALG_RSA_PSS 100 #else 101 #define MBEDTLS_PSA_ACCEL_ALG_RSA_PSS 1 102 #endif 103 #endif 104 105 #if defined(PSA_WANT_ALG_SHA_1) 106 #if defined(MBEDTLS_PSA_ACCEL_ALG_SHA_1) 107 #undef MBEDTLS_PSA_ACCEL_ALG_SHA_1 108 #else 109 #define MBEDTLS_PSA_ACCEL_ALG_SHA_1 1 110 #endif 111 #endif 112 113 #if defined(PSA_WANT_ALG_SHA_224) 114 #if defined(MBEDTLS_PSA_ACCEL_ALG_SHA_224) 115 #undef MBEDTLS_PSA_ACCEL_ALG_SHA_224 116 #else 117 #define MBEDTLS_PSA_ACCEL_ALG_SHA_224 1 118 #endif 119 #endif 120 121 #if defined(PSA_WANT_ALG_SHA_256) 122 #if defined(MBEDTLS_PSA_ACCEL_ALG_SHA_256) 123 #undef MBEDTLS_PSA_ACCEL_ALG_SHA_256 124 #else 125 #define MBEDTLS_PSA_ACCEL_ALG_SHA_256 1 126 #endif 127 #endif 128 129 #if defined(PSA_WANT_ALG_SHA_384) 130 #if defined(MBEDTLS_PSA_ACCEL_ALG_SHA_384) 131 #undef MBEDTLS_PSA_ACCEL_ALG_SHA_384 132 #else 133 #define MBEDTLS_PSA_ACCEL_ALG_SHA_384 1 134 #endif 135 #endif 136 137 #if defined(PSA_WANT_ALG_SHA_512) 138 #if defined(MBEDTLS_PSA_ACCEL_ALG_SHA_512) 139 #undef MBEDTLS_PSA_ACCEL_ALG_SHA_512 140 #else 141 #define MBEDTLS_PSA_ACCEL_ALG_SHA_512 1 142 #endif 143 #endif 144 145 #if defined(PSA_WANT_ALG_XTS) 146 #if defined(MBEDTLS_PSA_ACCEL_ALG_XTS) 147 #undef MBEDTLS_PSA_ACCEL_ALG_XTS 148 #else 149 #define MBEDTLS_PSA_ACCEL_ALG_XTS 1 150 #endif 151 #endif 152 153 #if defined(PSA_WANT_ALG_CHACHA20_POLY1305) 154 #if defined(MBEDTLS_PSA_ACCEL_ALG_CHACHA20_POLY1305) 155 #undef MBEDTLS_PSA_ACCEL_ALG_CHACHA20_POLY1305 156 #else 157 #define MBEDTLS_PSA_ACCEL_ALG_CHACHA20_POLY1305 1 158 #endif 159 #endif 160 161 #if defined(PSA_WANT_KEY_TYPE_AES) 162 #if defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_AES) 163 #undef MBEDTLS_PSA_ACCEL_KEY_TYPE_AES 164 #else 165 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_AES 1 166 #endif 167 #endif 168 169 #if defined(PSA_WANT_KEY_TYPE_ARIA) 170 #if defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_ARIA) 171 #undef MBEDTLS_PSA_ACCEL_KEY_TYPE_ARIA 172 #else 173 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_ARIA 1 174 #endif 175 #endif 176 177 #if defined(PSA_WANT_KEY_TYPE_CAMELLIA) 178 #if defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_CAMELLIA) 179 #undef MBEDTLS_PSA_ACCEL_KEY_TYPE_CAMELLIA 180 #else 181 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_CAMELLIA 1 182 #endif 183 #endif 184 185 #if defined(PSA_WANT_KEY_TYPE_ECC_KEY_PAIR) 186 #if defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_KEY_PAIR) 187 #undef MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_KEY_PAIR 188 #else 189 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_KEY_PAIR 1 190 #endif 191 #endif 192 193 #if defined(PSA_WANT_KEY_TYPE_RSA_KEY_PAIR) 194 #if defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_KEY_PAIR) 195 #undef MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_KEY_PAIR 196 #else 197 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_KEY_PAIR 1 198 #endif 199 #endif 200 201 #if defined(PSA_WANT_KEY_TYPE_CHACHA20) 202 #if defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_CHACHA20) 203 #undef MBEDTLS_PSA_ACCEL_KEY_TYPE_CHACHA20 204 #else 205 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_CHACHA20 1 206 #endif 207 #endif 208 209 #define MBEDTLS_PSA_ACCEL_ALG_CBC_MAC 1 210 #define MBEDTLS_PSA_ACCEL_ALG_CCM 1 211 #define MBEDTLS_PSA_ACCEL_ALG_CMAC 1 212 #define MBEDTLS_PSA_ACCEL_ALG_ECB_NO_PADDING 1 213 #define MBEDTLS_PSA_ACCEL_ALG_GCM 1 214 #define MBEDTLS_PSA_ACCEL_ALG_HKDF 1 215 #define MBEDTLS_PSA_ACCEL_ALG_HKDF_EXTRACT 1 216 #define MBEDTLS_PSA_ACCEL_ALG_HKDF_EXPAND 1 217 #define MBEDTLS_PSA_ACCEL_ALG_HMAC 1 218 #define MBEDTLS_PSA_ACCEL_ALG_RSA_OAEP 1 219 #define MBEDTLS_PSA_ACCEL_ALG_RSA_PKCS1V15_CRYPT 1 220 #define MBEDTLS_PSA_ACCEL_ALG_STREAM_CIPHER 1 221 #define MBEDTLS_PSA_ACCEL_ALG_TLS12_PRF 1 222 #define MBEDTLS_PSA_ACCEL_ALG_TLS12_PSK_TO_MS 1 223 224 #if defined(MBEDTLS_PSA_ACCEL_ALG_ECDSA) 225 #if defined(MBEDTLS_PSA_ACCEL_ALG_ECDH) 226 #define MBEDTLS_PSA_ACCEL_ECC_BRAINPOOL_P_R1_256 1 227 #define MBEDTLS_PSA_ACCEL_ECC_BRAINPOOL_P_R1_384 1 228 #define MBEDTLS_PSA_ACCEL_ECC_BRAINPOOL_P_R1_512 1 229 #define MBEDTLS_PSA_ACCEL_ECC_MONTGOMERY_255 1 230 #define MBEDTLS_PSA_ACCEL_ECC_MONTGOMERY_448 1 231 #define MBEDTLS_PSA_ACCEL_ECC_SECP_K1_192 1 232 #define MBEDTLS_PSA_ACCEL_ECC_SECP_K1_224 1 233 #define MBEDTLS_PSA_ACCEL_ECC_SECP_K1_256 1 234 #define MBEDTLS_PSA_ACCEL_ECC_SECP_R1_192 1 235 #define MBEDTLS_PSA_ACCEL_ECC_SECP_R1_224 1 236 #define MBEDTLS_PSA_ACCEL_ECC_SECP_R1_256 1 237 #define MBEDTLS_PSA_ACCEL_ECC_SECP_R1_384 1 238 #define MBEDTLS_PSA_ACCEL_ECC_SECP_R1_521 1 239 #endif 240 #endif 241 242 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_DERIVE 1 243 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_HMAC 1 244 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_DES 1 245 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_PUBLIC_KEY 1 246 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_RAW_DATA 1 247 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_PUBLIC_KEY 1 248