aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-11-08 10:33:45 -0500
committerJack Lloyd <[email protected]>2016-11-08 10:33:45 -0500
commitfc44288f56588fdafb54aedb00458fd75472d6aa (patch)
tree9f9aa771c1b29cd64189bce210e4428d8c0c750e
parent181777189eceab70ec6ff19104902ab3ac8255c5 (diff)
Remove Key_Type typedefs
Also part of Algo_Registry and not needed after #668
-rw-r--r--src/lib/prov/openssl/openssl_ec.cpp1
-rw-r--r--src/lib/prov/openssl/openssl_rsa.cpp4
-rw-r--r--src/lib/prov/pkcs11/p11_rsa.cpp4
-rw-r--r--src/lib/pubkey/curve25519/curve25519.cpp1
-rw-r--r--src/lib/pubkey/dh/dh.cpp1
-rw-r--r--src/lib/pubkey/dsa/dsa.cpp2
-rw-r--r--src/lib/pubkey/ecdh/ecdh.cpp1
-rw-r--r--src/lib/pubkey/ecdsa/ecdsa.cpp2
-rw-r--r--src/lib/pubkey/ecgdsa/ecgdsa.cpp2
-rw-r--r--src/lib/pubkey/eckcdsa/eckcdsa.cpp2
-rw-r--r--src/lib/pubkey/elgamal/elgamal.cpp2
-rw-r--r--src/lib/pubkey/gost_3410/gost_3410.cpp2
-rw-r--r--src/lib/pubkey/mce/mceliece_key.cpp2
-rw-r--r--src/lib/pubkey/rsa/rsa.cpp6
14 files changed, 0 insertions, 32 deletions
diff --git a/src/lib/prov/openssl/openssl_ec.cpp b/src/lib/prov/openssl/openssl_ec.cpp
index fe795fcde..ca4352370 100644
--- a/src/lib/prov/openssl/openssl_ec.cpp
+++ b/src/lib/prov/openssl/openssl_ec.cpp
@@ -223,7 +223,6 @@ namespace {
class OpenSSL_ECDH_KA_Operation : public PK_Ops::Key_Agreement_with_KDF
{
public:
- typedef ECDH_PrivateKey Key_Type;
OpenSSL_ECDH_KA_Operation(const ECDH_PrivateKey& ecdh, const std::string& kdf) :
PK_Ops::Key_Agreement_with_KDF(kdf), m_ossl_ec(::EC_KEY_new(), ::EC_KEY_free)
diff --git a/src/lib/prov/openssl/openssl_rsa.cpp b/src/lib/prov/openssl/openssl_rsa.cpp
index ae3f1cce2..b03b747aa 100644
--- a/src/lib/prov/openssl/openssl_rsa.cpp
+++ b/src/lib/prov/openssl/openssl_rsa.cpp
@@ -40,7 +40,6 @@ std::pair<int, size_t> get_openssl_enc_pad(const std::string& eme)
class OpenSSL_RSA_Encryption_Operation : public PK_Ops::Encryption
{
public:
- typedef RSA_PublicKey Key_Type;
OpenSSL_RSA_Encryption_Operation(const RSA_PublicKey& rsa, int pad, size_t pad_overhead) :
m_openssl_rsa(nullptr, ::RSA_free), m_padding(pad)
@@ -96,7 +95,6 @@ class OpenSSL_RSA_Encryption_Operation : public PK_Ops::Encryption
class OpenSSL_RSA_Decryption_Operation : public PK_Ops::Decryption
{
public:
- typedef RSA_PrivateKey Key_Type;
OpenSSL_RSA_Decryption_Operation(const RSA_PrivateKey& rsa, int pad) :
m_openssl_rsa(nullptr, ::RSA_free), m_padding(pad)
@@ -142,7 +140,6 @@ class OpenSSL_RSA_Decryption_Operation : public PK_Ops::Decryption
class OpenSSL_RSA_Verification_Operation : public PK_Ops::Verification_with_EMSA
{
public:
- typedef RSA_PublicKey Key_Type;
OpenSSL_RSA_Verification_Operation(const RSA_PublicKey& rsa, const std::string& emsa) :
PK_Ops::Verification_with_EMSA(emsa),
@@ -183,7 +180,6 @@ class OpenSSL_RSA_Verification_Operation : public PK_Ops::Verification_with_EMSA
class OpenSSL_RSA_Signing_Operation : public PK_Ops::Signature_with_EMSA
{
public:
- typedef RSA_PrivateKey Key_Type;
OpenSSL_RSA_Signing_Operation(const RSA_PrivateKey& rsa, const std::string& emsa) :
PK_Ops::Signature_with_EMSA(emsa),
diff --git a/src/lib/prov/pkcs11/p11_rsa.cpp b/src/lib/prov/pkcs11/p11_rsa.cpp
index 014419233..1e5f3341f 100644
--- a/src/lib/prov/pkcs11/p11_rsa.cpp
+++ b/src/lib/prov/pkcs11/p11_rsa.cpp
@@ -114,7 +114,6 @@ namespace {
class PKCS11_RSA_Decryption_Operation final : public PK_Ops::Decryption
{
public:
- typedef PKCS11_RSA_PrivateKey Key_Type;
PKCS11_RSA_Decryption_Operation(const PKCS11_RSA_PrivateKey& key,
const std::string& padding,
@@ -173,7 +172,6 @@ class PKCS11_RSA_Decryption_Operation final : public PK_Ops::Decryption
class PKCS11_RSA_Encryption_Operation : public PK_Ops::Encryption
{
public:
- typedef PKCS11_RSA_PublicKey Key_Type;
PKCS11_RSA_Encryption_Operation(const PKCS11_RSA_PublicKey& key, const std::string& padding)
: m_key(key), m_mechanism(MechanismWrapper::create_rsa_crypt_mechanism(padding))
@@ -205,7 +203,6 @@ class PKCS11_RSA_Encryption_Operation : public PK_Ops::Encryption
class PKCS11_RSA_Signature_Operation : public PK_Ops::Signature
{
public:
- typedef PKCS11_RSA_PrivateKey Key_Type;
PKCS11_RSA_Signature_Operation(const PKCS11_RSA_PrivateKey& key, const std::string& padding)
: m_key(key), m_mechanism(MechanismWrapper::create_rsa_sign_mechanism(padding))
@@ -266,7 +263,6 @@ class PKCS11_RSA_Signature_Operation : public PK_Ops::Signature
class PKCS11_RSA_Verification_Operation : public PK_Ops::Verification
{
public:
- typedef PKCS11_RSA_PublicKey Key_Type;
PKCS11_RSA_Verification_Operation(const PKCS11_RSA_PublicKey& key, const std::string& padding)
: m_key(key), m_mechanism(MechanismWrapper::create_rsa_sign_mechanism(padding))
diff --git a/src/lib/pubkey/curve25519/curve25519.cpp b/src/lib/pubkey/curve25519/curve25519.cpp
index fc2fcea0b..216d02600 100644
--- a/src/lib/pubkey/curve25519/curve25519.cpp
+++ b/src/lib/pubkey/curve25519/curve25519.cpp
@@ -120,7 +120,6 @@ namespace {
class Curve25519_KA_Operation : public PK_Ops::Key_Agreement_with_KDF
{
public:
- typedef Curve25519_PrivateKey Key_Type;
Curve25519_KA_Operation(const Curve25519_PrivateKey& key, const std::string& kdf) :
PK_Ops::Key_Agreement_with_KDF(kdf),
diff --git a/src/lib/pubkey/dh/dh.cpp b/src/lib/pubkey/dh/dh.cpp
index 41922c3db..8c7fdd289 100644
--- a/src/lib/pubkey/dh/dh.cpp
+++ b/src/lib/pubkey/dh/dh.cpp
@@ -82,7 +82,6 @@ namespace {
class DH_KA_Operation : public PK_Ops::Key_Agreement_with_KDF
{
public:
- typedef DH_PrivateKey Key_Type;
DH_KA_Operation(const DH_PrivateKey& key, const std::string& kdf, RandomNumberGenerator& rng) :
PK_Ops::Key_Agreement_with_KDF(kdf),
diff --git a/src/lib/pubkey/dsa/dsa.cpp b/src/lib/pubkey/dsa/dsa.cpp
index 1dde7eeb4..6ee633a45 100644
--- a/src/lib/pubkey/dsa/dsa.cpp
+++ b/src/lib/pubkey/dsa/dsa.cpp
@@ -78,7 +78,6 @@ namespace {
class DSA_Signature_Operation : public PK_Ops::Signature_with_EMSA
{
public:
- typedef DSA_PrivateKey Key_Type;
DSA_Signature_Operation(const DSA_PrivateKey& dsa, const std::string& emsa) :
PK_Ops::Signature_with_EMSA(emsa),
m_q(dsa.group_q()),
@@ -145,7 +144,6 @@ DSA_Signature_Operation::raw_sign(const byte msg[], size_t msg_len,
class DSA_Verification_Operation : public PK_Ops::Verification_with_EMSA
{
public:
- typedef DSA_PublicKey Key_Type;
DSA_Verification_Operation(const DSA_PublicKey& dsa,
const std::string& emsa) :
PK_Ops::Verification_with_EMSA(emsa),
diff --git a/src/lib/pubkey/ecdh/ecdh.cpp b/src/lib/pubkey/ecdh/ecdh.cpp
index f3da737bb..1bdf2c209 100644
--- a/src/lib/pubkey/ecdh/ecdh.cpp
+++ b/src/lib/pubkey/ecdh/ecdh.cpp
@@ -26,7 +26,6 @@ namespace {
class ECDH_KA_Operation : public PK_Ops::Key_Agreement_with_KDF
{
public:
- typedef ECDH_PrivateKey Key_Type;
ECDH_KA_Operation(const ECDH_PrivateKey& key, const std::string& kdf) :
PK_Ops::Key_Agreement_with_KDF(kdf),
diff --git a/src/lib/pubkey/ecdsa/ecdsa.cpp b/src/lib/pubkey/ecdsa/ecdsa.cpp
index 48d16caca..0ee66c628 100644
--- a/src/lib/pubkey/ecdsa/ecdsa.cpp
+++ b/src/lib/pubkey/ecdsa/ecdsa.cpp
@@ -44,7 +44,6 @@ namespace {
class ECDSA_Signature_Operation : public PK_Ops::Signature_with_EMSA
{
public:
- typedef ECDSA_PrivateKey Key_Type;
ECDSA_Signature_Operation(const ECDSA_PrivateKey& ecdsa,
const std::string& emsa) :
@@ -101,7 +100,6 @@ ECDSA_Signature_Operation::raw_sign(const byte msg[], size_t msg_len,
class ECDSA_Verification_Operation : public PK_Ops::Verification_with_EMSA
{
public:
- typedef ECDSA_PublicKey Key_Type;
ECDSA_Verification_Operation(const ECDSA_PublicKey& ecdsa,
const std::string& emsa) :
PK_Ops::Verification_with_EMSA(emsa),
diff --git a/src/lib/pubkey/ecgdsa/ecgdsa.cpp b/src/lib/pubkey/ecgdsa/ecgdsa.cpp
index 136f2159a..f21f1bb27 100644
--- a/src/lib/pubkey/ecgdsa/ecgdsa.cpp
+++ b/src/lib/pubkey/ecgdsa/ecgdsa.cpp
@@ -32,7 +32,6 @@ namespace {
class ECGDSA_Signature_Operation : public PK_Ops::Signature_with_EMSA
{
public:
- typedef ECGDSA_PrivateKey Key_Type;
ECGDSA_Signature_Operation(const ECGDSA_PrivateKey& ecgdsa,
const std::string& emsa) :
@@ -83,7 +82,6 @@ ECGDSA_Signature_Operation::raw_sign(const byte msg[], size_t msg_len,
class ECGDSA_Verification_Operation : public PK_Ops::Verification_with_EMSA
{
public:
- typedef ECGDSA_PublicKey Key_Type;
ECGDSA_Verification_Operation(const ECGDSA_PublicKey& ecgdsa,
const std::string& emsa) :
diff --git a/src/lib/pubkey/eckcdsa/eckcdsa.cpp b/src/lib/pubkey/eckcdsa/eckcdsa.cpp
index f3beeeb73..5e2b3394e 100644
--- a/src/lib/pubkey/eckcdsa/eckcdsa.cpp
+++ b/src/lib/pubkey/eckcdsa/eckcdsa.cpp
@@ -38,7 +38,6 @@ namespace {
class ECKCDSA_Signature_Operation : public PK_Ops::Signature_with_EMSA
{
public:
- typedef ECKCDSA_PrivateKey Key_Type;
ECKCDSA_Signature_Operation(const ECKCDSA_PrivateKey& eckcdsa,
const std::string& emsa) :
@@ -112,7 +111,6 @@ ECKCDSA_Signature_Operation::raw_sign(const byte msg[], size_t,
class ECKCDSA_Verification_Operation : public PK_Ops::Verification_with_EMSA
{
public:
- typedef ECKCDSA_PublicKey Key_Type;
ECKCDSA_Verification_Operation(const ECKCDSA_PublicKey& eckcdsa,
const std::string& emsa) :
diff --git a/src/lib/pubkey/elgamal/elgamal.cpp b/src/lib/pubkey/elgamal/elgamal.cpp
index f0ae594ec..90534a430 100644
--- a/src/lib/pubkey/elgamal/elgamal.cpp
+++ b/src/lib/pubkey/elgamal/elgamal.cpp
@@ -69,7 +69,6 @@ namespace {
class ElGamal_Encryption_Operation : public PK_Ops::Encryption_with_EME
{
public:
- typedef ElGamal_PublicKey Key_Type;
size_t max_raw_input_bits() const override { return m_mod_p.get_modulus().bits() - 1; }
@@ -122,7 +121,6 @@ ElGamal_Encryption_Operation::raw_encrypt(const byte msg[], size_t msg_len,
class ElGamal_Decryption_Operation : public PK_Ops::Decryption_with_EME
{
public:
- typedef ElGamal_PrivateKey Key_Type;
size_t max_raw_input_bits() const override
{ return m_mod_p.get_modulus().bits() - 1; }
diff --git a/src/lib/pubkey/gost_3410/gost_3410.cpp b/src/lib/pubkey/gost_3410/gost_3410.cpp
index 7fde29bc5..f483540d4 100644
--- a/src/lib/pubkey/gost_3410/gost_3410.cpp
+++ b/src/lib/pubkey/gost_3410/gost_3410.cpp
@@ -97,7 +97,6 @@ BigInt decode_le(const byte msg[], size_t msg_len)
class GOST_3410_Signature_Operation : public PK_Ops::Signature_with_EMSA
{
public:
- typedef GOST_3410_PrivateKey Key_Type;
GOST_3410_Signature_Operation(const GOST_3410_PrivateKey& gost_3410,
const std::string& emsa) :
PK_Ops::Signature_with_EMSA(emsa),
@@ -156,7 +155,6 @@ GOST_3410_Signature_Operation::raw_sign(const byte msg[], size_t msg_len,
class GOST_3410_Verification_Operation : public PK_Ops::Verification_with_EMSA
{
public:
- typedef GOST_3410_PublicKey Key_Type;
GOST_3410_Verification_Operation(const GOST_3410_PublicKey& gost,
const std::string& emsa) :
diff --git a/src/lib/pubkey/mce/mceliece_key.cpp b/src/lib/pubkey/mce/mceliece_key.cpp
index c65322348..be34cd746 100644
--- a/src/lib/pubkey/mce/mceliece_key.cpp
+++ b/src/lib/pubkey/mce/mceliece_key.cpp
@@ -299,7 +299,6 @@ namespace {
class MCE_KEM_Encryptor : public PK_Ops::KEM_Encryption_with_KDF
{
public:
- typedef McEliece_PublicKey Key_Type;
MCE_KEM_Encryptor(const McEliece_PublicKey& key,
const std::string& kdf) :
@@ -328,7 +327,6 @@ class MCE_KEM_Encryptor : public PK_Ops::KEM_Encryption_with_KDF
class MCE_KEM_Decryptor : public PK_Ops::KEM_Decryption_with_KDF
{
public:
- typedef McEliece_PrivateKey Key_Type;
MCE_KEM_Decryptor(const McEliece_PrivateKey& key,
const std::string& kdf) :
diff --git a/src/lib/pubkey/rsa/rsa.cpp b/src/lib/pubkey/rsa/rsa.cpp
index f0418cf53..eae95fe02 100644
--- a/src/lib/pubkey/rsa/rsa.cpp
+++ b/src/lib/pubkey/rsa/rsa.cpp
@@ -239,7 +239,6 @@ class RSA_Signature_Operation : public PK_Ops::Signature_with_EMSA,
private RSA_Private_Operation
{
public:
- typedef RSA_PrivateKey Key_Type;
size_t max_input_bits() const override { return get_max_input_bits(); };
@@ -264,7 +263,6 @@ class RSA_Decryption_Operation : public PK_Ops::Decryption_with_EME,
private RSA_Private_Operation
{
public:
- typedef RSA_PrivateKey Key_Type;
size_t max_raw_input_bits() const override { return get_max_input_bits(); };
@@ -288,7 +286,6 @@ class RSA_KEM_Decryption_Operation : public PK_Ops::KEM_Decryption_with_KDF,
private RSA_Private_Operation
{
public:
- typedef RSA_PrivateKey Key_Type;
RSA_KEM_Decryption_Operation(const RSA_PrivateKey& key,
const std::string& kdf,
@@ -338,7 +335,6 @@ class RSA_Encryption_Operation : public PK_Ops::Encryption_with_EME,
private RSA_Public_Operation
{
public:
- typedef RSA_PublicKey Key_Type;
RSA_Encryption_Operation(const RSA_PublicKey& rsa, const std::string& eme) :
PK_Ops::Encryption_with_EME(eme),
@@ -360,7 +356,6 @@ class RSA_Verify_Operation : public PK_Ops::Verification_with_EMSA,
private RSA_Public_Operation
{
public:
- typedef RSA_PublicKey Key_Type;
size_t max_input_bits() const override { return get_max_input_bits(); };
@@ -383,7 +378,6 @@ class RSA_KEM_Encryption_Operation : public PK_Ops::KEM_Encryption_with_KDF,
private RSA_Public_Operation
{
public:
- typedef RSA_PublicKey Key_Type;
RSA_KEM_Encryption_Operation(const RSA_PublicKey& key,
const std::string& kdf) :