Skip to content

Commit

Permalink
fix. (#318)
Browse files Browse the repository at this point in the history
  • Loading branch information
suyash67 committed Apr 6, 2023
1 parent 946f950 commit bcbbdbf
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions cpp/src/barretenberg/stdlib/encryption/ecdsa/ecdsa.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,13 @@ bool_t<Composer> verify_signature(const stdlib::byte_array<Composer>& message,
template <typename Composer>
static signature<Composer> from_witness(Composer* ctx, const crypto::ecdsa::signature& input)
{
byte_array x(ctx, input.r);
byte_array y(ctx, input.s);
signature<Composer> out(x, y);
std::vector<uint8_t> r_vec(std::begin(input.r), std::end(input.r));
std::vector<uint8_t> s_vec(std::begin(input.s), std::end(input.s));
stdlib::byte_array<Composer> r(ctx, r_vec);
stdlib::byte_array<Composer> s(ctx, s_vec);
signature<Composer> out;
out.r = r;
out.s = s;
return out;
}

Expand Down

0 comments on commit bcbbdbf

Please sign in to comment.