diff options
author | Jack Lloyd <[email protected]> | 2018-07-10 11:55:09 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-07-10 11:55:09 -0400 |
commit | f8a5ab25e5289188be663637aecc6b774e6e8bb5 (patch) | |
tree | 8ac17d2a6e55c4c4e5c69945773ed8b6b0057953 | |
parent | 479c631e8a4bb5b1c5be6430af821b1f2ab3a1f3 (diff) |
Make use of AlgorithmIdentifier::USE_EMPTY_PARAM
-rw-r--r-- | src/lib/pubkey/curve25519/curve25519.cpp | 5 | ||||
-rw-r--r-- | src/lib/pubkey/ed25519/ed25519_key.cpp | 5 | ||||
-rw-r--r-- | src/lib/pubkey/mce/mceliece_key.cpp | 2 |
3 files changed, 3 insertions, 9 deletions
diff --git a/src/lib/pubkey/curve25519/curve25519.cpp b/src/lib/pubkey/curve25519/curve25519.cpp index 3414bfbda..c43f526a8 100644 --- a/src/lib/pubkey/curve25519/curve25519.cpp +++ b/src/lib/pubkey/curve25519/curve25519.cpp @@ -39,10 +39,7 @@ secure_vector<uint8_t> curve25519(const secure_vector<uint8_t>& secret, AlgorithmIdentifier Curve25519_PublicKey::algorithm_identifier() const { - // AlgorithmIdentifier::USE_NULL_PARAM puts 0x05 0x00 in parameters - // We want nothing - std::vector<uint8_t> empty; - return AlgorithmIdentifier(get_oid(), empty); + return AlgorithmIdentifier(get_oid(), AlgorithmIdentifier::USE_EMPTY_PARAM); } 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 2b0f4eaec..5f5aff369 100644 --- a/src/lib/pubkey/ed25519/ed25519_key.cpp +++ b/src/lib/pubkey/ed25519/ed25519_key.cpp @@ -19,10 +19,7 @@ namespace Botan { AlgorithmIdentifier Ed25519_PublicKey::algorithm_identifier() const { - // AlgorithmIdentifier::USE_NULL_PARAM puts 0x05 0x00 in parameters - // We want nothing - std::vector<uint8_t> empty; - return AlgorithmIdentifier(get_oid(), empty); + return AlgorithmIdentifier(get_oid(), AlgorithmIdentifier::USE_EMPTY_PARAM); } bool Ed25519_PublicKey::check_key(RandomNumberGenerator&, bool) const diff --git a/src/lib/pubkey/mce/mceliece_key.cpp b/src/lib/pubkey/mce/mceliece_key.cpp index 4fe78d2a1..09c4c3f31 100644 --- a/src/lib/pubkey/mce/mceliece_key.cpp +++ b/src/lib/pubkey/mce/mceliece_key.cpp @@ -67,7 +67,7 @@ secure_vector<uint8_t> McEliece_PublicKey::random_plaintext_element(RandomNumber AlgorithmIdentifier McEliece_PublicKey::algorithm_identifier() const { - return AlgorithmIdentifier(get_oid(), std::vector<uint8_t>()); + return AlgorithmIdentifier(get_oid(), AlgorithmIdentifier::USE_EMPTY_PARAM); } std::vector<uint8_t> McEliece_PublicKey::public_key_bits() const |