PrimeField: fix error with squareRoot method

This commit is contained in:
terrafrost 2023-10-31 08:47:58 -05:00
parent 33fa69b251
commit ce753669bc

View File

@ -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;
}