|
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::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) |
| 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, const TamperingMode mode) |
| size_t | 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, const TamperingMode mode) |
| size_t | 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 | |
|---|---|
| XCoordinateOverflow | |
| YCoordinateOverflow | |
| InvalidR | |
| InvalidS | |
| HighS | |
| ZeroR | |
| ZeroS | |
| InfinityScalarMul | |
| InvalidPubKey | |
| InfinityPubKey | |
| None | |
Definition at line 39 of file ecdsa.test.cpp.
|
inline |
Definition at line 200 of file ecdsa.test.cpp.
|
inline |
Definition at line 237 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 274 of file ecdsa.test.cpp.
|
inline |
Construct tests based on data fetched from the Wycherproof project.
| tests |
Definition at line 316 of file ecdsa.test.cpp.
|
staticconstexpr |
Definition at line 36 of file ecdsa.test.cpp.