]>
Commit | Line | Data |
---|---|---|
316670eb A |
1 | /* |
2 | * ccaes.h | |
3 | * corecrypto | |
4 | * | |
3e170ce0 A |
5 | * Created on 12/10/2010 |
6 | * | |
7 | * Copyright (c) 2010,2011,2012,2013,2015 Apple Inc. All rights reserved. | |
316670eb A |
8 | * |
9 | */ | |
10 | ||
11 | #ifndef _CORECRYPTO_CCAES_H_ | |
12 | #define _CORECRYPTO_CCAES_H_ | |
13 | ||
14 | #include <corecrypto/cc_config.h> | |
15 | #include <corecrypto/ccmode.h> | |
16 | ||
17 | #define CCAES_BLOCK_SIZE 16 | |
18 | #define CCAES_KEY_SIZE_128 16 | |
19 | #define CCAES_KEY_SIZE_192 24 | |
20 | #define CCAES_KEY_SIZE_256 32 | |
21 | ||
22 | extern const struct ccmode_ecb ccaes_ltc_ecb_decrypt_mode; | |
23 | extern const struct ccmode_ecb ccaes_ltc_ecb_encrypt_mode; | |
24 | ||
25 | extern const struct ccmode_cbc ccaes_gladman_cbc_encrypt_mode; | |
26 | extern const struct ccmode_cbc ccaes_gladman_cbc_decrypt_mode; | |
27 | ||
39037602 | 28 | #if CCAES_ARM_ASM |
316670eb A |
29 | extern const struct ccmode_ecb ccaes_arm_ecb_encrypt_mode; |
30 | extern const struct ccmode_ecb ccaes_arm_ecb_decrypt_mode; | |
31 | ||
32 | extern const struct ccmode_cbc ccaes_arm_cbc_encrypt_mode; | |
33 | extern const struct ccmode_cbc ccaes_arm_cbc_decrypt_mode; | |
3e170ce0 A |
34 | |
35 | extern const struct ccmode_xts ccaes_arm_xts_encrypt_mode; | |
36 | extern const struct ccmode_xts ccaes_arm_xts_decrypt_mode; | |
37 | ||
38 | extern const struct ccmode_cfb ccaes_arm_cfb_encrypt_mode; | |
39 | extern const struct ccmode_cfb ccaes_arm_cfb_decrypt_mode; | |
40 | ||
41 | extern const struct ccmode_ofb ccaes_arm_ofb_crypt_mode; | |
42 | ||
316670eb A |
43 | #endif |
44 | ||
fe8ab488 A |
45 | #if CCAES_MUX |
46 | extern const struct ccmode_cbc ccaes_ios_hardware_cbc_encrypt_mode; | |
47 | extern const struct ccmode_cbc ccaes_ios_hardware_cbc_decrypt_mode; | |
48 | ||
49 | extern const struct ccmode_cbc *ccaes_ios_mux_cbc_encrypt_mode(void); | |
50 | extern const struct ccmode_cbc *ccaes_ios_mux_cbc_decrypt_mode(void); | |
51 | #endif | |
52 | ||
39037602 | 53 | #if CCAES_INTEL_ASM |
316670eb A |
54 | //extern const struct ccmode_ecb ccaes_intel_ecb_encrypt_mode; |
55 | //extern const struct ccmode_ecb ccaes_intel_ecb_decrypt_mode; | |
56 | ||
57 | extern const struct ccmode_ecb ccaes_intel_ecb_encrypt_opt_mode; | |
58 | extern const struct ccmode_ecb ccaes_intel_ecb_encrypt_aesni_mode; | |
59 | ||
60 | extern const struct ccmode_ecb ccaes_intel_ecb_decrypt_opt_mode; | |
61 | extern const struct ccmode_ecb ccaes_intel_ecb_decrypt_aesni_mode; | |
62 | ||
63 | //extern const struct ccmode_cbc ccaes_intel_cbc_encrypt_mode; | |
64 | //extern const struct ccmode_cbc ccaes_intel_cbc_decrypt_mode; | |
65 | ||
66 | extern const struct ccmode_cbc ccaes_intel_cbc_encrypt_opt_mode; | |
67 | extern const struct ccmode_cbc ccaes_intel_cbc_encrypt_aesni_mode; | |
68 | ||
69 | extern const struct ccmode_cbc ccaes_intel_cbc_decrypt_opt_mode; | |
70 | extern const struct ccmode_cbc ccaes_intel_cbc_decrypt_aesni_mode; | |
71 | ||
72 | //extern const struct ccmode_xts ccaes_intel_xts_encrypt_mode; | |
73 | //extern const struct ccmode_xts ccaes_intel_xts_decrypt_mode; | |
74 | ||
75 | extern const struct ccmode_xts ccaes_intel_xts_encrypt_opt_mode; | |
76 | extern const struct ccmode_xts ccaes_intel_xts_encrypt_aesni_mode; | |
77 | ||
78 | extern const struct ccmode_xts ccaes_intel_xts_decrypt_opt_mode; | |
79 | extern const struct ccmode_xts ccaes_intel_xts_decrypt_aesni_mode; | |
80 | #endif | |
81 | ||
82 | ||
83 | /* Implementation Selectors: */ | |
84 | const struct ccmode_ecb *ccaes_ecb_encrypt_mode(void); | |
85 | const struct ccmode_cbc *ccaes_cbc_encrypt_mode(void); | |
86 | const struct ccmode_cfb *ccaes_cfb_encrypt_mode(void); | |
87 | const struct ccmode_cfb8 *ccaes_cfb8_encrypt_mode(void); | |
88 | const struct ccmode_xts *ccaes_xts_encrypt_mode(void); | |
89 | const struct ccmode_gcm *ccaes_gcm_encrypt_mode(void); | |
fe8ab488 | 90 | const struct ccmode_ccm *ccaes_ccm_encrypt_mode(void); |
316670eb A |
91 | |
92 | const struct ccmode_ecb *ccaes_ecb_decrypt_mode(void); | |
93 | const struct ccmode_cbc *ccaes_cbc_decrypt_mode(void); | |
94 | const struct ccmode_cfb *ccaes_cfb_decrypt_mode(void); | |
95 | const struct ccmode_cfb8 *ccaes_cfb8_decrypt_mode(void); | |
96 | const struct ccmode_xts *ccaes_xts_decrypt_mode(void); | |
97 | const struct ccmode_gcm *ccaes_gcm_decrypt_mode(void); | |
fe8ab488 | 98 | const struct ccmode_ccm *ccaes_ccm_decrypt_mode(void); |
316670eb A |
99 | |
100 | const struct ccmode_ctr *ccaes_ctr_crypt_mode(void); | |
101 | const struct ccmode_ofb *ccaes_ofb_crypt_mode(void); | |
102 | ||
39037602 A |
103 | const struct ccmode_siv *ccaes_siv_encrypt_mode(void); |
104 | const struct ccmode_siv *ccaes_siv_decrypt_mode(void); | |
105 | ||
316670eb | 106 | #endif /* _CORECRYPTO_CCAES_H_ */ |