mirror of
https://github.com/emmansun/gmsm.git
synced 2025-04-27 04:36:19 +08:00
fix test case
This commit is contained in:
parent
2f1740ff26
commit
e1e485c32d
@ -56,10 +56,12 @@ func TestP256FromMont(t *testing.T) {
|
|||||||
for i := 0; i < 20; i++ {
|
for i := 0; i < 20; i++ {
|
||||||
bigVal := big.NewInt(int64(i))
|
bigVal := big.NewInt(int64(i))
|
||||||
testP256FromMont(bigVal, t)
|
testP256FromMont(bigVal, t)
|
||||||
|
if i != 0 {
|
||||||
bigVal = new(big.Int).Sub(p, big.NewInt(int64(i)))
|
bigVal = new(big.Int).Sub(p, big.NewInt(int64(i)))
|
||||||
testP256FromMont(bigVal, t)
|
testP256FromMont(bigVal, t)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func testP256OrderReduce(v, expected *big.Int, t *testing.T) {
|
func testP256OrderReduce(v, expected *big.Int, t *testing.T) {
|
||||||
val := new(p256OrdElement)
|
val := new(p256OrdElement)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user