-
Notifications
You must be signed in to change notification settings - Fork 20.9k
EIP-7951: Precompile for secp256r1 Curve Support #31991
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
crypto/secp256r1/verifier.go
Outdated
if x.Sign() == 0 && y.Sign() == 0 { | ||
return nil | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this check needed? Which part of the EIP does this correspond to?
I believe this check was not added in the RIP version, neither was it present in the implementation deployed in Scroll or OP.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be the answer: ethereum-optimism/op-geth#168 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think we can get rid of it,
for more context, https://github.com/golang/go/blob/master/src/crypto/elliptic/nistec.go#L129-L134
@alexb5dh I changed the title by mistake. Have corrected it now. This reflects EIP-7951 |
[ | ||
{ | ||
"Input": "4cee90eb86eaa050036147a12d49004b6b9c72bd725d39d4785011fe190f0b4da73bd4903f0ce3b639bbbf6e8e80d16931ff4bcf5993d58468e8fb19086e8cac36dbcd03009df8c59286b162af3bd7fcc0450c9aa81be5d10d312af6c66b1d604aebd3099c618202fcfe16ae7770b0c49ab5eadf74b754204a3bb6060e44eff37618b065f9832de4ca6ca971a7a1adc826d0f7c00181a5fb2ddf79ae00b4e10e", | ||
"Expected": "0000000000000000000000000000000000000000000000000000000000000001", | ||
"Gas": 3450, | ||
"Name": "CallP256Verify", | ||
"NoBenchmark": false | ||
} | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ethereum/EIPs#9833
Based on #27540