-
Notifications
You must be signed in to change notification settings - Fork 40
update rip-7212 with eip-7951 #223
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
update rip-7212 with eip-7951 #223
Conversation
@@ -15,7 +15,7 @@ This proposal introduces a precompiled contract that performs signature verifica | |||
|
|||
The secp256r1 (P-256) elliptic curve is the standard cryptographic curve used by modern device security systems, including Apple's Secure Enclave, Android Keystore, WebAuthn, and Passkeys. However, Avalanche currently only supports secp256k1 natively, forcing developers to use expensive Solidity-based verification that costs [200k-330k gas per signature verification](https://hackmd.io/@1ofB8klpQky-YoR5pmPXFQ/SJ0nuzD1T#Smart-Contract-Based-Verifiers). | |||
|
|||
This ACP proposes implementing EIP-7212's secp256r1 precompiled contract to unlock significant ecosystem benefits: | |||
This ACP proposes implementing EIP-7951's secp256r1 precompiled contract to unlock significant ecosystem benefits: |
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.
|
||
### Core Functionality | ||
|
||
- Input: 160 bytes (message hash + signature components r,s + public key coordinates x,y) | ||
- Output: success: 32 bytes `0x...01`; failure: no data returned | ||
- Gas Cost: 3,450 gas (based on EIP-7212 benchmarking) | ||
- Gas Cost: 3,450 gas (based on EIP-7951 benchmarking) |
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 is the incorrect gas cost if we're following 7951.
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.
updated
Co-authored-by: Michael Kaplan <55204436+michaelkaplan13@users.noreply.github.com>
RIP-7212 is superseded by EIP-7951 due to some security vulnerabilities discovered. Go-ethereum already implemented and merged the EIP.
There seems no issue of compatibility other than increased gas cost (3450 in 7212 vs 6900 in 7951)
EIP-7951 is still in status: Draft, but I think it will eventually supersedes 7212.