Skip to content

Conversation

@Sahil-4555
Copy link
Contributor

This change adds curve validation when generating shared keys in ECIES to ensure invalid public keys are rejected early. The RLPx handshake previously allowed invalid ephemeral public keys to reach the ECDH step and fail later during MAC verification, returning a generic error.

By checking whether the public key lies on the curve before performing ECDH, the handshake now fails immediately with a clear error. The RLPx proof-of-concept test has been updated to verify that invalid curve points are rejected correctly. This improves security by preventing potential invalid-curve and small-subgroup attacks and removes a possible decryption behavior oracle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant