Skip to content

Conversation

ceyonur
Copy link
Contributor

@ceyonur ceyonur commented Jul 11, 2025

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.

@@ -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:
Copy link
Contributor Author

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)
Copy link
Contributor

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.

Copy link
Contributor Author

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>
@avalanche-foundation-admin avalanche-foundation-admin merged commit 82b9526 into avalanche-foundation:main Sep 18, 2025
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.

4 participants