diff options
author | René Korthaus <[email protected]> | 2016-08-09 18:06:39 +0200 |
---|---|---|
committer | René Korthaus <[email protected]> | 2016-08-17 20:26:14 +0200 |
commit | 40a935209876b7c5360dadae85b0b26c2e13e0f5 (patch) | |
tree | 0adc0a99ce785ebe090d28e68e72fffd60238e85 /src/lib/math/bigint/bigint.h | |
parent | deef8ba63860efb14c45c5ee1cba2a3faaf8a719 (diff) |
Fix leading zero bytes in DSA, ECDSA, ECGDSA and ECKCDSA signatures
Diffstat (limited to 'src/lib/math/bigint/bigint.h')
-rw-r--r-- | src/lib/math/bigint/bigint.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/math/bigint/bigint.h b/src/lib/math/bigint/bigint.h index 2963ba35d..a61bee39c 100644 --- a/src/lib/math/bigint/bigint.h +++ b/src/lib/math/bigint/bigint.h @@ -566,6 +566,15 @@ class BOTAN_DLL BigInt static void encode_1363(byte out[], size_t bytes, const BigInt& n); + /** + * Encode two BigInt to a byte array according to IEEE 1363 + * @param n1 the first BigInt to encode + * @param n2 the second BigInt to encode + * @param bytes the length of the encoding of each single BigInt + * @result a secure_vector<byte> containing the concatenation of the two encoded BigInt + */ + static secure_vector<byte> encode_fixed_length_int_pair(const BigInt& n1, const BigInt& n2, size_t bytes); + private: secure_vector<word> m_reg; Sign m_signedness = Positive; |