Skip to content

Commit

Permalink
fix. (#318)
Browse files Browse the repository at this point in the history
  • Loading branch information
suyash67 authored Apr 5, 2023
1 parent d41ce97 commit f386b5e
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 f386b5e

Please sign in to comment.