aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cli/pubkey.cpp2
-rw-r--r--src/lib/asn1/oid_lookup/default.cpp23
-rw-r--r--src/lib/cert/x509/key_constraint.cpp3
-rw-r--r--src/lib/pubkey/nr/info.txt8
-rw-r--r--src/lib/pubkey/nr/nr.cpp192
-rw-r--r--src/lib/pubkey/nr/nr.h57
-rw-r--r--src/lib/pubkey/pk_algs.cpp28
-rw-r--r--src/lib/pubkey/rw/info.txt7
-rw-r--r--src/lib/pubkey/rw/rw.cpp182
-rw-r--r--src/lib/pubkey/rw/rw.h61
-rw-r--r--src/tests/data/pubkey/nr.vec108
-rw-r--r--src/tests/data/pubkey/rw_sig.vec114
-rw-r--r--src/tests/data/pubkey/rw_verify.vec45
-rw-r--r--src/tests/test_nr.cpp69
-rw-r--r--src/tests/test_rw.cpp74
15 files changed, 1 insertions, 972 deletions
diff --git a/src/cli/pubkey.cpp b/src/cli/pubkey.cpp
index a482b6e46..456ebbc8b 100644
--- a/src/cli/pubkey.cpp
+++ b/src/cli/pubkey.cpp
@@ -156,8 +156,6 @@ std::string algo_default_emsa(const std::string& key)
return "EMSA4"; // PSS
else if(key == "ECDSA" || key == "DSA")
return "EMSA1";
- else if(key == "RW")
- return "EMSA2";
else
return "EMSA1";
}
diff --git a/src/lib/asn1/oid_lookup/default.cpp b/src/lib/asn1/oid_lookup/default.cpp
index 8b9d97e38..6527b3b25 100644
--- a/src/lib/asn1/oid_lookup/default.cpp
+++ b/src/lib/asn1/oid_lookup/default.cpp
@@ -21,8 +21,6 @@ const char* default_oid_list()
"1.2.840.10040.4.1 = DSA" "\n"
"1.2.840.10046.2.1 = DH" "\n"
"1.3.6.1.4.1.3029.1.2.1 = ElGamal" "\n"
- "1.3.6.1.4.1.25258.1.1 = RW" "\n"
- "1.3.6.1.4.1.25258.1.2 = NR" "\n"
"1.3.6.1.4.1.25258.1.3 = McEliece" "\n"
"1.3.6.1.4.1.25258.1.4 = Curve25519" "\n"
@@ -123,27 +121,6 @@ const char* default_oid_list()
"1.2.643.2.2.3 = GOST-34.10/EMSA1(GOST-R-34.11-94)" "\n"
- "1.3.6.1.4.1.25258.2.1.1.1 = RW/EMSA2(RIPEMD-160)" "\n"
- "1.3.6.1.4.1.25258.2.1.1.2 = RW/EMSA2(SHA-160)" "\n"
- "1.3.6.1.4.1.25258.2.1.1.3 = RW/EMSA2(SHA-224)" "\n"
- "1.3.6.1.4.1.25258.2.1.1.4 = RW/EMSA2(SHA-256)" "\n"
- "1.3.6.1.4.1.25258.2.1.1.5 = RW/EMSA2(SHA-384)" "\n"
- "1.3.6.1.4.1.25258.2.1.1.6 = RW/EMSA2(SHA-512)" "\n"
-
- "1.3.6.1.4.1.25258.2.1.2.1 = RW/EMSA4(RIPEMD-160)" "\n"
- "1.3.6.1.4.1.25258.2.1.2.2 = RW/EMSA4(SHA-160)" "\n"
- "1.3.6.1.4.1.25258.2.1.2.3 = RW/EMSA4(SHA-224)" "\n"
- "1.3.6.1.4.1.25258.2.1.2.4 = RW/EMSA4(SHA-256)" "\n"
- "1.3.6.1.4.1.25258.2.1.2.5 = RW/EMSA4(SHA-384)" "\n"
- "1.3.6.1.4.1.25258.2.1.2.6 = RW/EMSA4(SHA-512)" "\n"
-
- "1.3.6.1.4.1.25258.2.2.1.1 = NR/EMSA2(RIPEMD-160)" "\n"
- "1.3.6.1.4.1.25258.2.2.1.2 = NR/EMSA2(SHA-160)" "\n"
- "1.3.6.1.4.1.25258.2.2.1.3 = NR/EMSA2(SHA-224)" "\n"
- "1.3.6.1.4.1.25258.2.2.1.4 = NR/EMSA2(SHA-256)" "\n"
- "1.3.6.1.4.1.25258.2.2.1.5 = NR/EMSA2(SHA-384)" "\n"
- "1.3.6.1.4.1.25258.2.2.1.6 = NR/EMSA2(SHA-512)" "\n"
-
"2.5.4.3 = X520.CommonName" "\n"
"2.5.4.4 = X520.Surname" "\n"
"2.5.4.5 = X520.SerialNumber" "\n"
diff --git a/src/lib/cert/x509/key_constraint.cpp b/src/lib/cert/x509/key_constraint.cpp
index a90af013c..30d1cb3b8 100644
--- a/src/lib/cert/x509/key_constraint.cpp
+++ b/src/lib/cert/x509/key_constraint.cpp
@@ -31,8 +31,7 @@ void verify_cert_constraints_valid_for_key_type(const Public_Key& pub_key,
permitted |= KEY_ENCIPHERMENT | DATA_ENCIPHERMENT;
}
- if(name == "RSA" || name == "RW" || name == "NR" ||
- name == "DSA" || name == "ECDSA" || name == "ECGDSA" || name == "ECKCDSA")
+ if(name == "RSA" || name == "DSA" || name == "ECDSA" || name == "ECGDSA" || name == "ECKCDSA")
{
permitted |= DIGITAL_SIGNATURE | NON_REPUDIATION | KEY_CERT_SIGN | CRL_SIGN;
}
diff --git a/src/lib/pubkey/nr/info.txt b/src/lib/pubkey/nr/info.txt
deleted file mode 100644
index 78ca6ef29..000000000
--- a/src/lib/pubkey/nr/info.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-define NYBERG_RUEPPEL 20131128
-
-<requires>
-dl_algo
-dl_group
-keypair
-numbertheory
-</requires>
diff --git a/src/lib/pubkey/nr/nr.cpp b/src/lib/pubkey/nr/nr.cpp
deleted file mode 100644
index 5e2cb1be5..000000000
--- a/src/lib/pubkey/nr/nr.cpp
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
-* Nyberg-Rueppel
-* (C) 1999-2010 Jack Lloyd
-*
-* Botan is released under the Simplified BSD License (see license.txt)
-*/
-
-#include <botan/internal/pk_utils.h>
-#include <botan/nr.h>
-#include <botan/keypair.h>
-#include <botan/reducer.h>
-#include <future>
-
-namespace Botan {
-
-NR_PublicKey::NR_PublicKey(const AlgorithmIdentifier& alg_id,
- const secure_vector<byte>& key_bits) :
- DL_Scheme_PublicKey(alg_id, key_bits, DL_Group::ANSI_X9_57)
- {
- }
-
-/*
-* NR_PublicKey Constructor
-*/
-NR_PublicKey::NR_PublicKey(const DL_Group& grp, const BigInt& y1)
- {
- m_group = grp;
- m_y = y1;
- }
-
-/*
-* Create a NR private key
-*/
-NR_PrivateKey::NR_PrivateKey(RandomNumberGenerator& rng,
- const DL_Group& grp,
- const BigInt& x_arg)
- {
- m_group = grp;
- m_x = x_arg;
-
- if(m_x == 0)
- m_x = BigInt::random_integer(rng, 2, group_q() - 1);
-
- m_y = power_mod(group_g(), m_x, group_p());
-
- if(x_arg == 0)
- gen_check(rng);
- else
- load_check(rng);
- }
-
-NR_PrivateKey::NR_PrivateKey(const AlgorithmIdentifier& alg_id,
- const secure_vector<byte>& key_bits,
- RandomNumberGenerator& rng) :
- DL_Scheme_PrivateKey(alg_id, key_bits, DL_Group::ANSI_X9_57)
- {
- m_y = power_mod(group_g(), m_x, group_p());
-
- load_check(rng);
- }
-
-/*
-* Check Private Nyberg-Rueppel Parameters
-*/
-bool NR_PrivateKey::check_key(RandomNumberGenerator& rng, bool strong) const
- {
- if(!DL_Scheme_PrivateKey::check_key(rng, strong) || m_x >= group_q())
- return false;
-
- if(!strong)
- return true;
-
- return KeyPair::signature_consistency_check(rng, *this, "EMSA1(SHA-1)");
- }
-
-namespace {
-
-/**
-* Nyberg-Rueppel signature operation
-*/
-class NR_Signature_Operation : public PK_Ops::Signature_with_EMSA
- {
- public:
- typedef NR_PrivateKey Key_Type;
- NR_Signature_Operation(const NR_PrivateKey& nr, const std::string& emsa) :
- PK_Ops::Signature_with_EMSA(emsa),
- m_q(nr.group_q()),
- m_x(nr.get_x()),
- m_powermod_g_p(nr.group_g(), nr.group_p()),
- m_mod_q(nr.group_q())
- {
- }
-
- size_t message_parts() const override { return 2; }
- size_t message_part_size() const override { return m_q.bytes(); }
- size_t max_input_bits() const override { return (m_q.bits() - 1); }
-
- secure_vector<byte> raw_sign(const byte msg[], size_t msg_len,
- RandomNumberGenerator& rng) override;
- private:
- const BigInt& m_q;
- const BigInt& m_x;
- Fixed_Base_Power_Mod m_powermod_g_p;
- Modular_Reducer m_mod_q;
- };
-
-secure_vector<byte>
-NR_Signature_Operation::raw_sign(const byte msg[], size_t msg_len,
- RandomNumberGenerator& rng)
- {
- rng.add_entropy(msg, msg_len);
-
- BigInt f(msg, msg_len);
-
- if(f >= m_q)
- throw Invalid_Argument("NR_Signature_Operation: Input is out of range");
-
- BigInt c, d;
-
- while(c == 0)
- {
- BigInt k;
- do
- k.randomize(rng, m_q.bits());
- while(k >= m_q);
-
- c = m_mod_q.reduce(m_powermod_g_p(k) + f);
- d = m_mod_q.reduce(k - m_x * c);
- }
-
- secure_vector<byte> output(2*m_q.bytes());
- c.binary_encode(&output[output.size() / 2 - c.bytes()]);
- d.binary_encode(&output[output.size() - d.bytes()]);
- return output;
- }
-
-
-/**
-* Nyberg-Rueppel verification operation
-*/
-class NR_Verification_Operation : public PK_Ops::Verification_with_EMSA
- {
- public:
- typedef NR_PublicKey Key_Type;
- NR_Verification_Operation(const NR_PublicKey& nr, const std::string& emsa) :
- PK_Ops::Verification_with_EMSA(emsa),
- m_q(nr.group_q()), m_y(nr.get_y()), m_powermod_g_p{Fixed_Base_Power_Mod(nr.group_g(), nr.group_p())},
- m_powermod_y_p{Fixed_Base_Power_Mod(m_y, nr.group_p())}, m_mod_p{Modular_Reducer(nr.group_p())},
- m_mod_q{Modular_Reducer(nr.group_q())}
- {}
-
- size_t message_parts() const override { return 2; }
- size_t message_part_size() const override { return m_q.bytes(); }
- size_t max_input_bits() const override { return (m_q.bits() - 1); }
-
- bool with_recovery() const override { return true; }
-
- secure_vector<byte> verify_mr(const byte msg[], size_t msg_len) override;
- private:
- const BigInt& m_q;
- const BigInt& m_y;
-
- Fixed_Base_Power_Mod m_powermod_g_p, m_powermod_y_p;
- Modular_Reducer m_mod_p, m_mod_q;
- };
-
-secure_vector<byte>
-NR_Verification_Operation::verify_mr(const byte msg[], size_t msg_len)
- {
- const BigInt& q = m_mod_q.get_modulus();
-
- if(msg_len != 2*q.bytes())
- throw Invalid_Argument("NR verification: Invalid signature");
-
- BigInt c(msg, q.bytes());
- BigInt d(msg + q.bytes(), q.bytes());
-
- if(c.is_zero() || c >= q || d >= q)
- throw Invalid_Argument("NR verification: Invalid signature");
-
- auto future_y_c = std::async(std::launch::async, m_powermod_y_p, c);
- BigInt g_d = m_powermod_g_p(d);
-
- BigInt i = m_mod_p.multiply(g_d, future_y_c.get());
- return BigInt::encode_locked(m_mod_q.reduce(c - i));
- }
-}
-
-BOTAN_REGISTER_PK_SIGNATURE_OP("NR", NR_Signature_Operation);
-BOTAN_REGISTER_PK_VERIFY_OP("NR", NR_Verification_Operation);
-
-}
diff --git a/src/lib/pubkey/nr/nr.h b/src/lib/pubkey/nr/nr.h
deleted file mode 100644
index 425ad2642..000000000
--- a/src/lib/pubkey/nr/nr.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-* Nyberg-Rueppel
-* (C) 1999-2010 Jack Lloyd
-*
-* Botan is released under the Simplified BSD License (see license.txt)
-*/
-
-#ifndef BOTAN_NYBERG_RUEPPEL_H__
-#define BOTAN_NYBERG_RUEPPEL_H__
-
-#include <botan/dl_algo.h>
-
-namespace Botan {
-
-/**
-* Nyberg-Rueppel Public Key
-*/
-class BOTAN_DLL NR_PublicKey : public virtual DL_Scheme_PublicKey
- {
- public:
- std::string algo_name() const override { return "NR"; }
-
- 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() - 1); }
-
- NR_PublicKey(const AlgorithmIdentifier& alg_id,
- const secure_vector<byte>& key_bits);
-
- NR_PublicKey(const DL_Group& group, const BigInt& pub_key);
- protected:
- NR_PublicKey() {}
- };
-
-/**
-* Nyberg-Rueppel Private Key
-*/
-class BOTAN_DLL NR_PrivateKey : public NR_PublicKey,
- public virtual DL_Scheme_PrivateKey
- {
- public:
- bool check_key(RandomNumberGenerator& rng, bool strong) const override;
-
- NR_PrivateKey(const AlgorithmIdentifier& alg_id,
- const secure_vector<byte>& key_bits,
- RandomNumberGenerator& rng);
-
- NR_PrivateKey(RandomNumberGenerator& rng,
- const DL_Group& group,
- const BigInt& x = 0);
- };
-
-}
-
-#endif
diff --git a/src/lib/pubkey/pk_algs.cpp b/src/lib/pubkey/pk_algs.cpp
index 9dbde28af..ac6f4a11f 100644
--- a/src/lib/pubkey/pk_algs.cpp
+++ b/src/lib/pubkey/pk_algs.cpp
@@ -36,14 +36,6 @@
#include <botan/gost_3410.h>
#endif
-#if defined(BOTAN_HAS_NYBERG_RUEPPEL)
- #include <botan/nr.h>
-#endif
-
-#if defined(BOTAN_HAS_RW)
- #include <botan/rw.h>
-#endif
-
#if defined(BOTAN_HAS_ELGAMAL)
#include <botan/elgamal.h>
#endif
@@ -74,11 +66,6 @@ Public_Key* make_public_key(const AlgorithmIdentifier& alg_id,
return new RSA_PublicKey(alg_id, key_bits);
#endif
-#if defined(BOTAN_HAS_RW)
- if(alg_name == "RW")
- return new RW_PublicKey(alg_id, key_bits);
-#endif
-
#if defined(BOTAN_HAS_DSA)
if(alg_name == "DSA")
return new DSA_PublicKey(alg_id, key_bits);
@@ -89,11 +76,6 @@ Public_Key* make_public_key(const AlgorithmIdentifier& alg_id,
return new DH_PublicKey(alg_id, key_bits);
#endif
-#if defined(BOTAN_HAS_NYBERG_RUEPPEL)
- if(alg_name == "NR")
- return new NR_PublicKey(alg_id, key_bits);
-#endif
-
#if defined(BOTAN_HAS_ELGAMAL)
if(alg_name == "ElGamal")
return new ElGamal_PublicKey(alg_id, key_bits);
@@ -150,11 +132,6 @@ Private_Key* make_private_key(const AlgorithmIdentifier& alg_id,
return new RSA_PrivateKey(alg_id, key_bits, rng);
#endif
-#if defined(BOTAN_HAS_RW)
- if(alg_name == "RW")
- return new RW_PrivateKey(alg_id, key_bits, rng);
-#endif
-
#if defined(BOTAN_HAS_DSA)
if(alg_name == "DSA")
return new DSA_PrivateKey(alg_id, key_bits, rng);
@@ -165,11 +142,6 @@ Private_Key* make_private_key(const AlgorithmIdentifier& alg_id,
return new DH_PrivateKey(alg_id, key_bits, rng);
#endif
-#if defined(BOTAN_HAS_NYBERG_RUEPPEL)
- if(alg_name == "NR")
- return new NR_PrivateKey(alg_id, key_bits, rng);
-#endif
-
#if defined(BOTAN_HAS_ELGAMAL)
if(alg_name == "ElGamal")
return new ElGamal_PrivateKey(alg_id, key_bits, rng);
diff --git a/src/lib/pubkey/rw/info.txt b/src/lib/pubkey/rw/info.txt
deleted file mode 100644
index 7cf1d1780..000000000
--- a/src/lib/pubkey/rw/info.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-define RW 20131128
-
-<requires>
-if_algo
-keypair
-numbertheory
-</requires>
diff --git a/src/lib/pubkey/rw/rw.cpp b/src/lib/pubkey/rw/rw.cpp
deleted file mode 100644
index bf6b647a1..000000000
--- a/src/lib/pubkey/rw/rw.cpp
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
-* Rabin-Williams
-* (C) 1999-2008 Jack Lloyd
-*
-* Botan is released under the Simplified BSD License (see license.txt)
-*/
-
-#include <botan/internal/pk_utils.h>
-#include <botan/rw.h>
-#include <botan/keypair.h>
-#include <botan/parsing.h>
-#include <botan/reducer.h>
-#include <botan/blinding.h>
-#include <algorithm>
-#include <future>
-
-namespace Botan {
-
-/*
-* Create a Rabin-Williams private key
-*/
-RW_PrivateKey::RW_PrivateKey(RandomNumberGenerator& rng,
- size_t bits, size_t exp)
- {
- if(bits < 1024)
- throw Invalid_Argument(algo_name() + ": Can't make a key that is only " +
- std::to_string(bits) + " bits long");
- if(exp < 2 || exp % 2 == 1)
- throw Invalid_Argument(algo_name() + ": Invalid encryption exponent");
-
- m_e = exp;
-
- do
- {
- m_p = random_prime(rng, (bits + 1) / 2, m_e / 2, 3, 4);
- m_q = random_prime(rng, bits - m_p.bits(), m_e / 2, ((m_p % 8 == 3) ? 7 : 3), 8);
- m_n = m_p * m_q;
- } while(m_n.bits() != bits);
-
- m_d = inverse_mod(m_e, lcm(m_p - 1, m_q - 1) >> 1);
- m_d1 = m_d % (m_p - 1);
- m_d2 = m_d % (m_q - 1);
- m_c = inverse_mod(m_q, m_p);
-
- gen_check(rng);
- }
-
-/*
-* Check Private Rabin-Williams Parameters
-*/
-bool RW_PrivateKey::check_key(RandomNumberGenerator& rng, bool strong) const
- {
- if(!IF_Scheme_PrivateKey::check_key(rng, strong))
- return false;
-
- if(!strong)
- return true;
-
- if((m_e * m_d) % (lcm(m_p - 1, m_q - 1) / 2) != 1)
- return false;
-
- return KeyPair::signature_consistency_check(rng, *this, "EMSA2(SHA-1)");
- }
-
-namespace {
-
-/**
-* Rabin-Williams Signature Operation
-*/
-class RW_Signature_Operation : public PK_Ops::Signature_with_EMSA
- {
- public:
- typedef RW_PrivateKey Key_Type;
-
- RW_Signature_Operation(const RW_PrivateKey& rw,
- const std::string& emsa) :
- PK_Ops::Signature_with_EMSA(emsa),
- m_n(rw.get_n()),
- m_e(rw.get_e()),
- m_q(rw.get_q()),
- m_c(rw.get_c()),
- m_powermod_d1_p(rw.get_d1(), rw.get_p()),
- m_powermod_d2_q(rw.get_d2(), rw.get_q()),
- m_mod_p(rw.get_p()),
- m_blinder(m_n,
- [this](const BigInt& k) { return power_mod(k, m_e, m_n); },
- [this](const BigInt& k) { return inverse_mod(k, m_n); })
- {
- }
-
- size_t max_input_bits() const override { return (m_n.bits() - 1); }
-
- secure_vector<byte> raw_sign(const byte msg[], size_t msg_len,
- RandomNumberGenerator& rng) override;
- private:
- const BigInt& m_n;
- const BigInt& m_e;
- const BigInt& m_q;
- const BigInt& m_c;
-
- Fixed_Exponent_Power_Mod m_powermod_d1_p, m_powermod_d2_q;
- Modular_Reducer m_mod_p;
- Blinder m_blinder;
- };
-
-secure_vector<byte>
-RW_Signature_Operation::raw_sign(const byte msg[], size_t msg_len,
- RandomNumberGenerator&)
- {
- BigInt i(msg, msg_len);
-
- if(i >= m_n || i % 16 != 12)
- throw Invalid_Argument("Rabin-Williams: invalid input");
-
- if(jacobi(i, m_n) != 1)
- i >>= 1;
-
- i = m_blinder.blind(i);
-
- auto future_j1 = std::async(std::launch::async, m_powermod_d1_p, i);
- const BigInt j2 = m_powermod_d2_q(i);
- BigInt j1 = future_j1.get();
-
- j1 = m_mod_p.reduce(sub_mul(j1, j2, m_c));
-
- const BigInt r = m_blinder.unblind(mul_add(j1, m_q, j2));
-
- return BigInt::encode_1363(std::min(r, m_n - r), m_n.bytes());
- }
-
-/**
-* Rabin-Williams Verification Operation
-*/
-class RW_Verification_Operation : public PK_Ops::Verification_with_EMSA
- {
- public:
- typedef RW_PublicKey Key_Type;
-
- RW_Verification_Operation(const RW_PublicKey& rw, const std::string& emsa) :
- PK_Ops::Verification_with_EMSA(emsa),
- m_n(rw.get_n()), m_powermod_e_n(rw.get_e(), rw.get_n())
- {}
-
- size_t max_input_bits() const override { return (m_n.bits() - 1); }
- bool with_recovery() const override { return true; }
-
- secure_vector<byte> verify_mr(const byte msg[], size_t msg_len) override;
-
- private:
- const BigInt& m_n;
- Fixed_Exponent_Power_Mod m_powermod_e_n;
- };
-
-secure_vector<byte>
-RW_Verification_Operation::verify_mr(const byte msg[], size_t msg_len)
- {
- BigInt m(msg, msg_len);
-
- if((m > (m_n >> 1)) || m.is_negative())
- throw Invalid_Argument("RW signature verification: m > n / 2 || m < 0");
-
- BigInt r = m_powermod_e_n(m);
- if(r % 16 == 12)
- return BigInt::encode_locked(r);
- if(r % 8 == 6)
- return BigInt::encode_locked(2*r);
-
- r = m_n - r;
- if(r % 16 == 12)
- return BigInt::encode_locked(r);
- if(r % 8 == 6)
- return BigInt::encode_locked(2*r);
-
- throw Invalid_Argument("RW signature verification: Invalid signature");
- }
-
-BOTAN_REGISTER_PK_SIGNATURE_OP("RW", RW_Signature_Operation);
-BOTAN_REGISTER_PK_VERIFY_OP("RW", RW_Verification_Operation);
-
-}
-
-}
diff --git a/src/lib/pubkey/rw/rw.h b/src/lib/pubkey/rw/rw.h
deleted file mode 100644
index 2a010441e..000000000
--- a/src/lib/pubkey/rw/rw.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
-* Rabin-Williams
-* (C) 1999-2007 Jack Lloyd
-*
-* Botan is released under the Simplified BSD License (see license.txt)
-*/
-
-#ifndef BOTAN_RW_H__
-#define BOTAN_RW_H__
-
-#include <botan/if_algo.h>
-
-namespace Botan {
-
-/**
-* Rabin-Williams Public Key
-*/
-class BOTAN_DLL RW_PublicKey : public virtual IF_Scheme_PublicKey
- {
- public:
- std::string algo_name() const override { return "RW"; }
-
- RW_PublicKey(const AlgorithmIdentifier& alg_id,
- const secure_vector<byte>& key_bits) :
- IF_Scheme_PublicKey(alg_id, key_bits)
- {}
-
- RW_PublicKey(const BigInt& mod, const BigInt& exponent) :
- IF_Scheme_PublicKey(mod, exponent)
- {}
-
- protected:
- RW_PublicKey() {}
- };
-
-/**
-* Rabin-Williams Private Key
-*/
-class BOTAN_DLL RW_PrivateKey : public RW_PublicKey,
- public IF_Scheme_PrivateKey
- {
- public:
- RW_PrivateKey(const AlgorithmIdentifier& alg_id,
- const secure_vector<byte>& key_bits,
- RandomNumberGenerator& rng) :
- IF_Scheme_PrivateKey(rng, alg_id, key_bits) {}
-
- RW_PrivateKey(RandomNumberGenerator& rng,
- const BigInt& p, const BigInt& q,
- const BigInt& e, const BigInt& d = 0,
- const BigInt& n = 0) :
- IF_Scheme_PrivateKey(rng, p, q, e, d, n) {}
-
- RW_PrivateKey(RandomNumberGenerator& rng, size_t bits, size_t = 2);
-
- bool check_key(RandomNumberGenerator& rng, bool) const override;
- };
-
-}
-
-#endif
diff --git a/src/tests/data/pubkey/nr.vec b/src/tests/data/pubkey/nr.vec
deleted file mode 100644
index 7ea0b5f58..000000000
--- a/src/tests/data/pubkey/nr.vec
+++ /dev/null
@@ -1,108 +0,0 @@
-
-Hash = SHA-1
-P = 13232376895198612407547930718267435757728527029623408872245156039757713029036368719146452186041204237350521785240337048752071462798273003935646236777459223
-Q = 857393771208094202104259627990318636601332086981
-G = 11629401773565540073100961473632977008134185076958364415809981826641612629974728305105606061133984394938666464842000720534465163992699133277631369246002549
-X = 690137371285617821883812262785390552483969245734
-Msg = FCABA2CF434AC8DCFCEC
-Nonce = 91F1D3A9C129D91120EA3F6486A079AA695AB632
-Signature = 44EC399FAA3853B7F7313FCCB3A30B82B20A18C45E53188FC58B0E3C141A0851BAEA0A7723C71A94
-
-Hash = SHA-1
-P = 11539157087115501064443313862230776814501503314908866582520064395234214662096469833944226801182094864301551078051839094523689065169630864970454325952246003
-Q = 4611867475027478089006048754416511599991217483222299946239
-G = 6840886814729250448628234878216116001269356551393119934540583512165344555273987561922034037109642507867428525278842646754491096970938164337278633387482001
-X = 1883033040916132991100735190078580013234350924382655236344
-Msg = 5075752E
-Nonce = A876034938F576056B00569E4706963C8B28D23E03AEABE2
-Signature = 3097CCDF824E2BB33089DAA042551335625D9802A2BDE54C10810881157C8DC37E2ADC8195251FBE040B919D56512F57
-
-Hash = SHA-1
-P = 21493319731966889395799474793674095481723722419442661804680140633335622798225252248476045677397436074434085647562851808408438818911783503270078118300840749
-Q = 2448429158401879693785391062978880053200446269131
-G = 4203761693330811086621862151184427969736787878615125490977811499372765210480369328510227659014955675161810152504096942847711228481122133020330912131088488
-X = 2021846214679266501848864964638443639868567441259
-Msg = 5075752E
-Nonce = 019E4706963C8B28D23E03AEABE27C7B294EEC2337
-Signature = 006AAA75DD2B3A7AE867D2DA3581D04AE2AAA5905C0074F8C1507136682A93A23A89504DC0FEA5603946
-
-Hash = SHA-1
-P = 35830843685758796191508259498352925866257295533427704319070381297423750780192082137963436364930795492409541031064272330680223674416403180136573368273413749
-Q = 2448429158401879693785391062978880053200446269131
-G = 5290860346671742549277477828426565321171404093164267704697578220977450055062732322451195806155297850087747074380869149080130132451724804988893066580084340
-X = 1649869239975171591476437377401006250492835853262
-Msg = 5075752E
-Nonce = 019540EEBCCFFBC202BB81AD78F1E046F4D4597F53
-Signature = 013D9A09041BA0E9DD2ECE20C5042F5442DD14C8F00113A3C080CB2B8FCC156D33E7FB8966032FE1570D
-
-Hash = SHA-1
-P = 140216752278600893405703049381038106466439992842926641456608953608349773182806651998779141954572985837754248088548038650964859967484756133596402858595223598718762187370713301783055866344582170960945605918540977304299009366211417416442912323654642193555012972631965464344489591125740216730885895427547016442089
-Q = 17664434429951611987885446903779562647393233487261
-G = 103172929054303770690939275696854890328330388523369933172989492329033218850064284598935370056999657672388300721493303716791847736030771754006167529200711350097996970123193674509190741058192564015421755738018474299227597843185650645225450031497015978814063018225280067737398554797638834576543770866767917382576
-X = 9216662458075461813441473730167636850659942976016
-Msg = 5075752E
-Nonce = 0AF20FE4162B721067160E55F9BC980AAC8A51BFCC
-Signature = 05B325CB3BAC1A189B132F8F88DB1389958604305104AB71A2C77D8A9C9026559C2E1765D44A81A1178B
-
-Hash = SHA-1
-P = 301164513047973738819737863923065529772693984731550072752736054506472125309312211411181830533992242283304962453762009830563777450843078947095340533761364645205077068779239171754462303166309130350364690633659047670592562646315208077550758968504608591739918637523132651620932257937394751403503356774821801467331
-Q = 17664434429951611987885446903779562647393233487261
-G = 109878721885498452449845699239583955684868586896311014124779988390432343992663258694986210605150036214426823642714691392396570235722052158072237456051272972227372469236772215281153923487765650215573437828715500032798737742846561463845735026996521961545383384496833091910320864533657907014709078376595881364845
-X = 9672614292481226693960166253962510771536576389944
-Msg = 47656E6B696B656E67617220466C61726521
-Nonce = 0A9A8513912E5A2AA2375A50A53E505C0F8D4D0A7F
-Signature = 082B6655BB32ED12D90CA95B8DDCBE36DA1DF3C96F009F88917FCB93F04D6198D438A1EF1FB732914332
-
-Hash = SHA-1
-P = 660703140020436920365598902080870476496289380520011387299596216821937476920314137676598785178807314325545190213504796545881356988471912192081035395040312893960612855628970142307066742368801318589270856537829059208268864011000133840498585189586263066066619720891141025456081333611140755308457869893203540507391
-Q = 87816513021834952061662318874161147590877995550057
-G = 323101247392657525008071693290907082407373408613350240111018443116964264958293859895147919396175836914648220360417188806609171792878531288691654693297452754739705338932798481785294159148443232564990176903662128014218757109880275171610833163055983871798086534511144978777985043569325074103197213925980821084011
-X = 33056640489775673385219123577423039086031497077560
-Msg = 47656E6B696B656E67617220466C61726521
-Nonce = 2A9A8513912E5A2AA2375A50A53E505C0F8D4D0A7F
-Signature = 34CD8EEF38DE00C87C2281ADEA5A597E85AFB8BDB42F59C80618D6EDB7361EF76674C0D535B31BDA3A9A
-
-Hash = SHA-1
-P = 1379780393965363283457320978396480369943480172096934016393316541452868180142317990207432694468437458410025645732990369976516516063729578682052425117598209391471684429328432083412275620773785695067083188346169082283621466740369985366394237631749572014720021772369666276935677436710491086612709427431422684117033
-Q = 87816513021834952061662318874161147590877995550057
-G = 1311969761382233592297578466165621268108129107689358121907769337880867301593670907143892175375566348862635411711374254007220774729472266605648630030603637282192333501605194501700719677843468373081976857008453088208080541406832891414075067602512850266116823025420778037639787577775282728456511758898079378412121
-X = 33056640489775673385219123577423039086031497077560
-Msg = 47656E6B696B656E67617220466C61726521
-Nonce = 2A9A8513912E5A2AA2375A50A53E505C0F8D4D0A7F
-Signature = 3255F933B90A659F32A2CEBDAD6C3465A494A87D350255D303139C95B0B60D3258A060B4510B0F26B22A
-
-Hash = SHA-1
-P = 2215835318919259185407136225166932443628083477708275860820654775805976008986844847116208531154747351262647682385758497411128854630678369023632414267685978088840312891295034156027960434251678198162918925642789892491604036248910534219539204654146485930985719383163759172858331638167627440903411015733068753273027
-Q = 64309387768281421215468729727290653627386295176121
-G = 1475310677586848995805494750762847694416864504694891230462845662059434954071887636112972407455438977563974495334718719978332643627390509315535841598673191776642366618729540242890273779397393741683596497385923869352052197961340599682222007901084919110828432197144483667033529875944525571083261123938926291555084
-X = 63738456098411319716118727591110898184859942159140
-Msg = B5E19E15868A062940B6909033B90A659F32A203
-Nonce = 2B51BC665CF466B2CEC3DCA92F6D8F0F02F6A4F05E
-Signature = 26F372588C0F5C1C71E32CE62E32B35C6A28C0454C0B6E09F2D96697037955B5EB51F38DA7B82F4C2C1B
-
-Hash = SHA-1
-P = 5505419827986981360083225706842467131767674143833794155961952892326024602512762050244188643341345352720149399867357379100834131418709353131827461694214183281686904885134573880240966656029267037736401776255169735480999895658507104122229743232182355716634936075734224169017149362830817700617535698331873614423333
-Q = 64149332069385337811352784807066226782206009894953
-G = 2209689516064916258301675205049467919080756622901846282997645916360951199910468772603886780375737673116724508378029587901519875020180283287060054683322382042615391178144742613811136707400642780906564250493022359468675209660353704542003948653839849585992866634088325506865322813990632995812250475462302465328099
-X = 36554240750905903253864460752696908094868073092201
-Msg = B5E19E15868A062940B6909033B90A659F32A202
-Nonce = 260FE1BF1BC190EB4014A860AD06DAACF0E62B5C2D
-Signature = 06FDDB7CC9347C59CA19C4C1D1489A333C2AC894400BB70AAD611DF63BAB771F0418605456957DA85FEF
-
-Hash = SHA-1
-P = 9250511942545843330250071173117860277568745788853414359370800439964570922849233589996096207730504873439659011115968230464487751688751178048713386511354094948254917838369172236982578927078353941647172074469591206853805560338228966334759312206175943223147016446334199288955810713526193635473525613891428251917643
-Q = 86817770948500646696376153866298303732836782970827
-G = 724918010552210077957259566048848276720076781283162106375865877958493111978322253687534787631911218249370474608056384339729299831713149909912058500497813465443708704666375256581242479984935812641837885785219922258472517621022924127430688333574757524554461547464239654242787326906525790210552401334762974618211
-X = 31970297447971648840599273756646875320184370534450
-Msg = B5E19E15868A062940B6909033B90A659F32A201
-Nonce = 2C6C5DDC20577082E4711D5F1327B0A8EEAA166617
-Signature = 2A8EE316C60FBB17BA8FC78D07402BC3B70E90D7060A80875979E0A2C63F67E871C1B80A2F3ECA1F6FCD
-
-Hash = SHA-1
-P = 19111252109879106551762735748075186208134979696829360100271814234024764304315225414805509744577336657096425461263248528046784276440964807828814289094498689903366980653888641241375585465860443155152933260465951241648574220324726817294643663179877120505866654270179791400891310032585850557581323522175688455763583
-Q = 81922656227567365417492475134687902350001383859709
-G = 14192377354377485672607889615664569982217004959622462208284683423636765305938230251294168377121489109009071925504129143063559851028061260650266772077602325176109397561736099074924449774999498908553216425305363194605557225748874563803272070193223634377877400558810380140400568592238681843565083451652221215870033
-X = 28748754198429578100702948616241622132862396928023
-Msg = 80EC0767A54D67D3E086EE2B47E8527DD71BFC2911B11E40
-Nonce = 23AEAF18FB8F0D808218A587F86C16B16AA5DFA48E
-Signature = 084ECEC098E77A72CDB6AE4BB5B77FD81EA19904962B89AD966FB795F201BE01BA0D5CBA8A63BBBB222D
diff --git a/src/tests/data/pubkey/rw_sig.vec b/src/tests/data/pubkey/rw_sig.vec
deleted file mode 100644
index 515532f81..000000000
--- a/src/tests/data/pubkey/rw_sig.vec
+++ /dev/null
@@ -1,114 +0,0 @@
-
-E = 2
-P = 109498832837193349942352787694410757220743898293950008902229768464763555846411
-Q = 85230704000388320343522047881225795219999050879145593285943985369507278238159
-Msg = 5075752E
-Signature = 44CB3C6CD992A656AC2D8C92E044FCCC60FAA1B47FE153E7BA4B647136DA4A4288BD50FB0935E3B9180AF477F8B88E1EA1106569CCAB8D354E0A7E3AC92D70B3
-
-E = 2
-P = 109865738846453297504870443124415697975266037607085001559257420422594220882891
-Q = 98694408656025624050695264343005989524606446925918783808403866808761791794879
-Msg = A0C554E8D58C73A23F4725F1429E2F22
-Signature = 444C53E0B8CB70F1E8DC7788D390D4ECED5327800C122AB09C721DD08FE1E51A6FC8840140484014E64DA5D03A4F50ADE0D3E0B7C9C10B84D2B57045D6445121
-
-E = 2
-P = 143336889641615010244496430978489546339101892549496727101913128299881609918627
-Q = 151926545718894569699926859267668314402054550931627831706467116313636054387719
-Msg = CD5D30D1FCCF06CF6733D4416DB31B711461B81D53A855969E0E4A631D65E37B
-Signature = 0047459B8B8A46F43C6E54AA7D5B186AB997653BAFFD6EE9836ED0E4C38D12CCB8A1909A1FC1A4B9078946856287C280DF516BE8BAE4E17A9EECFD04B07F9310CE
-
-E = 2
-P = 182949987979358144640279185334649223492192688082789988743518134058381626294243
-Q = 217661937100392176429471532487409307118283276201469365990573762972129550201199
-Msg = 6BB7CFD26643B1202C3A437C4011DCEC6C3052164C1A5DA06DA42C1344D04CDA
-Signature = 00415BE626CE0173D34AAF57A86E66BC551C77A41AF32EFB64A3861E4F66EFEDDC2591360708B28338DE282F98A9DB05A0F2AD09427798BC98CE79F4D88C5EF1BE
-
-E = 2
-P = 192918421933113071672663571790417136575315830343623361517062943483820137610547
-Q = 219272031000798787900070278061750019215061926937271003090760219962651645895279
-Msg = E8B950C5BC86786FD69BCDF0FF8C5CA1BACE33FAB4260DB5814D8D11B8F1C7F9
-Signature = 00E51E4A98686C324B0356DF93058710E2B13B2FED029B2BF7F15DF8EF9BF209E1DEA5A101E614D6A843B9E4B218633D4D2E88398DF0C919EE9747F0CDEDE943BB
-
-E = 2
-P = 251763799668299139801148051936996493750316333616200301101265631148955054519003
-Q = 273942130639566796395628522491377999143259784737482155942900369025738294484647
-Msg = 54657374696E6720766172696F7573206B657973697A657320666F72205257207369676E6174757265733A2035313220746F203531392C20616E642031303234
-Signature = 0191F1BA45BC571445612D8C1A7818B52DFF78566E6CCFF7AB55B2F35FA21210C951F171E27A2921032718AE01BB4F209164BA0B21A5842D1925B35D09C7538050
-
-E = 2
-P = 409327577911563897329676201153305399224622257769264083949192266671863994023819
-Q = 341703906964487478759596292996274739409750155006525111822762040290119222665991
-Msg = 54657374696E6720766172696F7573206B657973697A657320666F72205257207369676E6174757265733A2035313220746F203531392C20616E642031303234
-Signature = 046C31E4EA320DF130FE1F361184DDC03713BBAC169E08266B91655B42A01F39E1E3FF781B04B2F44B2504F37ACC9688C1ADD7EB94A998779EFCDFBEB9FAFFC82D
-
-E = 2
-P = 542011156169896018363979833341171988540613020356308206083427540015546115987387
-Q = 588172110649890433110066846624960065830759891988972734390859461944450439293431
-Msg = 54657374696E6720766172696F7573206B657973697A657320666F72205257207369676E6174757265733A2035313220746F203531392C20616E642031303234
-Signature = 01BF0E20BF646E5E427B8D28CBAF696D7AA6B6DE878BB91C295D5559B1FA9A94F114FF61C11C0BC97066C2FC919815B0FD150CE70F63D696CEA4D5D1D7BDEDC035
-
-E = 2
-P = 771754770322374918077056807903198519432205177728078647887981967576575978481467
-Q = 786476629036513622552685880695741484791006753374459242149779582249234250146599
-Msg = 990B98BDAB266B4F5775025849FFFA9D344456AD023E7485
-Signature = 05F380320796E88C07170EE43F5497E3A84865E8BCD9EFFBC59D3E18B0CF785D668C5D8F99ECF36CCC4446EE3D3DA96DD5DA01BC2622743F9CF32D4790E3DFC3A9
-
-E = 2
-P = 1148355730975347131387674372822971414014271826139830720434999981897070232737907
-Q = 1254657073389576341606193988392457393961175021782268524267609443939027314335303
-Msg = D31A3E95F25DD795DE8A03C02A728436FE69F47177191183
-Signature = 05F7A7BF7B8A5EFA209885F0BCCF365FB6196E40A271E0000245FCFA98FF6DD5A35D7FBBB7218DC80A2AF20CA4499B8BD283B0DEEB5AF51DE283D054ECCEAA7C28
-
-E = 2
-P = 11920069466388025699244766440706927938965059002714491243177000161378000266109851115065694697794227241273343580951202247629310020256601693186944788025991843
-Q = 10777605005897273896785043775935571603158137557557200763166615929482216506057635943544427604777885488270215488764833385892798734511893248802408897989014263
-Msg = A76359F624250AFA5663B9783DE68D51369D972A89738D1C
-Signature = 26E13DBB1262A91761E6C5E6278401F7E80DB3DF947A81A8574404446D7C095883996CDA19346B0B46DBD38B9AE10ED8A4F76742C352B8DF85F8BC28F7A0BFE8EA0520A63A3B1A492E3D9F7FC492ADFB2295BE8BB6200317963AE978CFF89B300904859EF00FD7784CE630B30066D4500666B1673CD4263B49CFCB3A1D6A51A5
-
-E = 2
-P = 12545037330810088207768168723878733954756730747728115083756898577519070470389840741025833975537982084207671034725541309978724324975075329600505345504520219
-Q = 12870002110810180474990402294641834896535792812534110350536651271565094596430383644373958805954527115948325417945374873044426407582211769447386123601766879
-Msg = 2CA039854B55688740E3
-Signature = 1AF029CBEC9C692CE5096E73E4E9A52EC9A28D207A5511CCEC7681E5E3D867A4AE2E22DE4909D89196A272F1B50DE6FA3248BCA334D46E0D57171A790B6F4697E7BA7047DB79DECD47BD21995243DEBBF25915DDBC93C45875C14DE953792257C5C6825C905AFF40109C8CC7E793123D47AC1B5B6304A436CFA9BEEC8E0054E7
-
-E = 2
-P = 12545037330810088207768168723878733954756730747728115083756898577519070470389840741025833975537982084207671034725541309978724324975075329600505345504520219
-Q = 12870002110810180474990402294641834896535792812534110350536651271565094596430383644373958805954527115948325417945374873044426407582211769447386123601766879
-Msg = 2119A954F1AC0F3DCDB2
-Signature = 60C3CCF4F086B15B7F850B445F384333F7AE5A4B5EDE2820C7233239E1B86D6E4B4FCA4F50B087CE1DF17DA5D62672A17F2CF87A2875BBD9B138CAF6863821D6A4D553E9EB64C9254A8F9A6B960E57E39069D65E3F561AA1FA91643D42FEEFB9270D34AB0861DEA1E234EA587F580503D46A1989D413DAC2FFE0FC4CA663CE68
-
-E = 2
-P = 12545037330810088207768168723878733954756730747728115083756898577519070470389840741025833975537982084207671034725541309978724324975075329600505345504520219
-Q = 12870002110810180474990402294641834896535792812534110350536651271565094596430383644373958805954527115948325417945374873044426407582211769447386123601766879
-Msg = 7A4C634DE6F16315BD5F
-Signature = 308A5D65224201BED626CC83FB901EC84874EE03B2E7AB4E752EDBDE024C754E3CC9841CA062100A8843DE9183354B4E0596E8C68F1605828287884F0F9BA6968FC7A9F0CA09418A8485B90465E5D3F96CE4995A5FC7A6E5ABD9CC06BB8A2C3C8109F72EAE67FB4C108852C881CA645B3C5586F27F12FF3028ADE56E32AD9434
-
-E = 2
-P = 157704599352069859921156397442363312110769306142195838598773542758154595866567210022640109888478413022709250917899819531357360018250143692500197076580934099
-Q = 207895480306421993885928959277756332378135790107557439472247328444554879933219045837896240872517904914421631349451165104093054667050399312478738341782350039
-Msg = EF0F1D56F4E5D587C212
-Signature = 3E544FEBB6623F5D392003B729FE2BFC20E2CB3ECAC22734DFCA55150254E616A41C5E54CE3B50FBC2FE2363EE9AF9B15C70615497B0A458F8AB6D850992EEEB56D65F87EA1BD6E2B4B7E40A0F5E1635C7DDB17110C61039CF712D3524C9C2C1F35D9163BE5C70276F46634514BE16EC09602782E88FE74EAEB2F50CBB0E3B5C4A
-
-E = 2
-P = 157704599352069859921156397442363312110769306142195838598773542758154595866567210022640109888478413022709250917899819531357360018250143692500197076580934099
-Q = 207895480306421993885928959277756332378135790107557439472247328444554879933219045837896240872517904914421631349451165104093054667050399312478738341782350039
-Msg = EC5CC4228C3C70EE8F35
-Signature = 228BAA85062F10DCC9D99A23D340BC4B9E463D8AB86A6781A6D2143564303E2DC78772BF68449BE1E2711A68D5A15CF04A23573FB3870454308F583BBB5F2467069EF1395431E70F91BD56D846DC8DB2E88AB3D26A9770660B87A76D6C3575DE512BAFA8A0B901AD15B7D8E8BE2F176A182D16A9609F19A4298416245873175805
-
-E = 2
-P = 157704599352069859921156397442363312110769306142195838598773542758154595866567210022640109888478413022709250917899819531357360018250143692500197076580934099
-Q = 207895480306421993885928959277756332378135790107557439472247328444554879933219045837896240872517904914421631349451165104093054667050399312478738341782350039
-Msg = FEF5EE07C74118DA30B9
-Signature = 2637E16E2599B6EC2F4728C73D3B29F483C2B881F1E1969C426027605EF080E9B17D258D5E1EBC6472A2501E04CF19C144537FCB38A1DA00D948EBD39FA11322D9230B62E2C12AEDB366BD85A2089588A8D52E941FD986D89828A342B83438A960B6FD87E9AD025AD75A692AA9DFEA873A9467B42D84879E85C5D11EFAB347FBED
-
-E = 2
-P = 175929136695235398623978468982850882403177251171692053453163550527817444539242668478665523777116321800265560553921886249250653855011544289712550979662853142733380647502828837599849362421137735579029747170330078887639249000639490211840143752226146930789086027815718983074897826279804793994355341993150274152459
-Q = 131219248820237432230459994108611509842674503136881955113016298751051553750310448066570966264819272949229207100348941583625652701978979515213283684339178766873393297204552194591324343169883183564987140838254688839495455182007213365712028901853100685930521016622466535780176408252821208461989118980161415019487
-Msg = 15E7B7B7ED0F176B6799
-Signature = 39FF4B5FA50AE498F3C91A655E6865840D1FC401EE02DBC8460A59DEB8816E6680F712B7BAF8D4DC11A3B54BF906BE698306F0449BB43F3F223B944D930A1A3C718E8A9E2EEDEC5A07AB817C26A80CC2A2EE2846A597EAB8A999D38DB98490166F2574524038BBDF24B4E4622C843210C6B94987638C6976562EA9727385B152614C18349BD54AD95DE33D5354954B505E5259CCDA47E3CECEF3154F6E5481E536BAB568146A0BFCB66573714A7BA7ABE0385115720687F33D9C6EF6BB60272F1272CF349990E3A2FBCCE180B730792101089B164AE5A001F5263F7493AF148D6E0953E311AD12E4202D35F96DD30885663B5101F9B05675FCD2FCC4FCC4DDFF
-
-E = 2
-P = 175929136695235398623978468982850882403177251171692053453163550527817444539242668478665523777116321800265560553921886249250653855011544289712550979662853142733380647502828837599849362421137735579029747170330078887639249000639490211840143752226146930789086027815718983074897826279804793994355341993150274152459
-Q = 131219248820237432230459994108611509842674503136881955113016298751051553750310448066570966264819272949229207100348941583625652701978979515213283684339178766873393297204552194591324343169883183564987140838254688839495455182007213365712028901853100685930521016622466535780176408252821208461989118980161415019487
-Msg = B36724C92954C38D0288
-Signature = 3C8CD3614555568BBECA99174B7B203D0BC6FABE9E6FFE0C41EB4D9A2C601D2393CA1E01B7D7E99337758AC914C9F151311E5AE6708DAF1D8C825DA471652C6E13A8FE5802D7AE097BFC899A4EC8CA235B5982B9058C53AAD52823ACF692290EB8823C126635AB0BBF101C2B3149AB16183FA2DBB049DDB99C5E83723E4D4693CA3A08588AA868C677D42ABDAA6586EF192391D276C5E5AF0763ACCA6293F06250C51FDC2AD369CD44EB5F654E98761C881DDEC08E795FFB229B20522349B0714059E18B7B23A48875EAB12ED3F0A011D3A985DD7384B0046F39FA6C1A331F3D4C5125100BA58666935C68A7A10849D9C74850BAB82AE15EC950A283F3E7DAD8
diff --git a/src/tests/data/pubkey/rw_verify.vec b/src/tests/data/pubkey/rw_verify.vec
deleted file mode 100644
index 56eaeccae..000000000
--- a/src/tests/data/pubkey/rw_verify.vec
+++ /dev/null
@@ -1,45 +0,0 @@
-
-E = 2
-N = 161454656927718347546710495694108529777245911373659826842829267986614546594045217933996260902225693470782367852921548571818741091142328119451183980020737294116588677127973118579514046427857660817897020988337799668966050218796197424008138916049541798309364039036236330944419873716106449892609340592749580026501
-Msg = 2A51DF4AF88613D91A37
-Signature = 6FF18F4471E1A8F850C910A181A9F28E69AACD8E8126969605E000A853197541AF9047E5D17315BF062B9CD8DF91196F0343285D9E31D5C72560C156782B6D0E5AF8F06D7DCDD8CABEC01B2438C168C40C21F6A8794648361BD2AEE13573A49ECA07A7EED97C0B9C5B1E508869E4CFD5FE1771924B1CF5A4BFF7D4379E5CD59F
-
-E = 2
-N = 161454656927718347546710495694108529777245911373659826842829267986614546594045217933996260902225693470782367852921548571818741091142328119451183980020737294116588677127973118579514046427857660817897020988337799668966050218796197424008138916049541798309364039036236330944419873716106449892609340592749580026501
-Msg = 1CF8DDD95D780A89D7CF
-Signature = 539C266B0313E0E256ED98EEF13E6AE64CED90C160A4999B3D47CBDA5285DAB0E0678C0E079CE9B8EB23E10EDFACFC19A80EEBB8F38ED5B5D6C8A988AB8CEC40A5A5BA102F75586167EAB6D5BF0CE8FF30C656895800F6F1B37D69FBBAF9055F7505DBEB537C0F986A1B5F0270DC12A640FFCB626F9763FDCFEFA1208C104003
-
-E = 2
-N = 161454656927718347546710495694108529777245911373659826842829267986614546594045217933996260902225693470782367852921548571818741091142328119451183980020737294116588677127973118579514046427857660817897020988337799668966050218796197424008138916049541798309364039036236330944419873716106449892609340592749580026501
-Msg = F6959926E6D9D37D8BC0
-Signature = 249E1066542618CE0D236A7174708F801E7AB257931E9967A65C483ED66FB58598F99B6664AF0EAE221E2A6B271D7D17875ED02BF7FE35AA0786023858521CB79FEE0D134D9DDA609B0270FC9804BB6BF74AD90AE11EB339353533DC0D5A69E6B8758212B86024ED563767EA5D9B59655E0B8CC21244F720BA4ED663BF668E3A
-
-E = 2
-N = 32786073428830410300284398130917235885067430238109848936605383675780141752060601429462102909027763036198820309290723334169722464563078967493471762466687109286253939743688211922523861101766022434426241688525377498535565035820609539198077315872030442353465034902603192318438957229679544105479421156369538009079861
-Msg = 2C9EA313EACF2C5DA43A
-Signature = 1FEFF88814BB53E447E1E955AC8F1AF597C15C3866033E337AFBAB8627306F2EC1276621FF2176C89323CE32EA20F6AEC2CC271F1ED749408B2A3E43A23A44D6A3F38DCDDCAB696B239110AA7ECF12C6681B0E97E6FFF1B72F4F6D796BF82B9450AB8B3D28CA9D220BDF84ACCEA1DA5EDA0B470C3A82BBDD77B4C2723297608BD4
-
-E = 2
-N = 32786073428830410300284398130917235885067430238109848936605383675780141752060601429462102909027763036198820309290723334169722464563078967493471762466687109286253939743688211922523861101766022434426241688525377498535565035820609539198077315872030442353465034902603192318438957229679544105479421156369538009079861
-Msg = 0B9554FFE4F6ADAB2C76
-Signature = 095952F24D9FBEF3A93A932865F4BDBB522CF24EBE153CE4BBB24CF301A1C7B51FE47B94F8F8B211CBC5A926FF6BAF9A6BBF7E15975D2DCCB95EF01AB7E641687870B0D01FC18B6B16FE17D3FC82931FBBCD4FD18C7F9588CEE8491876D72F98F2E7EEA90C12907210D6859053ADC7178B87BF8B4826954D6986FE761E71E1B7EA
-
-E = 2
-N = 23085289162741657527840167277266509664124085355414549040512530339697658387985567689334460418487839008934878679957217276034762867535322838769309710601133720477419144651652431984020413179219099708493077666967073038701913036009744973121934238964755003870653746948359481987956885300823356903154270243367915826847703878822563963033648087127205805904895271584100346005591610792553114534696786749743262897187409362428960073234641477114369452520945902014227194038301981685731937113320369353918470275156548959860091573626887579450283427370674385898724855497767152486821298218877895649195196037107789007826511494658561893968533
-Msg = 00AA5515CDAE5CD0F0DC
-Signature = 30EECA6B48D796552F5A6A3C11F28D730FA077422CAAB34FDEB879AE0F71DF21330E2F3BE5BF3A8CA372EBCD3DFA7C81B3398C31B0972D0B857926CB39732351AACEB8276D52B9D82F9C245FA0F1CF49E785A2BC00FF27FBCF777F84D05BEF17FCC0505820B029AC8F0CE17D2469372CE47E1428BB941004FE170EF87163E07298EFFCC1BFA7E7CB1F572C340CAA075A5962A15B69CE937BC7EFB492F501FC88CBF0119C351C8498782091EF6EFB19120195E5FF51DF86F90E90FAEB225AA2EE43AB4E8358101C0348C7E3859B9DEBA19464C74B74AC48A0B73FC8D2E7F8033E86208F0792B6E5B6DE36C99DEF604949811D1671EF6B0A4781B4E7A0A72AD855
-
-E = 2
-N = 23085289162741657527840167277266509664124085355414549040512530339697658387985567689334460418487839008934878679957217276034762867535322838769309710601133720477419144651652431984020413179219099708493077666967073038701913036009744973121934238964755003870653746948359481987956885300823356903154270243367915826847703878822563963033648087127205805904895271584100346005591610792553114534696786749743262897187409362428960073234641477114369452520945902014227194038301981685731937113320369353918470275156548959860091573626887579450283427370674385898724855497767152486821298218877895649195196037107789007826511494658561893968533
-Msg = B8E2FB9EAE22FB2C0021
-Signature = 416D33F8C213CF81F805F54FC1D4E7C6A588A0965F1C9CAEEA1D41452E20935AAF2D30F957584B56621035430212A428E27A2F687CA9DBB596C19864AE692EF7BBA730F3D70CC2DDE15AB71E1E350C0C316EFA1A831ACD1441598B112482487DF72F58ED318182C7CD0906FE39C5655BF1313F29A15D60A6178CBF600C7FBFF8994840ED649C3C4026A463B3EA39C692B7D112B128BE49E1E32D4A7FF8D4513283D8DCD9CCB8FB7300BE0BDD4C44DAA2F7049B3AD83437093E623442AC69B48911CDA21E95E0775041F67F6E6AE01DCE646AEC20908E7C1B693600FE41ABA85AC0C778641E46C419083E41773C749DB3E1BD8FD764E271860D2D7F8E11BD6AB3
-
-E = 2
-N = 23085289162741657527840167277266509664124085355414549040512530339697658387985567689334460418487839008934878679957217276034762867535322838769309710601133720477419144651652431984020413179219099708493077666967073038701913036009744973121934238964755003870653746948359481987956885300823356903154270243367915826847703878822563963033648087127205805904895271584100346005591610792553114534696786749743262897187409362428960073234641477114369452520945902014227194038301981685731937113320369353918470275156548959860091573626887579450283427370674385898724855497767152486821298218877895649195196037107789007826511494658561893968533
-Msg = 8C8C306A629373BAE647
-Signature = 0E9A00045FFD399D9DA9D0D7E543CF9FFD098BC23E72DD7763A64F22C7F0479CE866E31438B8F7DE31A18F35AF419BED6C67BE1540614D3310DD24F019E14FCC3AF73743F4C143D4B79CDF35C752A300F0A8251CCFF4AAF18785C533A7DF1A20AFE6770DEBD1B8BA2C83B2E345A04F833CD173E998FF9840C2F8A370FFDCFF5FD95CBD71B25FC9972192470FD145975344F64C2F6D68CB3513F48F9FC070021BEE8F6A4282D098C44DF655CE415E89B97994AE3ABE85986C7EE0AC348EF2A4F52D102EA80836E77E81AD3678803E53C83CF2F30D2D4950FB6B038CCB3F2690A9381EB34D6C09E88C090AB05E28047DC490EB8A1282FEB38E82FB0B18309284C4
-
-E = 2
-N = 23085289162741657527840167277266509664124085355414549040512530339697658387985567689334460418487839008934878679957217276034762867535322838769309710601133720477419144651652431984020413179219099708493077666967073038701913036009744973121934238964755003870653746948359481987956885300823356903154270243367915826847703878822563963033648087127205805904895271584100346005591610792553114534696786749743262897187409362428960073234641477114369452520945902014227194038301981685731937113320369353918470275156548959860091573626887579450283427370674385898724855497767152486821298218877895649195196037107789007826511494658561893968533
-Msg = FA95400C2B14E064F76A
-Signature = 3F67F9DBEB88E6AD057BEDC3D97030555A908867EC578A6CA572137CB61C21036AADE6DDC5592EC7CCB6B263E51B4C886A51904C858040E493D64B9ACE5BAA50C4A66D04ACCDFE0039D8541C4363DEFFCF93BDF5F5CC1FB64855D956B5EFD42D4C9B96B9CBAA97A32F02AAB307674E53404E6836DB5C96B59572ADBFD1113B87608ACE6D0898CB02E35575CC28D38A9FF8C1C4AD36BAA991DEFAB533F0A6C9C2F0F0815F1D659ED576E5DB18494A54B6817D9E34A134F3B9A0F1E8C77FC204B6EE087C0445A7036C935117E338D092F6E1FF4DF7605525C409456A5195233A176B29B2FD8FB2808D0412FCA0541B2BB6800BD8BB9DC9DC25230166071E8D961E
diff --git a/src/tests/test_nr.cpp b/src/tests/test_nr.cpp
deleted file mode 100644
index bd1d67d4f..000000000
--- a/src/tests/test_nr.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
-* (C) 2014,2015 Jack Lloyd
-*
-* Botan is released under the Simplified BSD License (see license.txt)
-*/
-
-#include "tests.h"
-
-#if defined(BOTAN_HAS_NYBERG_RUEPPEL)
- #include <botan/nr.h>
- #include "test_pubkey.h"
-#endif
-
-namespace Botan_Tests {
-
-namespace {
-
-#if defined(BOTAN_HAS_NYBERG_RUEPPEL)
-
-class NR_KAT_Tests : public PK_Signature_Generation_Test
- {
- public:
- NR_KAT_Tests() : PK_Signature_Generation_Test(
- "Nyberg-Rueppel",
- "pubkey/nr.vec",
- {"P", "Q", "G", "X", "Hash", "Nonce", "Msg", "Signature"})
- {}
-
- std::unique_ptr<Botan::Private_Key> load_private_key(const VarMap& vars) override
- {
- const Botan::BigInt p = get_req_bn(vars, "P");
- const Botan::BigInt q = get_req_bn(vars, "Q");
- const Botan::BigInt g = get_req_bn(vars, "G");
- const Botan::BigInt x = get_req_bn(vars, "X");
-
- const Botan::DL_Group grp(p, q, g);
-
- std::unique_ptr<Botan::Private_Key> key(new Botan::NR_PrivateKey(Test::rng(), grp, x));
- return key;
- }
-
- std::string default_padding(const VarMap& vars) const override
- {
- return "EMSA1(" + get_req_str(vars, "Hash") + ")";
- }
- };
-
-class NR_Keygen_Tests : public PK_Key_Generation_Test
- {
- public:
- std::vector<std::string> keygen_params() const override { return { "dsa/jce/1024", "dsa/botan/2048" }; }
-
- std::unique_ptr<Botan::Private_Key> make_key(Botan::RandomNumberGenerator& rng,
- const std::string& param) const override
- {
- Botan::DL_Group group(param);
- std::unique_ptr<Botan::Private_Key> key(new Botan::NR_PrivateKey(rng, group));
- return key;
- }
- };
-
-BOTAN_REGISTER_TEST("nr_kat", NR_KAT_Tests);
-BOTAN_REGISTER_TEST("nr_keygen", NR_Keygen_Tests);
-
-#endif
-
-}
-
-}
diff --git a/src/tests/test_rw.cpp b/src/tests/test_rw.cpp
deleted file mode 100644
index bee9dfff0..000000000
--- a/src/tests/test_rw.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
-* (C) 2014,2015 Jack Lloyd
-*
-* Botan is released under the Simplified BSD License (see license.txt)
-*/
-
-#include "tests.h"
-
-#if defined(BOTAN_HAS_RW)
- #include <botan/rw.h>
- #include <botan/pubkey.h>
- #include "test_pubkey.h"
-#endif
-
-namespace Botan_Tests {
-
-namespace {
-
-#if defined(BOTAN_HAS_RW)
-
-class RW_KAT_Tests : public PK_Signature_Generation_Test
- {
- public:
- RW_KAT_Tests() : PK_Signature_Generation_Test(
- "Rabin-Williams",
- "pubkey/rw_sig.vec",
- {"E", "P", "Q", "Msg", "Signature"},
- {"Padding"})
- {}
-
- std::string default_padding(const VarMap&) const override { return "EMSA2(SHA-1)"; }
-
- std::unique_ptr<Botan::Private_Key> load_private_key(const VarMap& vars) override
- {
- const BigInt p = get_req_bn(vars, "P");
- const BigInt q = get_req_bn(vars, "Q");
- const BigInt e = get_req_bn(vars, "E");
-
- std::unique_ptr<Botan::Private_Key> key(new Botan::RW_PrivateKey(Test::rng(), p, q, e));
- return key;
- }
-
- };
-
-class RW_Verify_Tests : public PK_Signature_Verification_Test
- {
- public:
- RW_Verify_Tests() : PK_Signature_Verification_Test(
- "Rabin-Williams",
- "pubkey/rw_verify.vec",
- {"E", "N", "Msg", "Signature"})
- {}
-
- std::string default_padding(const VarMap&) const override { return "EMSA2(SHA-1)"; }
-
- std::unique_ptr<Botan::Public_Key> load_public_key(const VarMap& vars) override
- {
- const BigInt n = get_req_bn(vars, "N");
- const BigInt e = get_req_bn(vars, "E");
-
- std::unique_ptr<Botan::Public_Key> key(new Botan::RW_PublicKey(n, e));
- return key;
- }
-
- };
-
-BOTAN_REGISTER_TEST("rw_kat", RW_KAT_Tests);
-BOTAN_REGISTER_TEST("rw_verify", RW_Verify_Tests);
-
-#endif
-
-}
-
-}