]> git.saurik.com Git - apple/xnu.git/blob - EXTERNAL_HEADERS/corecrypto/ccmode_factory.h
xnu-6153.11.26.tar.gz
[apple/xnu.git] / EXTERNAL_HEADERS / corecrypto / ccmode_factory.h
1 /*
2 * ccmode_factory.h
3 * corecrypto
4 *
5 * Created on 01/21/2011
6 *
7 * Copyright (c) 2011,2012,2013,2014,2015 Apple Inc. All rights reserved.
8 *
9 */
10
11 #ifndef _CORECRYPTO_CCMODE_FACTORY_H_
12 #define _CORECRYPTO_CCMODE_FACTORY_H_
13
14 #include <corecrypto/ccn.h> /* TODO: Remove dependency on this header. */
15 #include <corecrypto/ccmode_impl.h>
16
17 /* Functions defined in this file are only to be used
18 within corecrypto files.
19 */
20
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
24 parameter. */
25 void ccmode_factory_cbc_decrypt(struct ccmode_cbc *cbc,
26 const struct ccmode_ecb *ecb);
27
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
31 parameter. */
32 void ccmode_factory_cbc_encrypt(struct ccmode_cbc *cbc,
33 const struct ccmode_ecb *ecb);
34
35
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
39 parameter. */
40 void ccmode_factory_cfb_decrypt(struct ccmode_cfb *cfb,
41 const struct ccmode_ecb *ecb);
42
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
46 parameter. */
47 void ccmode_factory_cfb_encrypt(struct ccmode_cfb *cfb,
48 const struct ccmode_ecb *ecb);
49
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
53 parameter. */
54 void ccmode_factory_cfb8_decrypt(struct ccmode_cfb8 *cfb8,
55 const struct ccmode_ecb *ecb);
56
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
60 parameter. */
61 void ccmode_factory_cfb8_encrypt(struct ccmode_cfb8 *cfb8,
62 const struct ccmode_ecb *ecb);
63
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
67 parameter. */
68 void ccmode_factory_ctr_crypt(struct ccmode_ctr *ctr,
69 const struct ccmode_ecb *ecb);
70
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
74 parameter. */
75 void ccmode_factory_gcm_decrypt(struct ccmode_gcm *gcm,
76 const struct ccmode_ecb *ecb_encrypt);
77
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
81 parameter. */
82 void ccmode_factory_gcm_encrypt(struct ccmode_gcm *gcm,
83 const struct ccmode_ecb *ecb_encrypt);
84
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
88 parameter. */
89
90 void ccmode_factory_ccm_decrypt(struct ccmode_ccm *ccm,
91 const struct ccmode_ecb *ecb_encrypt);
92
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
96 parameter. */
97 void ccmode_factory_ccm_encrypt(struct ccmode_ccm *ccm,
98 const struct ccmode_ecb *ecb_encrypt);
99
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
103 parameter. */
104 void ccmode_factory_ofb_crypt(struct ccmode_ofb *ofb,
105 const struct ccmode_ecb *ecb);
106
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
110 parameter. */
111 void ccmode_factory_omac_decrypt(struct ccmode_omac *omac,
112 const struct ccmode_ecb *ecb);
113
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
117 parameter. */
118 void ccmode_factory_omac_encrypt(struct ccmode_omac *omac,
119 const struct ccmode_ecb *ecb);
120
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
124 parameter. */
125 void ccmode_factory_xts_decrypt(struct ccmode_xts *xts,
126 const struct ccmode_ecb *ecb,
127 const struct ccmode_ecb *ecb_encrypt);
128
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
132 parameter. */
133 void ccmode_factory_xts_encrypt(struct ccmode_xts *xts,
134 const struct ccmode_ecb *ecb,
135 const struct ccmode_ecb *ecb_encrypt);
136
137 #endif /* _CORECRYPTO_CCMODE_FACTORY_H_ */