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/rw/rw.h | |
parent | e63bcc23c6121245c143b7b026127ebf0be55c22 (diff) |
New IF constructors, simplifies RSA/RW
Diffstat (limited to 'src/pubkey/rw/rw.h')
-rw-r--r-- | src/pubkey/rw/rw.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/pubkey/rw/rw.h b/src/pubkey/rw/rw.h index bc8f053b6..d2411d630 100644 --- a/src/pubkey/rw/rw.h +++ b/src/pubkey/rw/rw.h @@ -30,7 +30,12 @@ class BOTAN_DLL RW_PublicKey : public PK_Verifying_with_MR_Key, core = IF_Core(e, n); } - RW_PublicKey(const BigInt& mod, const BigInt& exponent); + RW_PublicKey(const BigInt& mod, const BigInt& exponent) : + IF_Scheme_PublicKey(mod, exponent) + { + core = IF_Core(e, n); + } + protected: RW_PublicKey() {} BigInt public_op(const BigInt&) const; @@ -58,8 +63,10 @@ class BOTAN_DLL RW_PrivateKey : public RW_PublicKey, } RW_PrivateKey(RandomNumberGenerator& rng, - const BigInt&, const BigInt&, const BigInt&, - const BigInt& = 0, const BigInt& = 0); + 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, u32bit bits, u32bit = 2); }; |