summaryrefslogtreecommitdiff
path: root/rsa.cpp
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2004-05-03 18:15:11 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2004-05-03 18:15:11 +0000
commitf10328affa8b4207a1de65aedeca5173111de739 (patch)
tree6a9a1fbc005c2137695f56ba9c91b1ba0d0fbae3 /rsa.cpp
parent8292126d81f89e703e3c92f1fc8c8bf1f5d9c4a8 (diff)
downloadcryptopp-f10328affa8b4207a1de65aedeca5173111de739.tar.gz
fix DivideByZero exception in InvertibleRSAFunction(n, e, d)
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@166 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'rsa.cpp')
-rw-r--r--rsa.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/rsa.cpp b/rsa.cpp
index a7972c8..979a61d 100644
--- a/rsa.cpp
+++ b/rsa.cpp
@@ -170,7 +170,7 @@ void InvertibleRSAFunction::Initialize(const Integer &n, const Integer &e, const
continue;
Integer b;
unsigned int j = 0;
- while (a != -1)
+ while (a != n-1)
{
b = modn.Square(a);
if (b == 1)