diff options
Diffstat (limited to 'src/lib/pubkey/eckcdsa')
-rw-r--r-- | src/lib/pubkey/eckcdsa/eckcdsa.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/pubkey/eckcdsa/eckcdsa.cpp b/src/lib/pubkey/eckcdsa/eckcdsa.cpp index 83439332e..5ca89675c 100644 --- a/src/lib/pubkey/eckcdsa/eckcdsa.cpp +++ b/src/lib/pubkey/eckcdsa/eckcdsa.cpp @@ -100,10 +100,9 @@ ECKCDSA_Signature_Operation::raw_sign(const byte msg[], size_t, const BigInt s = m_mod_order.multiply(m_x, k - w); BOTAN_ASSERT(s != 0, "invalid s"); - secure_vector<byte> signature(r.bytes() + s.bytes()); - r.binary_encode(signature.data()); - s.binary_encode(&signature[r.bytes()]); - return signature; + secure_vector<byte> output = BigInt::encode_1363(r, c.size()); + output += BigInt::encode_1363(s, m_mod_order.get_modulus().bytes()); + return output; } /** |