From f386b5ee2bbccfecf58e0e685a11c1acfa153b0b Mon Sep 17 00:00:00 2001 From: Suyash Bagad Date: Wed, 5 Apr 2023 16:15:40 +0100 Subject: [PATCH] fix. (#318) --- cpp/src/barretenberg/stdlib/encryption/ecdsa/ecdsa.hpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/cpp/src/barretenberg/stdlib/encryption/ecdsa/ecdsa.hpp b/cpp/src/barretenberg/stdlib/encryption/ecdsa/ecdsa.hpp index 13a2aa92fe..e7562127a7 100644 --- a/cpp/src/barretenberg/stdlib/encryption/ecdsa/ecdsa.hpp +++ b/cpp/src/barretenberg/stdlib/encryption/ecdsa/ecdsa.hpp @@ -21,9 +21,13 @@ bool_t verify_signature(const stdlib::byte_array& message, template static signature from_witness(Composer* ctx, const crypto::ecdsa::signature& input) { - byte_array x(ctx, input.r); - byte_array y(ctx, input.s); - signature out(x, y); + std::vector r_vec(std::begin(input.r), std::end(input.r)); + std::vector s_vec(std::begin(input.s), std::end(input.s)); + stdlib::byte_array r(ctx, r_vec); + stdlib::byte_array s(ctx, s_vec); + signature out; + out.r = r; + out.s = s; return out; }