1 | /* Copyright (c) (2021-2023) Apple Inc. All rights reserved. |
2 | * |
3 | * corecrypto is licensed under Apple Inc.’s Internal Use License Agreement (which |
4 | * is contained in the License.txt file distributed with corecrypto) and only to |
5 | * people who accept that license. IMPORTANT: Any license rights granted to you by |
6 | * Apple Inc. (if any) are limited to internal use within your organization only on |
7 | * devices and computers you own or control, for the sole purpose of verifying the |
8 | * security characteristics and correct functioning of the Apple Software. You may |
9 | * not, directly or indirectly, redistribute the Apple Software or any portions thereof. |
10 | * |
11 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ |
12 | * |
13 | * This file contains Original Code and/or Modifications of Original Code |
14 | * as defined in and that are subject to the Apple Public Source License |
15 | * Version 2.0 (the 'License'). You may not use this file except in |
16 | * compliance with the License. The rights granted to you under the License |
17 | * may not be used to create, or enable the creation or redistribution of, |
18 | * unlawful or unlicensed copies of an Apple operating system, or to |
19 | * circumvent, violate, or enable the circumvention or violation of, any |
20 | * terms of an Apple operating system software license agreement. |
21 | * |
22 | * Please obtain a copy of the License at |
23 | * http://www.opensource.apple.com/apsl/ and read it before using this file. |
24 | * |
25 | * The Original Code and all software distributed under the License are |
26 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER |
27 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, |
28 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, |
29 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. |
30 | * Please see the License for the specific language governing rights and |
31 | * limitations under the License. |
32 | * |
33 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ |
34 | */ |
35 | |
36 | #ifndef _CORECRYPTO_CC_WORKSPACES_H_ |
37 | #define _CORECRYPTO_CC_WORKSPACES_H_ |
38 | |
39 | CC_PURE size_t sizeof_cc_unit(void); |
40 | |
41 | CC_PURE size_t sizeof_struct_ccbfv_cipher_plain_ctx(void); |
42 | |
43 | CC_PURE size_t sizeof_struct_ccbfv_ciphertext(void); |
44 | |
45 | CC_PURE size_t sizeof_struct_ccbfv_dcrt_plaintext(void); |
46 | |
47 | CC_PURE size_t sizeof_struct_ccbfv_decrypt_ctx(void); |
48 | |
49 | CC_PURE size_t sizeof_struct_ccbfv_encrypt_params(void); |
50 | |
51 | CC_PURE size_t sizeof_struct_ccbfv_galois_key(void); |
52 | |
53 | CC_PURE size_t sizeof_struct_ccbfv_param_ctx(void); |
54 | |
55 | CC_PURE size_t sizeof_struct_ccbfv_plaintext(void); |
56 | |
57 | CC_PURE size_t sizeof_struct_ccbfv_relin_key(void); |
58 | |
59 | CC_PURE size_t sizeof_struct_ccdh_full_ctx(void); |
60 | |
61 | CC_PURE size_t sizeof_struct_ccdh_pub_ctx(void); |
62 | |
63 | CC_PURE size_t sizeof_struct_ccec_full_ctx(void); |
64 | |
65 | CC_PURE size_t sizeof_struct_ccec_pub_ctx(void); |
66 | |
67 | CC_PURE size_t sizeof_struct_ccpolyzp_po2cyc(void); |
68 | |
69 | CC_PURE size_t sizeof_struct_ccpolyzp_po2cyc_base_convert(void); |
70 | |
71 | CC_PURE size_t sizeof_struct_ccpolyzp_po2cyc_block_rng_state(void); |
72 | |
73 | CC_PURE size_t sizeof_struct_ccpolyzp_po2cyc_ctx(void); |
74 | |
75 | CC_PURE size_t sizeof_struct_ccpolyzp_po2cyc_ctx_chain(void); |
76 | |
77 | CC_PURE size_t sizeof_struct_ccrns_mul_modulus(void); |
78 | |
79 | CC_PURE size_t sizeof_struct_ccrsa_full_ctx(void); |
80 | |
81 | CC_PURE size_t sizeof_struct_ccrsa_pub_ctx(void); |
82 | |
83 | CC_PURE size_t sizeof_struct_cczp(void); |
84 | |
85 | CC_PURE cc_size CCBFV_CIPHERTEXT_APPLY_GALOIS_WORKSPACE_N(cc_size degree, cc_size num_ctext_moduli); |
86 | |
87 | CC_PURE cc_size CCBFV_CIPHERTEXT_GALOIS_KEY_SWITCH_WORKSPACE_N(cc_size degree, cc_size num_galois_key_moduli); |
88 | |
89 | CC_PURE cc_size CCBFV_CIPHERTEXT_PLAINTEXT_ADD_WORKSPACE_N(cc_size degree); |
90 | |
91 | CC_PURE cc_size CCBFV_CIPHERTEXT_COEFF_PLAINTEXT_MUL_WORKSPACE_N(cc_size degree, cc_size num_moduli); |
92 | |
93 | CC_PURE cc_size CCBFV_CIPHERTEXT_EVAL_PLAINTEXT_MUL_WORKSPACE_N(cc_size degree, cc_size num_moduli); |
94 | |
95 | CC_PURE cc_size CCBFV_CIPHERTEXT_ROTATE_ROWS_LEFT_WORKSPACE_N(cc_size degree, cc_size num_ctext_moduli); |
96 | |
97 | CC_PURE cc_size CCBFV_CIPHERTEXT_ROTATE_ROWS_RIGHT_WORKSPACE_N(cc_size degree, cc_size num_ctext_moduli); |
98 | |
99 | CC_PURE cc_size CCBFV_CIPHERTEXT_SWAP_COLUMNS_WORKSPACE_N(cc_size degree, cc_size num_ctext_moduli); |
100 | |
101 | CC_PURE cc_size CCBFV_CIPHER_PLAIN_CTX_INIT_WORKSPACE_N(cc_size num_moduli); |
102 | |
103 | CC_PURE cc_size CCBFV_DECODE_SIMD_INT64_WORKSPACE_N(cc_size degree, cc_size num_moduli); |
104 | |
105 | CC_PURE cc_size CCBFV_DECODE_SIMD_UINT64_WORKSPACE_N(cc_size degree, cc_size num_moduli); |
106 | |
107 | CC_PURE cc_size CCBFV_DECRYPT_WORKSPACE_N(cc_size degree, cc_size num_moduli); |
108 | |
109 | CC_PURE cc_size CCBFV_DESERIALIZE_SEEDED_CIPHERTEXT_EVAL_WORKSPACE_N(cc_size degree); |
110 | |
111 | CC_PURE cc_size CCBFV_ENCRYPT_SYMMETRIC_WORKSPACE_N(cc_size degree, cc_size num_moduli); |
112 | |
113 | CC_PURE cc_size CCBFV_ENCRYPT_ZERO_SYMMETRIC_COEFF_WORKSPACE_N(cc_size degree, cc_size num_moduli); |
114 | |
115 | CC_PURE cc_size CCBFV_ENCRYPT_ZERO_SYMMETRIC_EVAL_WORKSPACE_N(cc_size degree, cc_size num_moduli); |
116 | |
117 | CC_PURE cc_size CCBFV_ENCRYPT_ZERO_SYMMETRIC_HELPER_WORKSPACE_N(cc_size degree, cc_size nmoduli); |
118 | |
119 | CC_PURE cc_size CCBFV_GALOIS_KEY_GENERATE_SINGLE_WORKSPACE_N(cc_size degree, cc_size num_moduli); |
120 | |
121 | CC_PURE cc_size CCBFV_GALOIS_KEY_GENERATE_WORKSPACE_N(cc_size degree, cc_size num_moduli); |
122 | |
123 | CC_PURE cc_size CCBFV_RELIN_KEY_GENERATE_WORKSPACE_N(cc_size degree, cc_size num_moduli); |
124 | |
125 | CC_PURE cc_size CCDH_POWER_BLINDED_WORKSPACE_N(cc_size n); |
126 | |
127 | CC_PURE cc_size CCEC_AFFINIFY_POINTS_WORKSPACE_N(cc_size n, cc_size npoints); |
128 | |
129 | CC_PURE cc_size CCN_P224_INV_ASM_WORKSPACE_N(cc_size n); |
130 | |
131 | CC_PURE cc_size CCN_P256_INV_ASM_WORKSPACE_N(cc_size n); |
132 | |
133 | CC_PURE cc_size CCN_P384_INV_ASM_WORKSPACE_N(cc_size n); |
134 | |
135 | CC_PURE cc_size CCN_SQR_WORKSPACE_N(cc_size n); |
136 | |
137 | CC_PURE cc_size CCPOLYZP_PO2CYC_BASE_CONVERT_DIVIDE_AND_ROUND_WORKSPACE_N(cc_size degree, cc_size num_moduli); |
138 | |
139 | CC_PURE cc_size CCPOLYZP_PO2CYC_BASE_CONVERT_INIT_PUNC_PROD_WORKSPACE_N(cc_size num_moduli); |
140 | |
141 | CC_PURE cc_size CCPOLYZP_PO2CYC_BASE_CONVERT_INIT_WORKSPACE_N(cc_size num_moduli); |
142 | |
143 | CC_PURE cc_size CCPOLYZP_PO2CYC_CTX_Q_PROD_WORKSPACE_N(cc_size num_moduli); |
144 | |
145 | CC_PURE cc_size CCPOLYZP_PO2CYC_CTX_WORKSPACE_N(cc_size degree); |
146 | |
147 | CC_PURE cc_size CCPOLYZP_PO2CYC_CTX_INIT_WORKSPACE_N(cc_size n); |
148 | |
149 | CC_PURE cc_size CCPOLYZP_PO2CYC_DESERIALIZE_POLY_WORKSPACE_N(cc_size degree); |
150 | |
151 | CC_PURE cc_size CCPOLYZP_PO2CYC_RANDOM_TERNARY_WORKSPACE_N(cc_size degree); |
152 | |
153 | CC_PURE cc_size CCPOLYZP_PO2CYC_RANDOM_UNIFORM_WORKSPACE_N(cc_size degree); |
154 | |
155 | CC_PURE cc_size CCPOLYZP_PO2CYC_RANDOM_CBD_WORKSPACE_N(cc_size degree); |
156 | |
157 | CC_PURE cc_size CCPOLYZP_PO2CYC_SERIALIZE_POLY_WORKSPACE_N(cc_size degree); |
158 | |
159 | CC_PURE cc_size CCPOLYZP_PO2CYC_WORKSPACE_N(cc_size degree, cc_size num_moduli); |
160 | |
161 | CC_PURE cc_size CCRSA_CRT_POWER_BLINDED_WORKSPACE_N(cc_size n); |
162 | |
163 | #include "cc_workspaces_generated.h" |
164 | |
165 | #endif // _CORECRYPTO_CC_WORKSPACES_H_ |
166 | |