From f10328affa8b4207a1de65aedeca5173111de739 Mon Sep 17 00:00:00 2001 From: weidai Date: Mon, 3 May 2004 18:15:11 +0000 Subject: 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 --- rsa.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rsa.cpp') 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) -- cgit v1.2.1