crypto: remove hardcoded value for secp256k1.N (#30126)

This commit is contained in:
zhiqiangxu 2024-07-09 19:19:25 +08:00 committed by Daniel Liu
parent 104a97354a
commit e19093f344

View file

@ -45,7 +45,7 @@ const RecoveryIDOffset = 64
const DigestLength = 32
var (
secp256k1N, _ = new(big.Int).SetString("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141", 16)
secp256k1N = S256().Params().N
secp256k1halfN = new(big.Int).Div(secp256k1N, big.NewInt(2))
)