diff options
author | lloyd <[email protected]> | 2010-03-04 17:38:59 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-03-04 17:38:59 +0000 |
commit | 788e524d35d01d90c56c825dbf63a96c3c42a32c (patch) | |
tree | 0147300f6b0f6dd2fd1f16e4e8b5b4e55c35c473 /src/pubkey/if_algo/if_algo.h | |
parent | e63bcc23c6121245c143b7b026127ebf0be55c22 (diff) |
New IF constructors, simplifies RSA/RW
Diffstat (limited to 'src/pubkey/if_algo/if_algo.h')
-rw-r--r-- | src/pubkey/if_algo/if_algo.h | 11 |
1 files changed, 10 insertions, 1 deletions
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<byte>& 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<byte>& 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; }; |