02 ecdsa accounts

ECDSA (Elliptic Curve Digital Signature Algorithm) accounts are the traditional Ethereum-compatible account type, using secp256k1 elliptic curve cryptography.

Overview

ECDSA accounts provide maximum compatibility with the existing Ethereum ecosystem while maintaining classical cryptographic security.

Technical Specifications

Key Sizes

Component
Size
Format

Private Key

32 bytes (256 bits)

Hex string (64 characters)

Public Key

64 bytes (512 bits)

Uncompressed (without 0x04 prefix)

Public Key (Full)

65 bytes

Uncompressed (with 0x04 prefix)

Address

20 bytes (160 bits)

Hex string with 0x prefix

Address Derivation

Address = keccak256(PublicKey)[12:32]
         = Last 20 bytes of Keccak256 hash

Example:

Public Key: 0x04a1b2c3d4e5f6...
Keccak256: 0x1234567890abcdef... (32 bytes)
Address:   0x7890abcdef... (last 20 bytes)

Signature Format

Component
Size
Description

R

32 bytes

Signature component R

S

32 bytes

Signature component S

V

1 byte

Recovery ID (27, 28, or 35+)

Total

65 bytes

Complete signature

Recovery ID (V):

  • 27 or 28: Pre-EIP-155 (legacy)

  • 35 + chainId*2 or 36 + chainId*2: EIP-155 (chain-specific)

Address Format

Standard Format

  • Prefix: 0x (hexadecimal)

  • Length: 40 hex characters (20 bytes)

  • Case: Case-insensitive (checksummed addresses use mixed case)

Checksummed Format (EIP-55)

Mixed case provides error detection for typos.

When to Use ECDSA Accounts

✅ Use ECDSA When:

1

Maximum Compatibility Required

  • Interacting with existing Ethereum dApps

  • Using standard Ethereum tools (MetaMask, Remix, etc.)

  • Deploying to Ethereum mainnet or testnets

2

Classical Security is Sufficient

  • Short-term transactions

  • Low-value operations

  • When quantum threat is not immediate concern

3

Gas Cost Optimization

  • ECDSA signatures are smallest (65 bytes)

  • Lowest gas costs for transactions

  • Efficient for high-frequency operations

4

Existing Infrastructure

  • Migrating existing Ethereum accounts

  • Using existing smart contracts

  • Maintaining backward compatibility

❌ Don't Use ECDSA When:

1

Long-Term Security Required

  • Storing high-value assets long-term

  • Planning for quantum computing era

  • Need quantum-resistant cryptography

2

PQC-Only Networks

  • Networks that require PQC signatures

  • Networks that don't support ECDSA

3

Maximum Security Needed

  • Defense against both classical and quantum attacks

  • Critical infrastructure

  • Regulatory compliance requiring quantum resistance

Security Considerations

Classical Security

  • Current Status: ✅ Secure against classical attacks

  • Security Level: ~128-bit classical security

  • Attack Resistance: Resistant to all known classical attacks

Quantum Vulnerability

  • Grover's Algorithm: Reduces security to ~128-bit (still secure for now)

  • Shor's Algorithm: Can break ECDSA if quantum computers become powerful enough

  • Timeline: Estimated 10-30 years before practical quantum attacks

Best Practices

1

Use Strong Randomness

Ensure private keys are generated with cryptographically secure random number generators

2

Secure Storage

Encrypt private keys with strong passwords

3

Never Share Private Keys

Private keys should never be transmitted or stored insecurely

4

Regular Backups

Maintain secure backups of private keys and recovery phrases

Account Creation

From Random Generation

From Mnemonic

From Private Key Import

Transaction Signing

ECDSA transactions use standard Ethereum transaction formats:

  • LegacyTx (Type 0): Original transaction format

  • AccessListTx (Type 1): EIP-2930, includes access list

  • DynamicFeeTx (Type 2): EIP-1559, includes max fee and priority fee

All transaction types use 65-byte ECDSA signatures.

Limitations

1

No Quantum Resistance

Vulnerable to future quantum attacks

2

Fixed Security Level

Cannot be upgraded without creating new account

3

Signature Malleability

ECDSA signatures can be modified (mitigated by EIP-155)

Migration Path

If you need quantum resistance later:

1

Create Hybrid Account

Generate new Hybrid account with both ECDSA and PQC keys

2

Transfer Funds

Move funds from ECDSA to Hybrid account

3

Update References

Update any dApps or contracts referencing your address

See Hybrid Accounts for migration details.

  • Account Comparison - Compare all account types

  • PQC Accounts - Quantum-resistant accounts

  • Hybrid Accounts - Combined ECDSA + PQC

  • When to Use Each Account Type - Decision guide