From 788e524d35d01d90c56c825dbf63a96c3c42a32c Mon Sep 17 00:00:00 2001 From: lloyd Date: Thu, 4 Mar 2010 17:38:59 +0000 Subject: New IF constructors, simplifies RSA/RW --- src/pubkey/if_algo/if_algo.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/pubkey/if_algo/if_algo.h') diff --git a/src/pubkey/if_algo/if_algo.h b/src/pubkey/if_algo/if_algo.h index d5e3ce5b3..01e370854 100644 --- a/src/pubkey/if_algo/if_algo.h +++ b/src/pubkey/if_algo/if_algo.h @@ -24,6 +24,9 @@ class BOTAN_DLL IF_Scheme_PublicKey : public virtual Public_Key IF_Scheme_PublicKey(const AlgorithmIdentifier& alg_id, const MemoryRegion& key_bits); + IF_Scheme_PublicKey(const BigInt& n, const BigInt& e) : + n(n), e(e) {} + bool check_key(RandomNumberGenerator& rng, bool) const; AlgorithmIdentifier algorithm_identifier() const; @@ -59,6 +62,12 @@ class BOTAN_DLL IF_Scheme_PrivateKey : public virtual IF_Scheme_PublicKey, public virtual Private_Key { public: + + IF_Scheme_PrivateKey(RandomNumberGenerator& rng, + const BigInt& prime1, const BigInt& prime2, + const BigInt& exp, const BigInt& d_exp, + const BigInt& mod); + IF_Scheme_PrivateKey(const AlgorithmIdentifier& alg_id, const MemoryRegion& key_bits); @@ -87,7 +96,7 @@ class BOTAN_DLL IF_Scheme_PrivateKey : public virtual IF_Scheme_PublicKey, protected: IF_Scheme_PrivateKey() {} - virtual void PKCS8_load_hook(RandomNumberGenerator&, bool = false); + void PKCS8_load_hook(RandomNumberGenerator&, bool = false); BigInt d, p, q, d1, d2, c; }; -- cgit v1.2.3