1/* Copyright (c) (2021) Apple Inc. All rights reserved.
2 *
3 * corecrypto is licensed under Apple Inc.’s Internal Use License Agreement (which
4 * is contained in the License.txt file distributed with corecrypto) and only to
5 * people who accept that license. IMPORTANT: Any license rights granted to you by
6 * Apple Inc. (if any) are limited to internal use within your organization only on
7 * devices and computers you own or control, for the sole purpose of verifying the
8 * security characteristics and correct functioning of the Apple Software. You may
9 * not, directly or indirectly, redistribute the Apple Software or any portions thereof.
10 */
11
12#ifndef _CORECRYPTO_CC_IMPL_H_
13#define _CORECRYPTO_CC_IMPL_H_
14
15#define CC_IMPL_LIST \
16 CC_IMPL_ITEM(UNKNOWN, 0) \
17 \
18 CC_IMPL_ITEM(SHA256_LTC, 1) \
19 CC_IMPL_ITEM(SHA256_VNG_ARM, 2) \
20 CC_IMPL_ITEM(SHA256_VNG_ARM64_NEON, 3) \
21 CC_IMPL_ITEM(SHA256_VNG_INTEL_SUPPLEMENTAL_SSE3, 4) \
22 CC_IMPL_ITEM(SHA256_VNG_INTEL_AVX1, 5) \
23 CC_IMPL_ITEM(SHA256_VNG_INTEL_AVX2, 6) \
24 \
25 CC_IMPL_ITEM(AES_ECB_LTC, 11) \
26 CC_IMPL_ITEM(AES_ECB_ARM, 12) \
27 CC_IMPL_ITEM(AES_ECB_INTEL_OPT, 13) \
28 CC_IMPL_ITEM(AES_ECB_INTEL_AESNI, 14) \
29 CC_IMPL_ITEM(AES_ECB_SKG, 15) \
30 CC_IMPL_ITEM(AES_ECB_TRNG, 16) \
31 \
32 CC_IMPL_ITEM(AES_XTS_GENERIC, 21) \
33 CC_IMPL_ITEM(AES_XTS_ARM, 22) \
34 CC_IMPL_ITEM(AES_XTS_INTEL_OPT, 23) \
35 CC_IMPL_ITEM(AES_XTS_INTEL_AESNI, 24) \
36 \
37 CC_IMPL_ITEM(SHA1_LTC, 31) \
38 CC_IMPL_ITEM(SHA1_VNG_ARM, 32) \
39 CC_IMPL_ITEM(SHA1_VNG_INTEL_SUPPLEMENTAL_SSE3, 33) \
40 CC_IMPL_ITEM(SHA1_VNG_INTEL_AVX1, 34) \
41 CC_IMPL_ITEM(SHA1_VNG_INTEL_AVX2, 35) \
42 \
43 CC_IMPL_ITEM(SHA384_LTC, 41) \
44 CC_IMPL_ITEM(SHA384_VNG_ARM, 42) \
45 CC_IMPL_ITEM(SHA384_VNG_INTEL_SUPPLEMENTAL_SSE3, 43) \
46 CC_IMPL_ITEM(SHA384_VNG_INTEL_AVX1, 44) \
47 CC_IMPL_ITEM(SHA384_VNG_INTEL_AVX2, 45) \
48 \
49 CC_IMPL_ITEM(SHA512_LTC, 51) \
50 CC_IMPL_ITEM(SHA512_VNG_ARM, 52) \
51 CC_IMPL_ITEM(SHA512_VNG_INTEL_SUPPLEMENTAL_SSE3, 53) \
52 CC_IMPL_ITEM(SHA512_VNG_INTEL_AVX1, 54) \
53 CC_IMPL_ITEM(SHA512_VNG_INTEL_AVX2, 55)
54
55
56#define CC_IMPL_ITEM(k, v) \
57 CC_IMPL_##k = v,
58
59typedef enum cc_impl {
60 CC_IMPL_LIST
61} cc_impl_t;
62
63#undef CC_IMPL_ITEM
64
65const char *cc_impl_name(cc_impl_t impl);
66
67#endif /* _CORECRYPTO_CC_IMPL_H_ */
68