From cd4c30e6d07db0e3f17b12898e1ebce0002eed38 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Wed, 1 Nov 2023 19:27:15 -0500 Subject: [PATCH] add test for prime field with prime numbers --- tests/Unit/Math/PrimeFieldTest.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/Unit/Math/PrimeFieldTest.php b/tests/Unit/Math/PrimeFieldTest.php index 3f6f10f1..0201f29c 100644 --- a/tests/Unit/Math/PrimeFieldTest.php +++ b/tests/Unit/Math/PrimeFieldTest.php @@ -21,6 +21,17 @@ class PrimeFieldTest extends PhpseclibTestCase echo $num2->squareRoot(); } + public function testPrimeFieldWithPrimeNumbers() + { + $a = new BigInteger('65', 10); + $p = new BigInteger('127', 10); + + $num = new PrimeField($p); + $num2 = $num->newInteger($a); + + echo $num2->squareRoot(); + } + /** * @group github1929 */