go-ethereum/crypto
fengjian 46bee92f9e crypto/ecies: fix ECIES invalid-curve handling (#33669)
Fix ECIES invalid-curve handling in RLPx handshake (reject invalid
ephemeral pubkeys early)
- Add curve validation in crypto/ecies.GenerateShared to reject invalid
public keys before ECDH.
- Update RLPx PoC test to assert invalid curve points fail with
ErrInvalidPublicKey.
 
Motivation / Context
RLPx handshake uses ECIES decryption on unauthenticated network input.
Prior to this change, an invalid-curve ephemeral public key would
proceed into ECDH and only fail at MAC verification, returning
ErrInvalidMessage. This allows an oracle on decrypt success/failure and
leaves the code path vulnerable to invalid-curve/small-subgroup attacks.
The fix enforces IsOnCurve validation up front.
2026-02-17 17:03:47 +01:00
..
blake2b crypto: using testing.B.Loop (#32645) 2025-09-19 17:12:41 -06:00
bn256 crypto/bn256: switch to gnark again (#32659) 2025-09-19 15:18:42 +02:00
ecies crypto/ecies: fix ECIES invalid-curve handling (#33669) 2026-02-17 17:03:47 +01:00
kzg4844 core/txpool/blobpool: add legacy sidecar conversion in reinject (#32688) 2025-09-23 14:45:36 +02:00
secp256k1 crypto: using testing.B.Loop (#32645) 2025-09-19 17:12:41 -06:00
secp256r1 core/vm: implement EIP-7951 - precompile for secp256r1 (#31991) 2025-07-07 20:59:45 +02:00
signify build: replace tenv linter with usetesting (#31172) 2025-02-21 13:36:18 +01:00
crypto.go cmd/keeper: use the ziren keccak precompile (#32816) 2025-10-20 11:52:02 +02:00
crypto_test.go crypto: using testing.B.Loop (#32645) 2025-09-19 17:12:41 -06:00
keccak.go cmd/keeper: use the ziren keccak precompile (#32816) 2025-10-20 11:52:02 +02:00
keccak_ziren.go crypto: implement ziren keccak state (#32996) 2025-10-23 14:02:13 +02:00
signature_cgo.go crypto: use pure Go signature implementation in tinygo (#31878) 2025-05-23 11:14:40 +02:00
signature_nocgo.go crypto: use pure Go signature implementation in tinygo (#31878) 2025-05-23 11:14:40 +02:00
signature_test.go crypto: using testing.B.Loop (#32645) 2025-09-19 17:12:41 -06:00