summaryrefslogtreecommitdiff
path: root/rsa.cpp
diff options
context:
space:
mode:
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 a7972c86..979a61d3 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)