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