1 /* 2 * Copyright 2023 Google LLC. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * https://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef PRIVATE_JOIN_AND_COMPUTE_ANONYMOUS_COUNTING_TOKENS_ACT_V0_PARAMETERS_H_ 17 #define PRIVATE_JOIN_AND_COMPUTE_ANONYMOUS_COUNTING_TOKENS_ACT_V0_PARAMETERS_H_ 18 19 #include <string> 20 21 #include "act/act.pb.h" 22 #include "private_join_and_compute/crypto/openssl.inc" 23 24 namespace private_join_and_compute { 25 namespace anonymous_counting_tokens { 26 27 const int kDefaultSecurityParameter = 128; 28 const int kDefaultChallengeLength = 128; 29 const int kDefaultCamenischShoupS = 1; 30 const int kDefaultCurveId = NID_X9_62_prime256v1; 31 const int kDefaultModulusLengthBits = 3072; 32 33 // Returns parameters appropriate only for testing (smaller modulus of 1536 34 // bits, smaller batch size of 3). 35 SchemeParameters ActV0TestSchemeParameters(); 36 37 // Returns parameters supporting 16 messages in a batch, with both Pedersen and 38 // CS parameters set to 16, and modulus length 3072. 39 SchemeParameters ActV0Batch16SchemeParameters(); 40 41 // Returns parameters supporting 32 messages in a batch, with both Pedersen and 42 // CS parameters set to 32, and modulus length 3072. 43 SchemeParameters ActV0Batch32SchemeParameters(); 44 45 // Returns parameters supporting 32 messages in a batch, with CS vector 46 // encryption length set to 2, and modulus length 2048. 47 // 48 // These parameters are currently the best-optimized for performance. 49 SchemeParameters 50 ActV0SchemeParametersPedersen32Modulus2048CamenischShoupVector2(); 51 52 // Returns custom parameters. 53 SchemeParameters ActV0SchemeParameters(int pedersen_batch_size, 54 int modulus_length_bits, 55 int camenisch_shoup_vector_length); 56 57 } // namespace anonymous_counting_tokens 58 } // namespace private_join_and_compute 59 60 #endif // PRIVATE_JOIN_AND_COMPUTE_ANONYMOUS_COUNTING_TOKENS_ACT_V0_PARAMETERS_H_ 61