-
Notifications
You must be signed in to change notification settings - Fork 41
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
Merged
avalanche-foundation-admin
merged 4 commits into
avalanche-foundation:main
from
ceyonur:patch-3
Sep 18, 2025
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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: | ||
|
|
||
| ### Enterprise & Institutional Adoption | ||
|
|
||
|
|
@@ -27,20 +27,20 @@ The 100x gas cost reduction makes these use cases economically viable while main | |
|
|
||
| ## Specification | ||
|
|
||
| This ACP implements [RIP-7212](https://github.com/ethereum/RIPs/blob/master/RIPS/rip-7212.md) for secp256r1 signature verification on Avalanche. The specification follows RIP-7212 exactly, with the precompiled contract deployed at address `0x0200000000000000000000000000000000000006`. | ||
| This ACP implements [EIP-7951](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7951.md) for secp256r1 signature verification on Avalanche. The specification follows EIP-7951 exactly, with the precompiled contract deployed at address `0x0200000000000000000000000000000000000006`. | ||
|
|
||
| ### 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) | ||
|
||
| - Validation: Full compliance with NIST FIPS 186-3 specification | ||
|
|
||
| ### Activation | ||
|
|
||
| This precompile may be activated as part of Avalanche's next network upgrade. Individual Avalanche L1s and subnets could adopt this enhancement independently through their respective client software updates. | ||
|
|
||
| For complete technical specifications, validation requirements, and implementation details, refer to [RIP-7212](https://github.com/ethereum/RIPs/blob/master/RIPS/rip-7212.md). | ||
| For complete technical specifications, validation requirements, and implementation details, refer to [EIP-7951](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7951.md). | ||
|
|
||
| ## Backwards Compatibility | ||
|
|
||
|
|
@@ -75,7 +75,7 @@ Adoption requires a coordinated network upgrade for the C-Chain. Other EVM L1s c | |
|
|
||
| The implementation will build upon existing work: | ||
|
|
||
| 1. EIP-7212 Reference: The [BOR implementation](https://github.com/maticnetwork/bor/pull/1069) of EIP-7212 provides the foundation | ||
| 1. EIP-7951 Reference: The [Go-Ethereum implementation]https://github.com/ethereum/go-ethereum/pull/31991) of EIP-7951 provides the foundation | ||
| 2. Coreth Implementation: Integration with Avalanche's C-Chain (Avalanche's fork of go-ethereum) | ||
| 3. Cryptographic Library: Implementation utilizes Go's standard library `crypto/ecdsa` and `crypto/elliptic` packages, which implement NIST P-256 per FIPS 186-3 ([Go documentation](https://pkg.go.dev/crypto/elliptic#P256)) | ||
|
|
||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
cc @scammi @ARR4N