From b443720ee6ce9a6a19587a05dbf85e7a5f5a3f8c Mon Sep 17 00:00:00 2001 From: Tarak Ben Youssef Date: Wed, 12 Aug 2026 02:50:45 -0500 Subject: [PATCH] remove unnecessary check and update comments --- ecdsa_secp256k1.go | 11 ----------- ecdsa_test.go | 2 +- go.mod | 2 +- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/ecdsa_secp256k1.go b/ecdsa_secp256k1.go index 1ba561f0..121ec207 100644 --- a/ecdsa_secp256k1.go +++ b/ecdsa_secp256k1.go @@ -152,17 +152,6 @@ func publicKeyECDSASecp256k1(a *ecdsaContext, XYBytes []byte) (*pubKeyECDSASecp2 } x, y := readTwoBigInts(XYBytes, pLen) - - // check the coordinates are valid field elements. - // This check is unconditional and must not be removed when go-ethereum is upgraded: - // it keeps the set of accepted key encodings independent of the go-ethereum version - // that Go module resolution selects, which this package does not control. - // Without it, a non-canonical encoding such as `x+p` is accepted whenever - // the resolved go-ethereum is v1.16.8 or earlier. - if x.Cmp(a.curveP) >= 0 || y.Cmp(a.curveP) >= 0 { - return nil, invalidInputsErrorf("at least one coordinate is larger than the field prime for %s", a.algo) - } - // `IsOnCurve` includes checks for x