]>
git.saurik.com Git - apple/xnu.git/blob - EXTERNAL_HEADERS/corecrypto/ccmode_factory.h
5 * Created on 01/21/2011
7 * Copyright (c) 2011,2012,2013,2014,2015 Apple Inc. All rights reserved.
11 #ifndef _CORECRYPTO_CCMODE_FACTORY_H_
12 #define _CORECRYPTO_CCMODE_FACTORY_H_
14 #include <corecrypto/ccn.h> /* TODO: Remove dependency on this header. */
15 #include <corecrypto/ccmode_impl.h>
17 /* Functions defined in this file are only to be used
18 within corecrypto files.
21 /* Use these function to runtime initialize a ccmode_cbc decrypt object (for
22 example if it's part of a larger structure). Normally you would pass a
23 ecb decrypt mode implementation of some underlying algorithm as the ecb
25 void ccmode_factory_cbc_decrypt(struct ccmode_cbc
*cbc
,
26 const struct ccmode_ecb
*ecb
);
28 /* Use these function to runtime initialize a ccmode_cbc encrypt object (for
29 example if it's part of a larger structure). Normally you would pass a
30 ecb encrypt mode implementation of some underlying algorithm as the ecb
32 void ccmode_factory_cbc_encrypt(struct ccmode_cbc
*cbc
,
33 const struct ccmode_ecb
*ecb
);
36 /* Use these function to runtime initialize a ccmode_cfb decrypt object (for
37 example if it's part of a larger structure). Normally you would pass a
38 ecb encrypt mode implementation of some underlying algorithm as the ecb
40 void ccmode_factory_cfb_decrypt(struct ccmode_cfb
*cfb
,
41 const struct ccmode_ecb
*ecb
);
43 /* Use these function to runtime initialize a ccmode_cfb encrypt object (for
44 example if it's part of a larger structure). Normally you would pass a
45 ecb encrypt mode implementation of some underlying algorithm as the ecb
47 void ccmode_factory_cfb_encrypt(struct ccmode_cfb
*cfb
,
48 const struct ccmode_ecb
*ecb
);
50 /* Use these function to runtime initialize a ccmode_cfb8 decrypt object (for
51 example if it's part of a larger structure). Normally you would pass a
52 ecb decrypt mode implementation of some underlying algorithm as the ecb
54 void ccmode_factory_cfb8_decrypt(struct ccmode_cfb8
*cfb8
,
55 const struct ccmode_ecb
*ecb
);
57 /* Use these function to runtime initialize a ccmode_cfb8 encrypt object (for
58 example if it's part of a larger structure). Normally you would pass a
59 ecb encrypt mode implementation of some underlying algorithm as the ecb
61 void ccmode_factory_cfb8_encrypt(struct ccmode_cfb8
*cfb8
,
62 const struct ccmode_ecb
*ecb
);
64 /* Use these function to runtime initialize a ccmode_ctr decrypt object (for
65 example if it's part of a larger structure). Normally you would pass a
66 ecb encrypt mode implementation of some underlying algorithm as the ecb
68 void ccmode_factory_ctr_crypt(struct ccmode_ctr
*ctr
,
69 const struct ccmode_ecb
*ecb
);
71 /* Use these function to runtime initialize a ccmode_gcm decrypt object (for
72 example if it's part of a larger structure). For GCM you always pass a
73 ecb encrypt mode implementation of some underlying algorithm as the ecb
75 void ccmode_factory_gcm_decrypt(struct ccmode_gcm
*gcm
,
76 const struct ccmode_ecb
*ecb_encrypt
);
78 /* Use these function to runtime initialize a ccmode_gcm encrypt object (for
79 example if it's part of a larger structure). For GCM you always pass a
80 ecb encrypt mode implementation of some underlying algorithm as the ecb
82 void ccmode_factory_gcm_encrypt(struct ccmode_gcm
*gcm
,
83 const struct ccmode_ecb
*ecb_encrypt
);
85 /* Use these function to runtime initialize a ccmode_ccm decrypt object (for
86 example if it's part of a larger structure). For CCM you always pass a
87 ecb encrypt mode implementation of some underlying algorithm as the ecb
90 void ccmode_factory_ccm_decrypt(struct ccmode_ccm
*ccm
,
91 const struct ccmode_ecb
*ecb_encrypt
);
93 /* Use these function to runtime initialize a ccmode_ccm encrypt object (for
94 example if it's part of a larger structure). For CCM you always pass a
95 ecb encrypt mode implementation of some underlying algorithm as the ecb
97 void ccmode_factory_ccm_encrypt(struct ccmode_ccm
*ccm
,
98 const struct ccmode_ecb
*ecb_encrypt
);
100 /* Use these function to runtime initialize a ccmode_ofb encrypt object (for
101 example if it's part of a larger structure). Normally you would pass a
102 ecb encrypt mode implementation of some underlying algorithm as the ecb
104 void ccmode_factory_ofb_crypt(struct ccmode_ofb
*ofb
,
105 const struct ccmode_ecb
*ecb
);
107 /* Use these function to runtime initialize a ccmode_omac decrypt object (for
108 example if it's part of a larger structure). Normally you would pass a
109 ecb decrypt mode implementation of some underlying algorithm as the ecb
111 void ccmode_factory_omac_decrypt(struct ccmode_omac
*omac
,
112 const struct ccmode_ecb
*ecb
);
114 /* Use these function to runtime initialize a ccmode_omac encrypt object (for
115 example if it's part of a larger structure). Normally you would pass a
116 ecb encrypt mode implementation of some underlying algorithm as the ecb
118 void ccmode_factory_omac_encrypt(struct ccmode_omac
*omac
,
119 const struct ccmode_ecb
*ecb
);
121 /* Use these function to runtime initialize a ccmode_xts decrypt object (for
122 example if it's part of a larger structure). Normally you would pass a
123 ecb decrypt mode implementation of some underlying algorithm as the ecb
125 void ccmode_factory_xts_decrypt(struct ccmode_xts
*xts
,
126 const struct ccmode_ecb
*ecb
,
127 const struct ccmode_ecb
*ecb_encrypt
);
129 /* Use these function to runtime initialize a ccmode_xts encrypt object (for
130 example if it's part of a larger structure). Normally you would pass a
131 ecb encrypt mode implementation of some underlying algorithm as the ecb
133 void ccmode_factory_xts_encrypt(struct ccmode_xts
*xts
,
134 const struct ccmode_ecb
*ecb
,
135 const struct ccmode_ecb
*ecb_encrypt
);
137 #endif /* _CORECRYPTO_CCMODE_FACTORY_H_ */