47 input_buffer.
write(single_byte);
53 message_string[i] =
static_cast<char>(
static_cast<uint8_t
>(public_inputs[i]));
59 input_buffer[i].assert_equal(message[i]);
64 account.
private_key = curve::ScalarFieldNative::random_element();
69 ecdsa_construct_signature<crypto::Sha256Hasher, base_field_native, scalar_field_native, group_native>(
70 message_string, account);
74 crypto::ecdsa_verify_signature<crypto::Sha256Hasher, base_field_native, scalar_field_native, group_native>(
75 message_string, account.
public_key, signature);
83 std::vector<uint8_t> rr(signature.
r.begin(), signature.
r.end());
84 std::vector<uint8_t> ss(signature.
s.begin(), signature.
s.end());
90 auto hash_arr =
crypto::sha256(std::vector<uint8_t>(message_string.begin(), message_string.end()));
94 bool_ct signature_result = stdlib::ecdsa_verify_signature<Builder, curve, base_field, scalar_field, group>(
static constexpr size_t NUM_PUBLIC_INPUTS
stdlib::bool_t< Builder > bool_ct
typename curve::BaseFieldNative base_field_native
typename curve::GroupNative group_native
typename curve::ScalarFieldNative scalar_field_native
typename curve::Group group
stdlib::public_witness_t< Builder > public_witness_ct
stdlib::byte_array< Builder > byte_array_ct
typename curve::BaseField base_field
typename curve::ScalarField scalar_field
static Builder generate(uint256_t public_inputs[])
Implements boolean logic in-circuit.
void assert_equal(const bool_t &rhs, std::string const &msg="bool_t::assert_equal") const
Implements copy constraint for bool_t elements.
Represents a dynamic array of bytes in-circuit.
byte_array & write(byte_array const &other)
Appends the contents of another byte_array (other) to the end of this one.
Manages the data that is propagated on the public inputs of an application/function circuit.
static void add_default(Builder &builder)
Add default public inputs when they are not present.
Sha256Hash sha256(const ByteContainer &input)
SHA-256 hash function (FIPS 180-4)
Entry point for Barretenberg command-line interface.
UltraCircuitBuilder_< UltraExecutionTraceBlocks > UltraCircuitBuilder
G1::affine_element public_key
std::array< uint8_t, 32 > r
std::array< uint8_t, 32 > s
::bb::secp256k1::fq BaseFieldNative
bigfield< CircuitType, typename ::bb::secp256k1::FrParams > ScalarField
::bb::secp256k1::fr ScalarFieldNative
bigfield< CircuitType, typename ::bb::secp256k1::FqParams > BaseField
::bb::secp256k1::g1 GroupNative
element< CircuitType, BaseField, ScalarField, GroupNative > Group
void throw_or_abort(std::string const &err)