This commit is contained in:
Sun Yimin 2024-08-27 13:32:16 +08:00 committed by GitHub
parent 4f6887c39c
commit 998b9f6872
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -66,11 +66,10 @@ func testP256OrderReduce(v *big.Int, t *testing.T) {
montFromBig((*[4]uint64)(val), v)
p256OrdReduce(val)
if ordElmToBigInt(val).Cmp(v) != 0 {
t.Fatalf("p256OrdReduce failed for %v", v)
t.Fatalf("p256OrdReduce failed for %x, got %x", v.Bytes(), ordElmToBigInt(val).Bytes())
}
}
func TestP256OrderReduce(t *testing.T) {
p, _ := new(big.Int).SetString("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFF7203DF6B21C6052B53BBF40939D54123", 16)
for i := 0; i < 20; i++ {