aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey
diff options
context:
space:
mode:
authorDaniel Seither <[email protected]>2015-07-30 19:15:22 +0200
committerDaniel Seither <[email protected]>2015-07-30 19:15:22 +0200
commitf2edce7bf7fd2132e1a153093df4d47d5f57efcc (patch)
tree596f618d70b8be96922e662f17d91c6c996d835e /src/lib/pubkey
parente44e6b50e98628e385f59de4b61b4b4733fc1816 (diff)
pubkey: Add missing overrides
Diffstat (limited to 'src/lib/pubkey')
-rw-r--r--src/lib/pubkey/curve25519/curve25519.cpp2
-rw-r--r--src/lib/pubkey/curve25519/curve25519.h2
-rw-r--r--src/lib/pubkey/dh/dh.cpp2
-rw-r--r--src/lib/pubkey/dh/dh.h8
-rw-r--r--src/lib/pubkey/dl_algo/dl_algo.h10
-rw-r--r--src/lib/pubkey/dlies/dlies.h6
-rw-r--r--src/lib/pubkey/dsa/dsa.cpp6
-rw-r--r--src/lib/pubkey/dsa/dsa.h12
-rw-r--r--src/lib/pubkey/ecc_key/ecc_key.h8
-rw-r--r--src/lib/pubkey/ecdh/ecdh.cpp2
-rw-r--r--src/lib/pubkey/ecdh/ecdh.h7
-rw-r--r--src/lib/pubkey/ecdsa/ecdsa.h11
-rw-r--r--src/lib/pubkey/elgamal/elgamal.cpp3
-rw-r--r--src/lib/pubkey/elgamal/elgamal.h8
-rw-r--r--src/lib/pubkey/gost_3410/gost_3410.cpp2
-rw-r--r--src/lib/pubkey/gost_3410/gost_3410.h14
-rw-r--r--src/lib/pubkey/if_algo/if_algo.h12
-rw-r--r--src/lib/pubkey/mce/mceliece.h8
-rw-r--r--src/lib/pubkey/mce/mceliece_key.h18
-rw-r--r--src/lib/pubkey/nr/nr.h12
-rw-r--r--src/lib/pubkey/pk_keys.h2
-rw-r--r--src/lib/pubkey/pubkey.h6
-rw-r--r--src/lib/pubkey/rsa/rsa.h4
-rw-r--r--src/lib/pubkey/rw/rw.cpp6
-rw-r--r--src/lib/pubkey/rw/rw.h4
25 files changed, 89 insertions, 86 deletions
diff --git a/src/lib/pubkey/curve25519/curve25519.cpp b/src/lib/pubkey/curve25519/curve25519.cpp
index b314e16dc..aa0646d04 100644
--- a/src/lib/pubkey/curve25519/curve25519.cpp
+++ b/src/lib/pubkey/curve25519/curve25519.cpp
@@ -126,7 +126,7 @@ class Curve25519_KA_Operation : public PK_Ops::Key_Agreement_with_KDF
PK_Ops::Key_Agreement_with_KDF(kdf),
m_key(key) {}
- secure_vector<byte> raw_agree(const byte w[], size_t w_len)
+ secure_vector<byte> raw_agree(const byte w[], size_t w_len) override
{
return m_key.agree(w, w_len);
}
diff --git a/src/lib/pubkey/curve25519/curve25519.h b/src/lib/pubkey/curve25519/curve25519.h
index 849940505..c3e3d4e60 100644
--- a/src/lib/pubkey/curve25519/curve25519.h
+++ b/src/lib/pubkey/curve25519/curve25519.h
@@ -19,7 +19,7 @@ class BOTAN_DLL Curve25519_PublicKey : public virtual Public_Key
size_t estimated_strength() const override { return 128; }
- size_t max_input_bits() const { return 256; }
+ size_t max_input_bits() const override { return 256; }
bool check_key(RandomNumberGenerator& rng, bool strong) const override;
diff --git a/src/lib/pubkey/dh/dh.cpp b/src/lib/pubkey/dh/dh.cpp
index 57310efae..f182a7792 100644
--- a/src/lib/pubkey/dh/dh.cpp
+++ b/src/lib/pubkey/dh/dh.cpp
@@ -88,7 +88,7 @@ class DH_KA_Operation : public PK_Ops::Key_Agreement_with_KDF
typedef DH_PrivateKey Key_Type;
DH_KA_Operation(const DH_PrivateKey& key, const std::string& kdf);
- secure_vector<byte> raw_agree(const byte w[], size_t w_len);
+ secure_vector<byte> raw_agree(const byte w[], size_t w_len) override;
private:
const BigInt& m_p;
diff --git a/src/lib/pubkey/dh/dh.h b/src/lib/pubkey/dh/dh.h
index 32ca21440..9911453fb 100644
--- a/src/lib/pubkey/dh/dh.h
+++ b/src/lib/pubkey/dh/dh.h
@@ -18,12 +18,12 @@ namespace Botan {
class BOTAN_DLL DH_PublicKey : public virtual DL_Scheme_PublicKey
{
public:
- std::string algo_name() const { return "DH"; }
+ std::string algo_name() const override { return "DH"; }
std::vector<byte> public_value() const;
- size_t max_input_bits() const { return group_p().bits(); }
+ size_t max_input_bits() const override { return group_p().bits(); }
- DL_Group::Format group_format() const { return DL_Group::ANSI_X9_42; }
+ DL_Group::Format group_format() const override { return DL_Group::ANSI_X9_42; }
DH_PublicKey(const AlgorithmIdentifier& alg_id,
const secure_vector<byte>& key_bits) :
@@ -47,7 +47,7 @@ class BOTAN_DLL DH_PrivateKey : public DH_PublicKey,
public virtual DL_Scheme_PrivateKey
{
public:
- std::vector<byte> public_value() const;
+ std::vector<byte> public_value() const override;
/**
* Load a DH private key
diff --git a/src/lib/pubkey/dl_algo/dl_algo.h b/src/lib/pubkey/dl_algo/dl_algo.h
index 5d2386e56..73cf23eec 100644
--- a/src/lib/pubkey/dl_algo/dl_algo.h
+++ b/src/lib/pubkey/dl_algo/dl_algo.h
@@ -20,11 +20,11 @@ namespace Botan {
class BOTAN_DLL DL_Scheme_PublicKey : public virtual Public_Key
{
public:
- bool check_key(RandomNumberGenerator& rng, bool) const;
+ bool check_key(RandomNumberGenerator& rng, bool) const override;
- AlgorithmIdentifier algorithm_identifier() const;
+ AlgorithmIdentifier algorithm_identifier() const override;
- std::vector<byte> x509_subject_public_key() const;
+ std::vector<byte> x509_subject_public_key() const override;
/**
* Get the DL domain parameters of this key.
@@ -88,7 +88,7 @@ class BOTAN_DLL DL_Scheme_PrivateKey : public virtual DL_Scheme_PublicKey,
public virtual Private_Key
{
public:
- bool check_key(RandomNumberGenerator& rng, bool) const;
+ bool check_key(RandomNumberGenerator& rng, bool) const override;
/**
* Get the secret key x.
@@ -96,7 +96,7 @@ class BOTAN_DLL DL_Scheme_PrivateKey : public virtual DL_Scheme_PublicKey,
*/
const BigInt& get_x() const { return x; }
- secure_vector<byte> pkcs8_private_key() const;
+ secure_vector<byte> pkcs8_private_key() const override;
DL_Scheme_PrivateKey(const AlgorithmIdentifier& alg_id,
const secure_vector<byte>& key_bits,
diff --git a/src/lib/pubkey/dlies/dlies.h b/src/lib/pubkey/dlies/dlies.h
index 3f0647aeb..ed5928080 100644
--- a/src/lib/pubkey/dlies/dlies.h
+++ b/src/lib/pubkey/dlies/dlies.h
@@ -28,9 +28,9 @@ class BOTAN_DLL DLIES_Encryptor : public PK_Encryptor
void set_other_key(const std::vector<byte>&);
private:
std::vector<byte> enc(const byte[], size_t,
- RandomNumberGenerator&) const;
+ RandomNumberGenerator&) const override;
- size_t maximum_input_size() const;
+ size_t maximum_input_size() const override;
std::vector<byte> other_key, my_key;
@@ -52,7 +52,7 @@ class BOTAN_DLL DLIES_Decryptor : public PK_Decryptor
size_t mac_key_len = 20);
private:
- secure_vector<byte> dec(const byte[], size_t) const;
+ secure_vector<byte> dec(const byte[], size_t) const override;
std::vector<byte> my_key;
diff --git a/src/lib/pubkey/dsa/dsa.cpp b/src/lib/pubkey/dsa/dsa.cpp
index 90cc18fdc..ec0830533 100644
--- a/src/lib/pubkey/dsa/dsa.cpp
+++ b/src/lib/pubkey/dsa/dsa.cpp
@@ -148,9 +148,9 @@ class DSA_Verification_Operation : public PK_Ops::Verification_with_EMSA
mod_q = Modular_Reducer(dsa.group_q());
}
- size_t message_parts() const { return 2; }
- size_t message_part_size() const { return q.bytes(); }
- size_t max_input_bits() const { return q.bits(); }
+ size_t message_parts() const override { return 2; }
+ size_t message_part_size() const override { return q.bytes(); }
+ size_t max_input_bits() const override { return q.bits(); }
bool with_recovery() const override { return false; }
diff --git a/src/lib/pubkey/dsa/dsa.h b/src/lib/pubkey/dsa/dsa.h
index 294774bf0..2653c9229 100644
--- a/src/lib/pubkey/dsa/dsa.h
+++ b/src/lib/pubkey/dsa/dsa.h
@@ -18,12 +18,12 @@ namespace Botan {
class BOTAN_DLL DSA_PublicKey : public virtual DL_Scheme_PublicKey
{
public:
- std::string algo_name() const { return "DSA"; }
+ std::string algo_name() const override { return "DSA"; }
- DL_Group::Format group_format() const { return DL_Group::ANSI_X9_57; }
- size_t message_parts() const { return 2; }
- size_t message_part_size() const { return group_q().bytes(); }
- size_t max_input_bits() const { return group_q().bits(); }
+ DL_Group::Format group_format() const override { return DL_Group::ANSI_X9_57; }
+ size_t message_parts() const override { return 2; }
+ size_t message_part_size() const override { return group_q().bytes(); }
+ size_t max_input_bits() const override { return group_q().bits(); }
DSA_PublicKey(const AlgorithmIdentifier& alg_id,
const secure_vector<byte>& key_bits) :
@@ -51,7 +51,7 @@ class BOTAN_DLL DSA_PrivateKey : public DSA_PublicKey,
const DL_Group& group,
const BigInt& private_key = 0);
- bool check_key(RandomNumberGenerator& rng, bool strong) const;
+ bool check_key(RandomNumberGenerator& rng, bool strong) const override;
};
}
diff --git a/src/lib/pubkey/ecc_key/ecc_key.h b/src/lib/pubkey/ecc_key/ecc_key.h
index efc4b02da..dcf5b84ff 100644
--- a/src/lib/pubkey/ecc_key/ecc_key.h
+++ b/src/lib/pubkey/ecc_key/ecc_key.h
@@ -44,12 +44,12 @@ class BOTAN_DLL EC_PublicKey : public virtual Public_Key
*/
const PointGFp& public_point() const { return public_key; }
- AlgorithmIdentifier algorithm_identifier() const;
+ AlgorithmIdentifier algorithm_identifier() const override;
- std::vector<byte> x509_subject_public_key() const;
+ std::vector<byte> x509_subject_public_key() const override;
bool check_key(RandomNumberGenerator& rng,
- bool strong) const;
+ bool strong) const override;
/**
* Get the domain parameters of this key.
@@ -103,7 +103,7 @@ class BOTAN_DLL EC_PrivateKey : public virtual EC_PublicKey,
EC_PrivateKey(const AlgorithmIdentifier& alg_id,
const secure_vector<byte>& key_bits);
- secure_vector<byte> pkcs8_private_key() const;
+ secure_vector<byte> pkcs8_private_key() const override;
/**
* Get the private key value of this key object.
diff --git a/src/lib/pubkey/ecdh/ecdh.cpp b/src/lib/pubkey/ecdh/ecdh.cpp
index 61d3af816..bad0f2c0b 100644
--- a/src/lib/pubkey/ecdh/ecdh.cpp
+++ b/src/lib/pubkey/ecdh/ecdh.cpp
@@ -30,7 +30,7 @@ class ECDH_KA_Operation : public PK_Ops::Key_Agreement_with_KDF
l_times_priv = inverse_mod(cofactor, key.domain().get_order()) * key.private_value();
}
- secure_vector<byte> raw_agree(const byte w[], size_t w_len)
+ secure_vector<byte> raw_agree(const byte w[], size_t w_len) override
{
PointGFp point = OS2ECP(w, w_len, curve);
PointGFp S = (cofactor * point) * l_times_priv;
diff --git a/src/lib/pubkey/ecdh/ecdh.h b/src/lib/pubkey/ecdh/ecdh.h
index 1e806f119..ef3e8ef7a 100644
--- a/src/lib/pubkey/ecdh/ecdh.h
+++ b/src/lib/pubkey/ecdh/ecdh.h
@@ -38,7 +38,7 @@ class BOTAN_DLL ECDH_PublicKey : public virtual EC_PublicKey
* Get this keys algorithm name.
* @return this keys algorithm name
*/
- std::string algo_name() const { return "ECDH"; }
+ std::string algo_name() const override { return "ECDH"; }
/**
* Get the maximum number of bits allowed to be fed to this key.
@@ -46,7 +46,8 @@ class BOTAN_DLL ECDH_PublicKey : public virtual EC_PublicKey
* @return maximum number of input bits
*/
- size_t max_input_bits() const { return domain().get_order().bits(); }
+ size_t max_input_bits() const override
+ { return domain().get_order().bits(); }
/**
* @return public point value
@@ -82,7 +83,7 @@ class BOTAN_DLL ECDH_PrivateKey : public ECDH_PublicKey,
const BigInt& x = 0) :
EC_PrivateKey(rng, domain, x) {}
- std::vector<byte> public_value() const
+ std::vector<byte> public_value() const override
{ return ECDH_PublicKey::public_value(); }
};
diff --git a/src/lib/pubkey/ecdsa/ecdsa.h b/src/lib/pubkey/ecdsa/ecdsa.h
index 91ddb500d..1eb41a4b9 100644
--- a/src/lib/pubkey/ecdsa/ecdsa.h
+++ b/src/lib/pubkey/ecdsa/ecdsa.h
@@ -38,18 +38,19 @@ class BOTAN_DLL ECDSA_PublicKey : public virtual EC_PublicKey
* Get this keys algorithm name.
* @result this keys algorithm name ("ECDSA")
*/
- std::string algo_name() const { return "ECDSA"; }
+ std::string algo_name() const override { return "ECDSA"; }
/**
* Get the maximum number of bits allowed to be fed to this key.
* This is the bitlength of the order of the base point.
* @result the maximum number of input bits
*/
- size_t max_input_bits() const { return domain().get_order().bits(); }
+ size_t max_input_bits() const override
+ { return domain().get_order().bits(); }
- size_t message_parts() const { return 2; }
+ size_t message_parts() const override { return 2; }
- size_t message_part_size() const
+ size_t message_part_size() const override
{ return domain().get_order().bytes(); }
protected:
@@ -84,7 +85,7 @@ class BOTAN_DLL ECDSA_PrivateKey : public ECDSA_PublicKey,
const BigInt& x = 0) :
EC_PrivateKey(rng, domain, x) {}
- bool check_key(RandomNumberGenerator& rng, bool) const;
+ bool check_key(RandomNumberGenerator& rng, bool) const override;
};
}
diff --git a/src/lib/pubkey/elgamal/elgamal.cpp b/src/lib/pubkey/elgamal/elgamal.cpp
index 2a4de7196..4d0344610 100644
--- a/src/lib/pubkey/elgamal/elgamal.cpp
+++ b/src/lib/pubkey/elgamal/elgamal.cpp
@@ -131,7 +131,8 @@ class ElGamal_Decryption_Operation : public PK_Ops::Decryption_with_EME
public:
typedef ElGamal_PrivateKey Key_Type;
- size_t max_raw_input_bits() const { return mod_p.get_modulus().bits() - 1; }
+ size_t max_raw_input_bits() const override
+ { return mod_p.get_modulus().bits() - 1; }
ElGamal_Decryption_Operation(const ElGamal_PrivateKey& key, const std::string& eme);
diff --git a/src/lib/pubkey/elgamal/elgamal.h b/src/lib/pubkey/elgamal/elgamal.h
index 90940b609..9f287158d 100644
--- a/src/lib/pubkey/elgamal/elgamal.h
+++ b/src/lib/pubkey/elgamal/elgamal.h
@@ -18,10 +18,10 @@ namespace Botan {
class BOTAN_DLL ElGamal_PublicKey : public virtual DL_Scheme_PublicKey
{
public:
- std::string algo_name() const { return "ElGamal"; }
- DL_Group::Format group_format() const { return DL_Group::ANSI_X9_42; }
+ std::string algo_name() const override { return "ElGamal"; }
+ DL_Group::Format group_format() const override { return DL_Group::ANSI_X9_42; }
- size_t max_input_bits() const { return (group_p().bits() - 1); }
+ size_t max_input_bits() const override { return (group_p().bits() - 1); }
ElGamal_PublicKey(const AlgorithmIdentifier& alg_id,
const secure_vector<byte>& key_bits) :
@@ -40,7 +40,7 @@ class BOTAN_DLL ElGamal_PrivateKey : public ElGamal_PublicKey,
public virtual DL_Scheme_PrivateKey
{
public:
- bool check_key(RandomNumberGenerator& rng, bool) const;
+ bool check_key(RandomNumberGenerator& rng, bool) const override;
ElGamal_PrivateKey(const AlgorithmIdentifier& alg_id,
const secure_vector<byte>& key_bits,
diff --git a/src/lib/pubkey/gost_3410/gost_3410.cpp b/src/lib/pubkey/gost_3410/gost_3410.cpp
index 3950c0e43..9c3a0ef3c 100644
--- a/src/lib/pubkey/gost_3410/gost_3410.cpp
+++ b/src/lib/pubkey/gost_3410/gost_3410.cpp
@@ -171,7 +171,7 @@ class GOST_3410_Verification_Operation : public PK_Ops::Verification_with_EMSA
bool with_recovery() const override { return false; }
bool verify(const byte msg[], size_t msg_len,
- const byte sig[], size_t sig_len);
+ const byte sig[], size_t sig_len) override;
private:
const PointGFp& base_point;
const PointGFp& public_point;
diff --git a/src/lib/pubkey/gost_3410/gost_3410.h b/src/lib/pubkey/gost_3410/gost_3410.h
index 2356d8e3d..62a627c37 100644
--- a/src/lib/pubkey/gost_3410/gost_3410.h
+++ b/src/lib/pubkey/gost_3410/gost_3410.h
@@ -40,11 +40,11 @@ class BOTAN_DLL GOST_3410_PublicKey : public virtual EC_PublicKey
* Get this keys algorithm name.
* @result this keys algorithm name
*/
- std::string algo_name() const { return "GOST-34.10"; }
+ std::string algo_name() const override { return "GOST-34.10"; }
- AlgorithmIdentifier algorithm_identifier() const;
+ AlgorithmIdentifier algorithm_identifier() const override;
- std::vector<byte> x509_subject_public_key() const;
+ std::vector<byte> x509_subject_public_key() const override;
/**
* Get the maximum number of bits allowed to be fed to this key.
@@ -52,11 +52,11 @@ class BOTAN_DLL GOST_3410_PublicKey : public virtual EC_PublicKey
* @result the maximum number of input bits
*/
- size_t max_input_bits() const { return domain().get_order().bits(); }
+ size_t max_input_bits() const override { return domain().get_order().bits(); }
- size_t message_parts() const { return 2; }
+ size_t message_parts() const override { return 2; }
- size_t message_part_size() const
+ size_t message_part_size() const override
{ return domain().get_order().bytes(); }
protected:
@@ -86,7 +86,7 @@ class BOTAN_DLL GOST_3410_PrivateKey : public GOST_3410_PublicKey,
const BigInt& x = 0) :
EC_PrivateKey(rng, domain, x) {}
- AlgorithmIdentifier pkcs8_algorithm_identifier() const
+ AlgorithmIdentifier pkcs8_algorithm_identifier() const override
{ return EC_PublicKey::algorithm_identifier(); }
};
diff --git a/src/lib/pubkey/if_algo/if_algo.h b/src/lib/pubkey/if_algo/if_algo.h
index 7fa266aaa..73050ad41 100644
--- a/src/lib/pubkey/if_algo/if_algo.h
+++ b/src/lib/pubkey/if_algo/if_algo.h
@@ -27,11 +27,11 @@ class BOTAN_DLL IF_Scheme_PublicKey : public virtual Public_Key
IF_Scheme_PublicKey(const BigInt& n, const BigInt& e) :
n(n), e(e) {}
- bool check_key(RandomNumberGenerator& rng, bool) const;
+ bool check_key(RandomNumberGenerator& rng, bool) const override;
- AlgorithmIdentifier algorithm_identifier() const;
+ AlgorithmIdentifier algorithm_identifier() const override;
- std::vector<byte> x509_subject_public_key() const;
+ std::vector<byte> x509_subject_public_key() const override;
/**
* @return public modulus
@@ -43,7 +43,7 @@ class BOTAN_DLL IF_Scheme_PublicKey : public virtual Public_Key
*/
const BigInt& get_e() const { return e; }
- size_t max_input_bits() const { return (n.bits() - 1); }
+ size_t max_input_bits() const override { return (n.bits() - 1); }
size_t estimated_strength() const override;
@@ -71,7 +71,7 @@ class BOTAN_DLL IF_Scheme_PrivateKey : public virtual IF_Scheme_PublicKey,
const AlgorithmIdentifier& alg_id,
const secure_vector<byte>& key_bits);
- bool check_key(RandomNumberGenerator& rng, bool) const;
+ bool check_key(RandomNumberGenerator& rng, bool) const override;
/**
* Get the first prime p.
@@ -95,7 +95,7 @@ class BOTAN_DLL IF_Scheme_PrivateKey : public virtual IF_Scheme_PublicKey,
const BigInt& get_d1() const { return d1; }
const BigInt& get_d2() const { return d2; }
- secure_vector<byte> pkcs8_private_key() const;
+ secure_vector<byte> pkcs8_private_key() const override;
protected:
IF_Scheme_PrivateKey() {}
diff --git a/src/lib/pubkey/mce/mceliece.h b/src/lib/pubkey/mce/mceliece.h
index b62afee3a..c5f02470f 100644
--- a/src/lib/pubkey/mce/mceliece.h
+++ b/src/lib/pubkey/mce/mceliece.h
@@ -112,9 +112,9 @@ class BOTAN_DLL McEliece_Private_Operation : public PK_Ops::Decryption
public:
McEliece_Private_Operation(const McEliece_PrivateKey& mce_key);
- size_t max_input_bits() const { return m_priv_key.max_input_bits(); }
+ size_t max_input_bits() const override { return m_priv_key.max_input_bits(); }
- secure_vector<byte> decrypt(const byte msg[], size_t msg_len);
+ secure_vector<byte> decrypt(const byte msg[], size_t msg_len) override;
McEliece_PrivateKey const& get_key() const { return m_priv_key; }
@@ -127,8 +127,8 @@ class BOTAN_DLL McEliece_Public_Operation : public PK_Ops::Encryption
public:
McEliece_Public_Operation(const McEliece_PublicKey& public_key, u32bit code_length);
- size_t max_input_bits() const { return m_pub_key.max_input_bits(); }
- secure_vector<byte> encrypt(const byte msg[], size_t msg_len, RandomNumberGenerator&);
+ size_t max_input_bits() const override { return m_pub_key.max_input_bits(); }
+ secure_vector<byte> encrypt(const byte msg[], size_t msg_len, RandomNumberGenerator&) override;
McEliece_PublicKey const& get_key() const { return m_pub_key; }
diff --git a/src/lib/pubkey/mce/mceliece_key.h b/src/lib/pubkey/mce/mceliece_key.h
index 3a0d0eea8..65ab04f16 100644
--- a/src/lib/pubkey/mce/mceliece_key.h
+++ b/src/lib/pubkey/mce/mceliece_key.h
@@ -32,25 +32,25 @@ class BOTAN_DLL McEliece_PublicKey : public virtual Public_Key
McEliece_PublicKey(const McEliece_PublicKey & other);
- std::string algo_name() const { return "McEliece"; }
+ std::string algo_name() const override { return "McEliece"; }
/**
* Get the maximum number of bits allowed to be fed to this key.
* This is the bitlength of the order of the base point.
* @result the maximum number of input bits
*/
- size_t max_input_bits() const
+ size_t max_input_bits() const override
{
return get_message_word_bit_length();
};
- AlgorithmIdentifier algorithm_identifier() const;
+ AlgorithmIdentifier algorithm_identifier() const override;
- size_t estimated_strength() const;
+ size_t estimated_strength() const override;
- std::vector<byte> x509_subject_public_key() const;
+ std::vector<byte> x509_subject_public_key() const override;
- bool check_key(RandomNumberGenerator&, bool) const
+ bool check_key(RandomNumberGenerator&, bool) const override
{ return true; }
u32bit get_t() const { return m_t; }
@@ -78,7 +78,7 @@ class BOTAN_DLL McEliece_PrivateKey : public virtual McEliece_PublicKey,
* This is the bitlength of the order of the base point.
* @result the maximum number of input bits
*/
- size_t max_input_bits() const {
+ size_t max_input_bits() const override {
return m_Linv.size();
};
@@ -91,7 +91,7 @@ class BOTAN_DLL McEliece_PrivateKey : public virtual McEliece_PublicKey,
std::vector<byte> const& public_matrix );
McEliece_PrivateKey(RandomNumberGenerator& rng, size_t code_length, size_t t);
- bool check_key(RandomNumberGenerator& rng, bool strong) const;
+ bool check_key(RandomNumberGenerator& rng, bool strong) const override;
polyn_gf2m const& get_goppa_polyn() const { return m_g; };
std::vector<u32bit> const& get_H_coeffs() const { return m_coeffs; };
@@ -105,7 +105,7 @@ class BOTAN_DLL McEliece_PrivateKey : public virtual McEliece_PublicKey,
{ return m_codimension; };
- secure_vector<byte> pkcs8_private_key() const;
+ secure_vector<byte> pkcs8_private_key() const override;
bool operator==(const McEliece_PrivateKey & other) const;
diff --git a/src/lib/pubkey/nr/nr.h b/src/lib/pubkey/nr/nr.h
index 51752f8ce..425ad2642 100644
--- a/src/lib/pubkey/nr/nr.h
+++ b/src/lib/pubkey/nr/nr.h
@@ -18,13 +18,13 @@ namespace Botan {
class BOTAN_DLL NR_PublicKey : public virtual DL_Scheme_PublicKey
{
public:
- std::string algo_name() const { return "NR"; }
+ std::string algo_name() const override { return "NR"; }
- DL_Group::Format group_format() const { return DL_Group::ANSI_X9_57; }
+ DL_Group::Format group_format() const override { return DL_Group::ANSI_X9_57; }
- size_t message_parts() const { return 2; }
- size_t message_part_size() const { return group_q().bytes(); }
- size_t max_input_bits() const { return (group_q().bits() - 1); }
+ size_t message_parts() const override { return 2; }
+ size_t message_part_size() const override { return group_q().bytes(); }
+ size_t max_input_bits() const override { return (group_q().bits() - 1); }
NR_PublicKey(const AlgorithmIdentifier& alg_id,
const secure_vector<byte>& key_bits);
@@ -41,7 +41,7 @@ class BOTAN_DLL NR_PrivateKey : public NR_PublicKey,
public virtual DL_Scheme_PrivateKey
{
public:
- bool check_key(RandomNumberGenerator& rng, bool strong) const;
+ bool check_key(RandomNumberGenerator& rng, bool strong) const override;
NR_PrivateKey(const AlgorithmIdentifier& alg_id,
const secure_vector<byte>& key_bits,
diff --git a/src/lib/pubkey/pk_keys.h b/src/lib/pubkey/pk_keys.h
index 66811de86..40b7569af 100644
--- a/src/lib/pubkey/pk_keys.h
+++ b/src/lib/pubkey/pk_keys.h
@@ -114,7 +114,7 @@ class BOTAN_DLL Private_Key : public virtual Public_Key
* Self-test after loading a key
* @param rng a random number generator
*/
- void load_check(RandomNumberGenerator& rng) const;
+ void load_check(RandomNumberGenerator& rng) const override;
/**
* Self-test after generating a key
diff --git a/src/lib/pubkey/pubkey.h b/src/lib/pubkey/pubkey.h
index c95ed4469..687485c68 100644
--- a/src/lib/pubkey/pubkey.h
+++ b/src/lib/pubkey/pubkey.h
@@ -377,7 +377,7 @@ class BOTAN_DLL PK_Key_Agreement
class BOTAN_DLL PK_Encryptor_EME : public PK_Encryptor
{
public:
- size_t maximum_input_size() const;
+ size_t maximum_input_size() const override;
/**
* Construct an instance.
@@ -388,7 +388,7 @@ class BOTAN_DLL PK_Encryptor_EME : public PK_Encryptor
const std::string& eme);
private:
std::vector<byte> enc(const byte[], size_t,
- RandomNumberGenerator& rng) const;
+ RandomNumberGenerator& rng) const override;
std::unique_ptr<PK_Ops::Encryption> m_op;
};
@@ -407,7 +407,7 @@ class BOTAN_DLL PK_Decryptor_EME : public PK_Decryptor
PK_Decryptor_EME(const Private_Key& key,
const std::string& eme);
private:
- secure_vector<byte> dec(const byte[], size_t) const;
+ secure_vector<byte> dec(const byte[], size_t) const override;
std::unique_ptr<PK_Ops::Decryption> m_op;
};
diff --git a/src/lib/pubkey/rsa/rsa.h b/src/lib/pubkey/rsa/rsa.h
index 67357d859..4a57b9f63 100644
--- a/src/lib/pubkey/rsa/rsa.h
+++ b/src/lib/pubkey/rsa/rsa.h
@@ -19,7 +19,7 @@ namespace Botan {
class BOTAN_DLL RSA_PublicKey : public virtual IF_Scheme_PublicKey
{
public:
- std::string algo_name() const { return "RSA"; }
+ std::string algo_name() const override { return "RSA"; }
RSA_PublicKey(const AlgorithmIdentifier& alg_id,
const secure_vector<byte>& key_bits) :
@@ -46,7 +46,7 @@ class BOTAN_DLL RSA_PrivateKey : public RSA_PublicKey,
public IF_Scheme_PrivateKey
{
public:
- bool check_key(RandomNumberGenerator& rng, bool) const;
+ bool check_key(RandomNumberGenerator& rng, bool) const override;
RSA_PrivateKey(const AlgorithmIdentifier& alg_id,
const secure_vector<byte>& key_bits,
diff --git a/src/lib/pubkey/rw/rw.cpp b/src/lib/pubkey/rw/rw.cpp
index b706d6730..aa92578af 100644
--- a/src/lib/pubkey/rw/rw.cpp
+++ b/src/lib/pubkey/rw/rw.cpp
@@ -141,10 +141,10 @@ class RW_Verification_Operation : public PK_Ops::Verification_with_EMSA
n(rw.get_n()), powermod_e_n(rw.get_e(), rw.get_n())
{}
- size_t max_input_bits() const { return (n.bits() - 1); }
- bool with_recovery() const { return true; }
+ size_t max_input_bits() const override { return (n.bits() - 1); }
+ bool with_recovery() const override { return true; }
- secure_vector<byte> verify_mr(const byte msg[], size_t msg_len);
+ secure_vector<byte> verify_mr(const byte msg[], size_t msg_len) override;
private:
const BigInt& n;
diff --git a/src/lib/pubkey/rw/rw.h b/src/lib/pubkey/rw/rw.h
index 5d754e817..2a010441e 100644
--- a/src/lib/pubkey/rw/rw.h
+++ b/src/lib/pubkey/rw/rw.h
@@ -18,7 +18,7 @@ namespace Botan {
class BOTAN_DLL RW_PublicKey : public virtual IF_Scheme_PublicKey
{
public:
- std::string algo_name() const { return "RW"; }
+ std::string algo_name() const override { return "RW"; }
RW_PublicKey(const AlgorithmIdentifier& alg_id,
const secure_vector<byte>& key_bits) :
@@ -53,7 +53,7 @@ class BOTAN_DLL RW_PrivateKey : public RW_PublicKey,
RW_PrivateKey(RandomNumberGenerator& rng, size_t bits, size_t = 2);
- bool check_key(RandomNumberGenerator& rng, bool) const;
+ bool check_key(RandomNumberGenerator& rng, bool) const override;
};
}