|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
Public Types | |
| enum class | TamperingMode : std::uint8_t { XCoordinateOverflow , YCoordinateOverflow , InvalidR , InvalidS , HighS , ZeroR , ZeroS , InfinityScalarMul , InvalidPubKey , InfinityPubKey , None } |
| using | Builder = Curve::Builder |
| using | CurveType = std::conditional_t< Curve::type==bb::CurveType::SECP256K1, bb::curve::SECP256K1, bb::curve::SECP256R1 > |
| using | FrNative = Curve::ScalarFieldNative |
| using | FqNative = Curve::BaseFieldNative |
| using | G1Native = Curve::GroupNative |
| using | Fr = Curve::ScalarField |
| using | Fq = Curve::BaseField |
| using | G1 = Curve::Group |
| using | bool_t = stdlib::bool_t< Builder > |
Public Member Functions | |
| std::pair< ecdsa_key_pair< FrNative, G1Native >, ecdsa_signature > | generate_dummy_ecdsa_data (std::string message_string, bool random_signature) |
| void | tampering (std::string message_string, ecdsa_key_pair< FrNative, G1Native > &account, ecdsa_signature &signature, TamperingMode mode) |
| std::pair< G1, stdlib::ecdsa_signature< Builder > > | create_stdlib_ecdsa_data (Builder &builder, const ecdsa_key_pair< FrNative, G1Native > &account, const ecdsa_signature &signature, const TamperingMode mode) |
| void | ecdsa_verification_circuit (Builder &builder, const stdlib::byte_array< Builder > &hashed_message, const ecdsa_key_pair< FrNative, G1Native > &account, const ecdsa_signature &signature, const bool signature_verification_result, const bool expected_circuit_result, const TamperingMode mode) |
| void | test_verify_signature (bool random_signature, TamperingMode mode) |
| void | test_signature_generator (bool is_minus_generator, bool signature_result, bool expected_circuit_result) |
| void | test_signature_double_generator () |
| void | test_wycherproof (std::vector< stdlib::WycherproofTest< CurveType > > tests) |
| Construct tests based on data fetched from the Wycherproof project. | |
Static Public Attributes | |
| static constexpr FrNative | private_key |
Definition at line 18 of file ecdsa.test.cpp.
| using EcdsaTests< Curve >::bool_t = stdlib::bool_t<Builder> |
Definition at line 33 of file ecdsa.test.cpp.
| using EcdsaTests< Curve >::Builder = Curve::Builder |
Definition at line 20 of file ecdsa.test.cpp.
| using EcdsaTests< Curve >::CurveType = std::conditional_t<Curve::type == bb::CurveType::SECP256K1, bb::curve::SECP256K1, bb::curve::SECP256R1> |
Definition at line 21 of file ecdsa.test.cpp.
| using EcdsaTests< Curve >::Fq = Curve::BaseField |
Definition at line 31 of file ecdsa.test.cpp.
| using EcdsaTests< Curve >::FqNative = Curve::BaseFieldNative |
Definition at line 26 of file ecdsa.test.cpp.
| using EcdsaTests< Curve >::Fr = Curve::ScalarField |
Definition at line 30 of file ecdsa.test.cpp.
| using EcdsaTests< Curve >::FrNative = Curve::ScalarFieldNative |
Definition at line 25 of file ecdsa.test.cpp.
| using EcdsaTests< Curve >::G1 = Curve::Group |
Definition at line 32 of file ecdsa.test.cpp.
| using EcdsaTests< Curve >::G1Native = Curve::GroupNative |
Definition at line 27 of file ecdsa.test.cpp.
|
strong |
| Enumerator | |
|---|---|
| XCoordinateOverflow | |
| YCoordinateOverflow | |
| InvalidR | |
| InvalidS | |
| HighS | |
| ZeroR | |
| ZeroS | |
| InfinityScalarMul | |
| InvalidPubKey | |
| InfinityPubKey | |
| None | |
Definition at line 39 of file ecdsa.test.cpp.
|
inline |
Definition at line 174 of file ecdsa.test.cpp.
|
inline |
Definition at line 234 of file ecdsa.test.cpp.
|
inline |
Definition at line 53 of file ecdsa.test.cpp.
|
inline |
Definition at line 72 of file ecdsa.test.cpp.
|
inline |
Definition at line 329 of file ecdsa.test.cpp.
|
inline |
Definition at line 289 of file ecdsa.test.cpp.
|
inline |
Definition at line 260 of file ecdsa.test.cpp.
|
inline |
Construct tests based on data fetched from the Wycherproof project.
| tests |
Definition at line 366 of file ecdsa.test.cpp.
|
staticconstexpr |
Definition at line 36 of file ecdsa.test.cpp.