mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-27 03:42:40 +00:00
PrimeField: fix error with squareRoot method
This commit is contained in:
parent
33fa69b251
commit
ce753669bc
@ -263,7 +263,7 @@ class Integer extends Base
|
||||
$r = $this->value->powMod($temp, static::$modulo[$this->instanceID]);
|
||||
|
||||
while (!$t->equals($one)) {
|
||||
for ($i == clone $one; $i->compare($m) < 0; $i = $i->add($one)) {
|
||||
for ($i = clone $one; $i->compare($m) < 0; $i = $i->add($one)) {
|
||||
if ($t->powMod($two->pow($i), static::$modulo[$this->instanceID])->equals($one)) {
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user