1 /* 2 * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"). 5 * You may not use this file except in compliance with the License. 6 * A copy of the License is located at 7 * 8 * http://aws.amazon.com/apache2.0 9 * 10 * or in the "license" file accompanying this file. This file is distributed 11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 * express or implied. See the License for the specific language governing 13 * permissions and limitations under the License. 14 * The license is detailed in the file LICENSE.md, and applies to this file. 15 * 16 * Written by Nir Drucker and Shay Gueron 17 * AWS Cryptographic Algorithms Group. 18 * (ndrucker@amazon.com, gueron@amazon.com) 19 */ 20 21 #ifndef __FUNCTIONS_RENAMING_H_INCLUDED__ 22 #define __FUNCTIONS_RENAMING_H_INCLUDED__ 23 24 #define PASTER(x, y) x##_##y 25 #define EVALUATOR(x, y) PASTER(x, y) 26 #define RENAME_FUNC_NAME(fname) EVALUATOR(FUNC_PREFIX, fname) 27 28 #define keypair RENAME_FUNC_NAME(keypair) 29 #define decaps RENAME_FUNC_NAME(decaps) 30 #define encaps RENAME_FUNC_NAME(encaps) 31 32 #define aes_ctr_prf RENAME_FUNC_NAME(aes_ctr_prf) 33 #define sample_uniform_r_bits_with_fixed_prf_context \ 34 RENAME_FUNC_NAME(sample_uniform_r_bits_with_fixed_prf_context) 35 #define init_aes_ctr_prf_state RENAME_FUNC_NAME(init_aes_ctr_prf_state) 36 #define generate_sparse_rep RENAME_FUNC_NAME(generate_sparse_rep) 37 #define parallel_hash RENAME_FUNC_NAME(parallel_hash) 38 #define decode RENAME_FUNC_NAME(decode) 39 #define print_BE RENAME_FUNC_NAME(print_BE) 40 #define print_LE RENAME_FUNC_NAME(print_LE) 41 #define gf2x_mod_mul RENAME_FUNC_NAME(gf2x_mod_mul) 42 #define secure_set_bits RENAME_FUNC_NAME(secure_set_bits) 43 #define sha RENAME_FUNC_NAME(sha) 44 #define count_ones RENAME_FUNC_NAME(count_ones) 45 #define sha_mb RENAME_FUNC_NAME(sha_mb) 46 #define split_e RENAME_FUNC_NAME(split_e) 47 #define compute_syndrome RENAME_FUNC_NAME(compute_syndrome) 48 #define bike_errno RENAME_FUNC_NAME(bike_errno) 49 #define cyclic_product RENAME_FUNC_NAME(cyclic_product) 50 #define ossl_add RENAME_FUNC_NAME(ossl_add) 51 #define karatzuba_add1 RENAME_FUNC_NAME(karatzuba_add1) 52 #define karatzuba_add2 RENAME_FUNC_NAME(karatzuba_add2) 53 #define gf2x_add RENAME_FUNC_NAME(gf2x_add) 54 #define gf2_muladd_4x4 RENAME_FUNC_NAME(gf2_muladd_4x4) 55 #define red RENAME_FUNC_NAME(red) 56 #define gf2x_mul_1x1 RENAME_FUNC_NAME(gf2x_mul_1x1) 57 #define rotate_right RENAME_FUNC_NAME(rotate_right) 58 #define r_bits_vector_weight RENAME_FUNC_NAME(r_bits_vector_weight) 59 60 #endif //__FUNCTIONS_RENAMING_H_INCLUDED__ 61