|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
Public Types | |
| enum class | TamperingMode : std::uint8_t { InvalidR , InvalidS , HighS , OutOfBoundsHash , 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::fr |
| using | FqNative = Curve::fq |
| using | G1Native = Curve::g1 |
| using | Fr = Curve::bigfr_ct |
| using | Fq = Curve::fq_ct |
| using | G1 = Curve::g1_bigfr_ct |
| using | bool_t = Curve::bool_ct |
Public Member Functions | |
| std::pair< ecdsa_key_pair< FrNative, G1Native >, ecdsa_signature > | generate_dummy_ecdsa_data (std::string message_string, bool random_signature) |
| ecdsa_signature | generate_signature_out_of_bounds_hash () |
| Generate valid signature for the message Fr(1) | |
| std::string | 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) |
| 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 circuit_checker_result, const std::string failure_msg) |
| stdlib::byte_array< Builder > | construct_hashed_message (Builder &builder, std::vector< uint8_t > &message_bytes, TamperingMode mode) |
| void | test_verify_signature (bool random_signature, TamperingMode mode) |
| 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 = Curve::bool_ct |
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::fq_ct |
Definition at line 31 of file ecdsa.test.cpp.
| using EcdsaTests< Curve >::FqNative = Curve::fq |
Definition at line 26 of file ecdsa.test.cpp.
| using EcdsaTests< Curve >::Fr = Curve::bigfr_ct |
Definition at line 30 of file ecdsa.test.cpp.
| using EcdsaTests< Curve >::FrNative = Curve::fr |
Definition at line 25 of file ecdsa.test.cpp.
| using EcdsaTests< Curve >::G1 = Curve::g1_bigfr_ct |
Definition at line 32 of file ecdsa.test.cpp.
| using EcdsaTests< Curve >::G1Native = Curve::g1 |
Definition at line 27 of file ecdsa.test.cpp.
|
strong |
| Enumerator | |
|---|---|
| InvalidR | |
| InvalidS | |
| HighS | |
| OutOfBoundsHash | |
| ZeroR | |
| ZeroS | |
| InfinityScalarMul | |
| InvalidPubKey | |
| InfinityPubKey | |
| None | |
Definition at line 39 of file ecdsa.test.cpp.
|
inline |
Definition at line 291 of file ecdsa.test.cpp.
|
inline |
Definition at line 231 of file ecdsa.test.cpp.
|
inline |
Definition at line 254 of file ecdsa.test.cpp.
|
inline |
Definition at line 52 of file ecdsa.test.cpp.
|
inline |
Generate valid signature for the message Fr(1)
Definition at line 76 of file ecdsa.test.cpp.
|
inline |
Definition at line 114 of file ecdsa.test.cpp.
|
inline |
Definition at line 320 of file ecdsa.test.cpp.
|
inline |
Construct tests based on data fetched from the Wycherproof project.
| tests |
Definition at line 358 of file ecdsa.test.cpp.
|
staticconstexpr |
Definition at line 36 of file ecdsa.test.cpp.