aboutsummaryrefslogtreecommitdiffstats
path: root/src/pubkey/rsa/rsa.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-03-05 17:40:45 +0000
committerlloyd <[email protected]>2010-03-05 17:40:45 +0000
commitbe9d7d1031bba2cd4f415d114389a1f50c61d44b (patch)
treec6714d8c40ac685c98e4b8bfbacdd14d99d64a63 /src/pubkey/rsa/rsa.cpp
parentcdd1a1509ffc74c74bd902d55a7a85ab9e2afe78 (diff)
Remove IF_Core
Diffstat (limited to 'src/pubkey/rsa/rsa.cpp')
-rw-r--r--src/pubkey/rsa/rsa.cpp45
1 files changed, 0 insertions, 45 deletions
diff --git a/src/pubkey/rsa/rsa.cpp b/src/pubkey/rsa/rsa.cpp
index 13ac1c318..dc182f36a 100644
--- a/src/pubkey/rsa/rsa.cpp
+++ b/src/pubkey/rsa/rsa.cpp
@@ -14,26 +14,6 @@
namespace Botan {
/*
-* RSA Public Operation
-*/
-BigInt RSA_PublicKey::public_op(const BigInt& i) const
- {
- if(i >= n)
- throw Invalid_Argument(algo_name() + "::public_op: input is too large");
- return core.public_op(i);
- }
-
-/*
-* RSA Encryption Function
-*/
-SecureVector<byte> RSA_PublicKey::encrypt(const byte in[], u32bit len,
- RandomNumberGenerator&) const
- {
- BigInt i(in, len);
- return BigInt::encode_1363(public_op(i), n.bytes());
- }
-
-/*
* Create a RSA private key
*/
RSA_PrivateKey::RSA_PrivateKey(RandomNumberGenerator& rng,
@@ -58,35 +38,10 @@ RSA_PrivateKey::RSA_PrivateKey(RandomNumberGenerator& rng,
d2 = d % (q - 1);
c = inverse_mod(q, p);
- core = IF_Core(rng, e, n, d, p, q, d1, d2, c);
-
gen_check(rng);
}
/*
-* RSA Private Operation
-*/
-BigInt RSA_PrivateKey::private_op(const byte in[], u32bit length) const
- {
- BigInt i(in, length);
- if(i >= n)
- throw Invalid_Argument(algo_name() + "::private_op: input is too large");
-
- BigInt r = core.private_op(i);
- if(i != public_op(r))
- throw Self_Test_Failure(algo_name() + " private operation check failed");
- return r;
- }
-
-/*
-* RSA Decryption Operation
-*/
-SecureVector<byte> RSA_PrivateKey::decrypt(const byte in[], u32bit len) const
- {
- return BigInt::encode(private_op(in, len));
- }
-
-/*
* Check Private RSA Parameters
*/
bool RSA_PrivateKey::check_key(RandomNumberGenerator& rng, bool strong) const