fix DivideByZero exception in InvertibleRSAFunction(n, e, d)
parent
afb08eb452
commit
60a5c4331c
2
rsa.cpp
2
rsa.cpp
|
|
@ -170,7 +170,7 @@ void InvertibleRSAFunction::Initialize(const Integer &n, const Integer &e, const
|
||||||
continue;
|
continue;
|
||||||
Integer b;
|
Integer b;
|
||||||
unsigned int j = 0;
|
unsigned int j = 0;
|
||||||
while (a != -1)
|
while (a != n-1)
|
||||||
{
|
{
|
||||||
b = modn.Square(a);
|
b = modn.Square(a);
|
||||||
if (b == 1)
|
if (b == 1)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue