5 * Created by Michael Brouwer on 12/10/10.
6 * Copyright 2010,2011 Apple Inc. All rights reserved.
10 #ifndef _CORECRYPTO_CCAES_H_
11 #define _CORECRYPTO_CCAES_H_
13 #include <corecrypto/cc_config.h>
14 #include <corecrypto/ccmode.h>
16 #define CCAES_BLOCK_SIZE 16
17 #define CCAES_KEY_SIZE_128 16
18 #define CCAES_KEY_SIZE_192 24
19 #define CCAES_KEY_SIZE_256 32
21 extern const struct ccmode_ecb ccaes_ltc_ecb_decrypt_mode
;
22 extern const struct ccmode_ecb ccaes_ltc_ecb_encrypt_mode
;
24 extern const struct ccmode_cbc ccaes_gladman_cbc_encrypt_mode
;
25 extern const struct ccmode_cbc ccaes_gladman_cbc_decrypt_mode
;
28 extern const struct ccmode_ecb ccaes_arm_ecb_encrypt_mode
;
29 extern const struct ccmode_ecb ccaes_arm_ecb_decrypt_mode
;
31 extern const struct ccmode_cbc ccaes_arm_cbc_encrypt_mode
;
32 extern const struct ccmode_cbc ccaes_arm_cbc_decrypt_mode
;
36 extern const struct ccmode_cbc ccaes_ios_hardware_cbc_encrypt_mode
;
37 extern const struct ccmode_cbc ccaes_ios_hardware_cbc_decrypt_mode
;
39 extern const struct ccmode_cbc
*ccaes_ios_mux_cbc_encrypt_mode(void);
40 extern const struct ccmode_cbc
*ccaes_ios_mux_cbc_decrypt_mode(void);
44 //extern const struct ccmode_ecb ccaes_intel_ecb_encrypt_mode;
45 //extern const struct ccmode_ecb ccaes_intel_ecb_decrypt_mode;
47 extern const struct ccmode_ecb ccaes_intel_ecb_encrypt_opt_mode
;
48 extern const struct ccmode_ecb ccaes_intel_ecb_encrypt_aesni_mode
;
50 extern const struct ccmode_ecb ccaes_intel_ecb_decrypt_opt_mode
;
51 extern const struct ccmode_ecb ccaes_intel_ecb_decrypt_aesni_mode
;
53 //extern const struct ccmode_cbc ccaes_intel_cbc_encrypt_mode;
54 //extern const struct ccmode_cbc ccaes_intel_cbc_decrypt_mode;
56 extern const struct ccmode_cbc ccaes_intel_cbc_encrypt_opt_mode
;
57 extern const struct ccmode_cbc ccaes_intel_cbc_encrypt_aesni_mode
;
59 extern const struct ccmode_cbc ccaes_intel_cbc_decrypt_opt_mode
;
60 extern const struct ccmode_cbc ccaes_intel_cbc_decrypt_aesni_mode
;
62 //extern const struct ccmode_xts ccaes_intel_xts_encrypt_mode;
63 //extern const struct ccmode_xts ccaes_intel_xts_decrypt_mode;
65 extern const struct ccmode_xts ccaes_intel_xts_encrypt_opt_mode
;
66 extern const struct ccmode_xts ccaes_intel_xts_encrypt_aesni_mode
;
68 extern const struct ccmode_xts ccaes_intel_xts_decrypt_opt_mode
;
69 extern const struct ccmode_xts ccaes_intel_xts_decrypt_aesni_mode
;
73 /* Implementation Selectors: */
74 const struct ccmode_ecb
*ccaes_ecb_encrypt_mode(void);
75 const struct ccmode_cbc
*ccaes_cbc_encrypt_mode(void);
76 const struct ccmode_cfb
*ccaes_cfb_encrypt_mode(void);
77 const struct ccmode_cfb8
*ccaes_cfb8_encrypt_mode(void);
78 const struct ccmode_xts
*ccaes_xts_encrypt_mode(void);
79 const struct ccmode_gcm
*ccaes_gcm_encrypt_mode(void);
80 const struct ccmode_ccm
*ccaes_ccm_encrypt_mode(void);
82 const struct ccmode_ecb
*ccaes_ecb_decrypt_mode(void);
83 const struct ccmode_cbc
*ccaes_cbc_decrypt_mode(void);
84 const struct ccmode_cfb
*ccaes_cfb_decrypt_mode(void);
85 const struct ccmode_cfb8
*ccaes_cfb8_decrypt_mode(void);
86 const struct ccmode_xts
*ccaes_xts_decrypt_mode(void);
87 const struct ccmode_gcm
*ccaes_gcm_decrypt_mode(void);
88 const struct ccmode_ccm
*ccaes_ccm_decrypt_mode(void);
90 const struct ccmode_ctr
*ccaes_ctr_crypt_mode(void);
91 const struct ccmode_ofb
*ccaes_ofb_crypt_mode(void);
93 #endif /* _CORECRYPTO_CCAES_H_ */