How are Ethereum (ETH) addresses generated?
20 Feb, 2025
2 minutes
Ethereum is one of the most utilized blockchain networks for decentralized applications, smart contracts, and digital asset transactions. For transacting on this network-a process through which ETH or any other token is sent and received-each user requires an Ethereum address. But how are Ethereum addresses generated? Let's delve into the process behind Ethereum address creation, its security aspect, and why it's designed to be secure and decentralized in nature.
What is an Ethereum Address?
An Ethereum address is a unique string of characters which represents a wallet on the blockchain network. It starts with 0x, followed by 42 hexadecimal characters, made of numbers and letters.
Example Ethereum Address:
0x32Be343B94f860124dC4fEe278FDCBD38C102D88
Ethereum addresses are a necessity in transaction activities, receiving tokens, and, in many cases, interacting with decentralized applications, dApps.
How Does an Ethereum Address Generation Take Place?
If we are talking about how are ethereum addresses generated, we need to understand what cryptographic key pairs are. Ethereum addresses are derived from the cryptographic key pairs, more precisely from an ECDSA key pair. It requires a few steps:
1. Generate a Private Key
Every Ethereum address begins by generating a private key-a randomly generated 256-bit number that signs transactions. Private keys are generated through secure random number generation to make sure that they are unique and non-predictable.
A private key is a 64-character hexadecimal string.
Example:
e331b6d69882b4ebeca9c3b50f16e1d28e1b1b6e6f9b8c1c8f4d6c3b6b5e5e5a
This key should never be shared-whoever has access to the private key controls the wallet.
2. Derive the Public Key
Once the private key has been generated, derive a public key from this using ECC. This ensures one-way encryption is in place-the public key can be generated from the private key, but it's computationally impossible to generate a private key from the public key.
The Ethereum network uses the secp256k1 elliptic curve algorithm to compute public keys.
The public key is 128 hexadecimal characters (64 bytes).
3. Compute the Ethereum Address
Ethereum addresses are derived from the public key using the following operations:
- Keccak-256 Hashing:
-
The public key is hashed using a Keccak-256 hash function-not SHA-256 like Bitcoin.
-
This produces a 64-character hash, 256 bits.
- Grab the Last 40 Characters:
-
The last 40 characters, 20 bytes of the Keccak-256 hash, form the Ethereum address.
-
The first 2 characters are always 0x, a notation denoting this is a hexadecimal number.
Example:
Public Key:
04c2a9448aef4a2fd366a68e62b70cb62e9d3cf61a9d43ffb5277b0e2cfb17cd.
Keccak-256 Hash:
4f3edf983ac63db2261febf2bdb1259f3f40c7eac6736b8a3d73c6a5f92d6dd5
Ethereum Address:
0x4f3edf983ac63db2261febf2bdb1259f3f40c7ea
How Secure Is an Ethereum Address?
Because of their cryptography-based derivation, Ethereum addresses are very secure. In derivation from private key to public key, the operation is one-way, meaning that nobody can trace the private key from an Ethereum address.
This gives 2^160, or roughly 1.46 × 10^48, which means that an Ethereum address can be guessed using a brute-force approach, for all practical reasons.
However, the security of Ethereum depends upon how the users actually store their private keys. Never share your private key with anyone, and store it in highly secured places such as hardware wallets or encrypted software wallets.
Are Ethereum Addresses Case-Sensitive?
Ethereum addresses themselves are not case-sensitive, but usually, Ethereum utilizes checksum addresses to minimize the risk of errors.
If an address is in all lowercase or uppercase, then it is a valid address, but it doesn't contain any checksum.
Using mixed case allows for a checksum and thus makes the detection of typos much easier.
Examples:
0x4F3eDF983aC63dB2261fEBF2BdB1259F3F40c7Ea (Checksum Enabled)
0x4f3edf983ac63db2261febf2bdb1259f3f40c7ea (Valid but without checksum)
Can Two People Have the Same Ethereum Address?
In theory, the chances for two random users to produce one and the same Ethereum address is very low-to the extent, close to zero-because there can be such a huge number of addresses in total.
Nevertheless, there's a slight chance of an address collision in the case of usage of a weak random number generator-for example, some not-so-well-designed wallets or smart contracts. That's why using well-known, secure wallets is very important.
Conclusion
Ethereum addresses are generated through a secure cryptographic process involving private keys, public keys, and Keccak-256 hashing. This process ensures that each address is unique, secure, and nearly impossible to guess. Understanding how Ethereum addresses are created helps users better appreciate blockchain security and privacy. If you're using Ethereum for transactions or decentralized applications, make sure to safeguard your private key to prevent unauthorized access.