EIP-8030 · Draft · Core · 2025-09-20
EIP-8030: P256 algorithm support
Registers P256 (secp256r1) as signature algorithm type 0x01 under the EIP-7932 framework, reusing the P256 verification logic every client already ships for the EIP-7951 precompile.
What problem does it solve?
Ethereum accounts sign with secp256k1. EIP-7932 proposes a framework for secondary signature algorithms, each identified by a one-byte type, so transactions and other objects could be signed with something else. A framework needs a first concrete algorithm to define and test against.
P256 (also called secp256r1) is a widely used NIST curve, the one used by passkeys and many secure hardware chips. It is also already implemented in every execution client because of the P256 verification precompile in EIP-7951. That makes it a low-risk first algorithm. EIP-8030 defines exactly how P256 plugs into EIP-7932.
How it works
The algorithm is registered with:
| Constant | Value |
|---|---|
ALG_TYPE |
0x01 |
SIZE |
129 bytes |
A signature is alg_type (1) || r (32) || s (32) || x (32) || y (32): the type byte, the signature, then the uncompressed public key.
The functions EIP-7932 requires:
verify(signature, signing_data): ifsigning_datais not exactly 32 bytes it is first hashed with keccak256. The type byte is dropped,smust be at mostN/2(low-s, to prevent malleability, as secp256k1 does since EIP-2), and the EIP-7951P256Verifylogic must succeed. It returns the 64-byte public keyx || y.gas_cost(signing_data): a base of 3,900 gas, defined as the EIP-7951 precompile cost minus 3,000 (the cost of the secp256k1ecrecoverprecompile). Non-32-byte data adds keccak cost:30 + 6 * words.validate: a no-op.merge_detached_signature: concatenatesr || swithx || y.
Unlike secp256k1, P256 cannot recover the public key from a signature alone, which is why the key travels inside the 129 bytes.
Sample code
Building the 129-byte signature in TypeScript with @noble/curves:
import { p256 } from "@noble/curves/p256";
import { keccak_256 } from "@noble/hashes/sha3";
import { concatBytes } from "@noble/hashes/utils";
const priv = p256.utils.randomPrivateKey();
const pubUncompressed = p256.getPublicKey(priv, false); // 0x04 || x || y
const digest = keccak_256(message); // 32-byte signing data
const sig = p256.sign(digest, priv, { lowS: true }); // enforce s <= N/2
const encoded = concatBytes(
new Uint8Array([0x01]), // ALG_TYPE
sig.toCompactRawBytes(), // r || s (64 bytes)
pubUncompressed.slice(1), // x || y (64 bytes)
);
console.log(encoded.length); // 129
Things to know
- Status: Draft, and it depends on EIP-7932, which is also Draft. Nothing here is usable on mainnet until both are adopted.
- The EIP-7951 precompile, which this reuses, is separate: it lets contracts verify P256 signatures today. EIP-8030 is about P256 as a signature type at the protocol level.
- The spec states its main purpose is to give EIP-7932 a known-safe algorithm for test cases.
- Signatures must use low-s form; many P256 libraries do not normalise
sby default. - Security considerations are still marked "Needs discussion".