This guide explores the process of generating Ethereum addresses, contrasting it with Bitcoin's approach. The workflow follows three core steps: private key → public key → address, each with unique cryptographic operations.
How Are Private Keys, Public Keys, and Addresses Generated?
Step 1: Private Key Creation
- A 32-byte (64 hex characters) random private key is generated.
Example:18e14a7b6a307f426a94f8114701e7c8e774e7f9a47e2c2035db29a206321725 - Ethereum uses the secp256k1 elliptic curve algorithm (same as Bitcoin) to ensure cryptographic security.
Step 2: Deriving the Public Key
- The private key is processed via ECDSA-secp256k1 to produce a 65-byte uncompressed public key (prefix
04+ X/Y coordinates):
Example:0450863ad64a87ae8a2fe83c1af1a8403cb53f53e486d8511dad8a04887e5b23522cd470243453a299fa9e77237716103abc11a1df38855ed6f2ee187e9c582ba6 - The public key undergoes Keccak-256 hashing (a Ethereum-specific hash function) to yield a 32-byte hash:
Example:fc12ad814631ba689f7abe671016f75c54c607f082ae6b0881fac0abeda21781
Step 3: Address Generation
- The last 20 bytes of the Keccak-256 hash become the Ethereum address:
1016f75c54c607f082ae6b0881fac0abeda21781 - Addresses are prefixed with
0xfor standardization:0x1016f75c54c607f082ae6b0881fac0abeda21781
Key Differences Between Ethereum and Bitcoin
| Feature | Ethereum | Bitcoin |
|---|---|---|
| Public Key | Uses uncompressed format (04 prefix) | Supports compressed (02/03 prefix) and uncompressed formats |
| Hashing | Keccak-256 (part of SHA-3 family) | SHA-256 + RIPEMD-160 |
| Address | Last 20 bytes of Keccak-256 hash | RIPEMD-160(SHA-256(public key)) |
FAQs
1. Why does Ethereum use Keccak-256 instead of SHA-256?
Keccak-256 (a SHA-3 variant) was chosen for its resistance to certain types of cryptographic attacks and alignment with Ethereum’s design philosophy.
2. Can I reuse a Bitcoin private key for Ethereum?
Yes, but the derived addresses will differ due to distinct hashing algorithms. Always use dedicated key management tools.
3. Is the 0x prefix mandatory?
While technically optional, 0x is universally adopted to denote hex-encoded strings in Ethereum’s ecosystem.
4. How secure is the secp256k1 curve?
Extensively vetted, secp256k1 remains secure against known attacks when implemented correctly.
5. What happens if two users generate the same private key?
Collisions are statistically negligible (probability ~1 in 2²⁵⁶). Use reputable entropy sources to minimize risks.
👉 Explore advanced Ethereum wallet security practices
👉 Compare Ethereum and Bitcoin address formats in detail
For further reading, refer to Ethereum’s official documentation.