]>
Commit | Line | Data |
---|---|---|
316670eb A |
1 | /* |
2 | * ccaes.h | |
3 | * corecrypto | |
4 | * | |
5 | * Created by Michael Brouwer on 12/10/10. | |
6 | * Copyright 2010,2011 Apple Inc. All rights reserved. | |
7 | * | |
8 | */ | |
9 | ||
10 | #ifndef _CORECRYPTO_CCAES_H_ | |
11 | #define _CORECRYPTO_CCAES_H_ | |
12 | ||
13 | #include <corecrypto/cc_config.h> | |
14 | #include <corecrypto/ccmode.h> | |
15 | ||
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 | |
20 | ||
21 | extern const struct ccmode_ecb ccaes_ltc_ecb_decrypt_mode; | |
22 | extern const struct ccmode_ecb ccaes_ltc_ecb_encrypt_mode; | |
23 | ||
24 | extern const struct ccmode_cbc ccaes_gladman_cbc_encrypt_mode; | |
25 | extern const struct ccmode_cbc ccaes_gladman_cbc_decrypt_mode; | |
26 | ||
27 | #if CCAES_ARM | |
28 | extern const struct ccmode_ecb ccaes_arm_ecb_encrypt_mode; | |
29 | extern const struct ccmode_ecb ccaes_arm_ecb_decrypt_mode; | |
30 | ||
31 | extern const struct ccmode_cbc ccaes_arm_cbc_encrypt_mode; | |
32 | extern const struct ccmode_cbc ccaes_arm_cbc_decrypt_mode; | |
33 | #endif | |
34 | ||
35 | #if CCAES_INTEL | |
36 | //extern const struct ccmode_ecb ccaes_intel_ecb_encrypt_mode; | |
37 | //extern const struct ccmode_ecb ccaes_intel_ecb_decrypt_mode; | |
38 | ||
39 | extern const struct ccmode_ecb ccaes_intel_ecb_encrypt_opt_mode; | |
40 | extern const struct ccmode_ecb ccaes_intel_ecb_encrypt_aesni_mode; | |
41 | ||
42 | extern const struct ccmode_ecb ccaes_intel_ecb_decrypt_opt_mode; | |
43 | extern const struct ccmode_ecb ccaes_intel_ecb_decrypt_aesni_mode; | |
44 | ||
45 | //extern const struct ccmode_cbc ccaes_intel_cbc_encrypt_mode; | |
46 | //extern const struct ccmode_cbc ccaes_intel_cbc_decrypt_mode; | |
47 | ||
48 | extern const struct ccmode_cbc ccaes_intel_cbc_encrypt_opt_mode; | |
49 | extern const struct ccmode_cbc ccaes_intel_cbc_encrypt_aesni_mode; | |
50 | ||
51 | extern const struct ccmode_cbc ccaes_intel_cbc_decrypt_opt_mode; | |
52 | extern const struct ccmode_cbc ccaes_intel_cbc_decrypt_aesni_mode; | |
53 | ||
54 | //extern const struct ccmode_xts ccaes_intel_xts_encrypt_mode; | |
55 | //extern const struct ccmode_xts ccaes_intel_xts_decrypt_mode; | |
56 | ||
57 | extern const struct ccmode_xts ccaes_intel_xts_encrypt_opt_mode; | |
58 | extern const struct ccmode_xts ccaes_intel_xts_encrypt_aesni_mode; | |
59 | ||
60 | extern const struct ccmode_xts ccaes_intel_xts_decrypt_opt_mode; | |
61 | extern const struct ccmode_xts ccaes_intel_xts_decrypt_aesni_mode; | |
62 | #endif | |
63 | ||
64 | ||
65 | /* Implementation Selectors: */ | |
66 | const struct ccmode_ecb *ccaes_ecb_encrypt_mode(void); | |
67 | const struct ccmode_cbc *ccaes_cbc_encrypt_mode(void); | |
68 | const struct ccmode_cfb *ccaes_cfb_encrypt_mode(void); | |
69 | const struct ccmode_cfb8 *ccaes_cfb8_encrypt_mode(void); | |
70 | const struct ccmode_xts *ccaes_xts_encrypt_mode(void); | |
71 | const struct ccmode_gcm *ccaes_gcm_encrypt_mode(void); | |
72 | ||
73 | const struct ccmode_ecb *ccaes_ecb_decrypt_mode(void); | |
74 | const struct ccmode_cbc *ccaes_cbc_decrypt_mode(void); | |
75 | const struct ccmode_cfb *ccaes_cfb_decrypt_mode(void); | |
76 | const struct ccmode_cfb8 *ccaes_cfb8_decrypt_mode(void); | |
77 | const struct ccmode_xts *ccaes_xts_decrypt_mode(void); | |
78 | const struct ccmode_gcm *ccaes_gcm_decrypt_mode(void); | |
79 | ||
80 | const struct ccmode_ctr *ccaes_ctr_crypt_mode(void); | |
81 | const struct ccmode_ofb *ccaes_ofb_crypt_mode(void); | |
82 | ||
83 | #endif /* _CORECRYPTO_CCAES_H_ */ |