Try it Live
Run Signature examples in the interactive playground
Signature Recovery
Recover public keys and addresses from ECDSA signatures using the recovery ID (v parameter).Overview
ECDSA signatures allow recovering the signer’s public key from the signature and message hash. This is a key feature of Ethereum transactions, enabling address derivation without storing public keys. Supported Algorithms:- ✅ secp256k1 (Ethereum, Bitcoin)
- ❌ P-256 (no recovery support)
- ❌ Ed25519 (no recovery support)
Recovery Process
Public Key Recovery
Secp256k1 signatures can recover the public key that created the signature:Address Recovery
Ethereum addresses are derived from public keys via keccak256 hash:Recovery ID (v)
The recovery ID determines which of four possible public keys is correct.Standard Values
Ethereum (pre-EIP-155):Converting v Values
Recovery Examples
Ethereum Transaction Recovery
EIP-712 Signed Message Recovery
Personal Sign Recovery
Recovery Validation
Verify Recovery Success
Handle Recovery Errors
Multiple Recovery Attempts
When v is unknown, try all possibilities:Security Considerations
Canonical Signatures
Always normalize signatures before recovery to prevent malleability:Message Hash Validation
Recovery ID Bounds
Performance
Recovery Cost
Public key recovery is computationally expensive:Optimization Strategies
Cache recovered addresses:Algorithm Comparison
| Algorithm | Recovery Support | Use Case |
|---|---|---|
| secp256k1 | ✅ Yes (with v) | Ethereum, Bitcoin |
| P-256 | ❌ No | TLS, WebAuthn, JWT |
| Ed25519 | ❌ No | Modern protocols |
See Also
- Signature Validation - Canonicalization and malleability
- Signature Constructors - Creating signatures
- Secp256k1 Crypto - Signing and verification
- EIP-712 - Structured data signing
- EIP-155 - Chain-specific v values

