aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-02-19 16:07:04 -0500
committerJack Lloyd <[email protected]>2018-02-19 16:07:04 -0500
commit8a6a6091838dd76edaa29137e26340a760a895c9 (patch)
tree1abc5e5e0ad866b01ac575664d3a72c16f243f7e /src/lib/pubkey
parentee036d3bb011fe7a45bec3fca6ef405b2340c5d7 (diff)
Remove PK_Ops::Decryption_with_EME::max_raw_input_bits
Unused and not exposed to higher levels. RSA and ElGamal both check their inputs vs the system parameters (n, p) after decoding.
Diffstat (limited to 'src/lib/pubkey')
-rw-r--r--src/lib/pubkey/elgamal/elgamal.cpp2
-rw-r--r--src/lib/pubkey/pk_ops_impl.h1
-rw-r--r--src/lib/pubkey/rsa/rsa.cpp2
3 files changed, 0 insertions, 5 deletions
diff --git a/src/lib/pubkey/elgamal/elgamal.cpp b/src/lib/pubkey/elgamal/elgamal.cpp
index 3a5d8b81e..e03fd0bb6 100644
--- a/src/lib/pubkey/elgamal/elgamal.cpp
+++ b/src/lib/pubkey/elgamal/elgamal.cpp
@@ -117,8 +117,6 @@ class ElGamal_Decryption_Operation final : public PK_Ops::Decryption_with_EME
{
public:
- size_t max_raw_input_bits() const override { return m_group.p_bits() - 1; }
-
ElGamal_Decryption_Operation(const ElGamal_PrivateKey& key,
const std::string& eme,
RandomNumberGenerator& rng);
diff --git a/src/lib/pubkey/pk_ops_impl.h b/src/lib/pubkey/pk_ops_impl.h
index 1576911fb..1878a7417 100644
--- a/src/lib/pubkey/pk_ops_impl.h
+++ b/src/lib/pubkey/pk_ops_impl.h
@@ -46,7 +46,6 @@ class Decryption_with_EME : public Decryption
protected:
explicit Decryption_with_EME(const std::string& eme);
private:
- virtual size_t max_raw_input_bits() const = 0;
virtual secure_vector<uint8_t> raw_decrypt(const uint8_t msg[], size_t len) = 0;
std::unique_ptr<EME> m_eme;
};
diff --git a/src/lib/pubkey/rsa/rsa.cpp b/src/lib/pubkey/rsa/rsa.cpp
index 1ba4d6b25..e1c3e49db 100644
--- a/src/lib/pubkey/rsa/rsa.cpp
+++ b/src/lib/pubkey/rsa/rsa.cpp
@@ -269,8 +269,6 @@ class RSA_Decryption_Operation final : public PK_Ops::Decryption_with_EME,
{
public:
- size_t max_raw_input_bits() const override { return get_max_input_bits(); }
-
RSA_Decryption_Operation(const RSA_PrivateKey& rsa, const std::string& eme, RandomNumberGenerator& rng) :
PK_Ops::Decryption_with_EME(eme),
RSA_Private_Operation(rsa, rng)