Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
acir_format::tests Namespace Reference

Classes

class  BigIntTests
 
class  EcOperations
 
class  MSMTests
 
class  Poseidon2Tests
 
class  Sha256Tests
 

Typedefs

using fr = field< Bn254FrParams >
 
using curve_ct = bb::stdlib::secp256k1< Builder >
 

Functions

std::tuple< BigIntFromLeBytes, BigIntFromLeBytes, BigIntOperation, BigIntToLeBytesgenerate_big_int_op_constraint_with_modulus (BigIntOperationType op, fr lhs, fr rhs, WitnessVector &witness_values, const std::vector< uint32_t > &modulus)
 
std::tuple< BigIntFromLeBytes, BigIntFromLeBytes, BigIntOperation, BigIntToLeBytesgenerate_big_int_op_constraint (BigIntOperationType op, fr lhs, fr rhs, WitnessVector &witness_values)
 
std::tuple< BigIntFromLeBytes, BigIntFromLeBytes, BigIntOperation, BigIntToLeBytesgenerate_big_int_op_constraint_secpk1_fr (BigIntOperationType op, fr lhs, fr rhs, WitnessVector &witness_values)
 
std::tuple< BigIntFromLeBytes, BigIntFromLeBytes, BigIntOperation, BigIntToLeBytesgenerate_big_int_op_constraint_secpk1_fq (BigIntOperationType op, fr lhs, fr rhs, WitnessVector &witness_values)
 
void apply_constraints (AcirFormat &constraint_system, std::tuple< BigIntFromLeBytes, BigIntFromLeBytes, BigIntOperation, BigIntToLeBytes > constraints)
 
std::tuple< BigIntOperation, BigIntToLeBytesgenerate_big_int_op_constraint_with_id (BigIntOperationType op, uint32_t lhs_id, uint32_t rhs_id, WitnessVector &witness_values)
 
 TEST_F (BigIntTests, TestBigIntConstraintMultiple)
 
 TEST_F (BigIntTests, TestBigIntConstraintSimple)
 
 TEST_F (BigIntTests, TestBigIntConstraintReuse)
 
 TEST_F (BigIntTests, TestBigIntConstraintReuse2)
 
 TEST_F (BigIntTests, TestBigIntDIV)
 
size_t generate_ec_add_constraint (EcAdd &ec_add_constraint, WitnessVector &witness_values)
 
 TEST_F (EcOperations, TestECOperations)
 
 TEST_F (EcOperations, TestECMultiScalarMul)
 
 TEST_F (MSMTests, TestMSM)
 Create a circuit testing the a simple scalar mul with a constant generator.
 
 TEST_F (Poseidon2Tests, TestPoseidon2Permutation)
 Create a circuit testing the Poseidon2 permutation function.
 
 TEST_F (Sha256Tests, TestSha256Compression)
 

Typedef Documentation

◆ curve_ct

◆ fr

Function Documentation

◆ apply_constraints()

void acir_format::tests::apply_constraints ( AcirFormat constraint_system,
std::tuple< BigIntFromLeBytes, BigIntFromLeBytes, BigIntOperation, BigIntToLeBytes constraints 
)

Definition at line 109 of file bigint_constraint.test.cpp.

◆ generate_big_int_op_constraint()

std::tuple< BigIntFromLeBytes, BigIntFromLeBytes, BigIntOperation, BigIntToLeBytes > acir_format::tests::generate_big_int_op_constraint ( BigIntOperationType  op,
fr  lhs,
fr  rhs,
WitnessVector witness_values 
)

Definition at line 77 of file bigint_constraint.test.cpp.

◆ generate_big_int_op_constraint_secpk1_fq()

std::tuple< BigIntFromLeBytes, BigIntFromLeBytes, BigIntOperation, BigIntToLeBytes > acir_format::tests::generate_big_int_op_constraint_secpk1_fq ( BigIntOperationType  op,
fr  lhs,
fr  rhs,
WitnessVector witness_values 
)

Definition at line 102 of file bigint_constraint.test.cpp.

◆ generate_big_int_op_constraint_secpk1_fr()

std::tuple< BigIntFromLeBytes, BigIntFromLeBytes, BigIntOperation, BigIntToLeBytes > acir_format::tests::generate_big_int_op_constraint_secpk1_fr ( BigIntOperationType  op,
fr  lhs,
fr  rhs,
WitnessVector witness_values 
)

Definition at line 93 of file bigint_constraint.test.cpp.

◆ generate_big_int_op_constraint_with_id()

std::tuple< BigIntOperation, BigIntToLeBytes > acir_format::tests::generate_big_int_op_constraint_with_id ( BigIntOperationType  op,
uint32_t  lhs_id,
uint32_t  rhs_id,
WitnessVector witness_values 
)

Definition at line 118 of file bigint_constraint.test.cpp.

◆ generate_big_int_op_constraint_with_modulus()

std::tuple< BigIntFromLeBytes, BigIntFromLeBytes, BigIntOperation, BigIntToLeBytes > acir_format::tests::generate_big_int_op_constraint_with_modulus ( BigIntOperationType  op,
fr  lhs,
fr  rhs,
WitnessVector witness_values,
const std::vector< uint32_t > &  modulus 
)

Definition at line 21 of file bigint_constraint.test.cpp.

◆ generate_ec_add_constraint()

size_t acir_format::tests::generate_ec_add_constraint ( EcAdd ec_add_constraint,
WitnessVector witness_values 
)

Definition at line 21 of file ec_operations.test.cpp.

◆ TEST_F() [1/10]

acir_format::tests::TEST_F ( BigIntTests  ,
TestBigIntConstraintMultiple   
)

Definition at line 161 of file bigint_constraint.test.cpp.

◆ TEST_F() [2/10]

acir_format::tests::TEST_F ( BigIntTests  ,
TestBigIntConstraintReuse   
)

Definition at line 234 of file bigint_constraint.test.cpp.

◆ TEST_F() [3/10]

acir_format::tests::TEST_F ( BigIntTests  ,
TestBigIntConstraintReuse2   
)

Definition at line 266 of file bigint_constraint.test.cpp.

◆ TEST_F() [4/10]

acir_format::tests::TEST_F ( BigIntTests  ,
TestBigIntConstraintSimple   
)

Definition at line 189 of file bigint_constraint.test.cpp.

◆ TEST_F() [5/10]

acir_format::tests::TEST_F ( BigIntTests  ,
TestBigIntDIV   
)

Definition at line 298 of file bigint_constraint.test.cpp.

◆ TEST_F() [6/10]

acir_format::tests::TEST_F ( EcOperations  ,
TestECMultiScalarMul   
)

Definition at line 74 of file ec_operations.test.cpp.

◆ TEST_F() [7/10]

acir_format::tests::TEST_F ( EcOperations  ,
TestECOperations   
)

Definition at line 52 of file ec_operations.test.cpp.

◆ TEST_F() [8/10]

acir_format::tests::TEST_F ( MSMTests  ,
TestMSM   
)

Create a circuit testing the a simple scalar mul with a constant generator.

Definition at line 25 of file multi_scalar_mul.test.cpp.

◆ TEST_F() [9/10]

acir_format::tests::TEST_F ( Poseidon2Tests  ,
TestPoseidon2Permutation   
)

Create a circuit testing the Poseidon2 permutation function.

Definition at line 25 of file poseidon2_constraint.test.cpp.

◆ TEST_F() [10/10]

acir_format::tests::TEST_F ( Sha256Tests  ,
TestSha256Compression   
)

Definition at line 19 of file sha256_constraint.test.cpp.