diff options
-rw-r--r-- | src/lib/pubkey/curve25519/curve25519.cpp | 5 | ||||
-rw-r--r-- | src/lib/pubkey/ed25519/ed25519_key.cpp | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/pubkey/curve25519/curve25519.cpp b/src/lib/pubkey/curve25519/curve25519.cpp index 94970ef3f..6cd5b0cb8 100644 --- a/src/lib/pubkey/curve25519/curve25519.cpp +++ b/src/lib/pubkey/curve25519/curve25519.cpp @@ -38,7 +38,10 @@ secure_vector<uint8_t> curve25519(const secure_vector<uint8_t>& secret, AlgorithmIdentifier Curve25519_PublicKey::algorithm_identifier() const { - return AlgorithmIdentifier(get_oid(), AlgorithmIdentifier::USE_NULL_PARAM); + // AlgorithmIdentifier::USE_NULL_PARAM puts 0x05 0x00 in parameters + // We want nothing + std::vector<uint8_t> empty; + return AlgorithmIdentifier(get_oid(), empty); } bool Curve25519_PublicKey::check_key(RandomNumberGenerator&, bool) const diff --git a/src/lib/pubkey/ed25519/ed25519_key.cpp b/src/lib/pubkey/ed25519/ed25519_key.cpp index 18bfb51d7..6089cfedf 100644 --- a/src/lib/pubkey/ed25519/ed25519_key.cpp +++ b/src/lib/pubkey/ed25519/ed25519_key.cpp @@ -18,7 +18,10 @@ namespace Botan { AlgorithmIdentifier Ed25519_PublicKey::algorithm_identifier() const { - return AlgorithmIdentifier(get_oid(), AlgorithmIdentifier::USE_NULL_PARAM); + // AlgorithmIdentifier::USE_NULL_PARAM puts 0x05 0x00 in parameters + // We want nothing + std::vector<uint8_t> empty; + return AlgorithmIdentifier(get_oid(), empty); } bool Ed25519_PublicKey::check_key(RandomNumberGenerator&, bool) const |