fix test case

This commit is contained in:
Sun Yimin 2024-08-23 16:15:50 +08:00 committed by GitHub
parent 98eee001a4
commit 40549083c1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -56,10 +56,12 @@ func TestP256FromMont(t *testing.T) {
for i := 0; i < 20; i++ {
bigVal := big.NewInt(int64(i))
testP256FromMont(bigVal, t)
if i != 0 {
bigVal = new(big.Int).Sub(p, big.NewInt(int64(i)))
testP256FromMont(bigVal, t)
}
}
}
func testP256OrderReduce(v, expected *big.Int, t *testing.T) {
val := new(p256OrdElement)