Learning Objectives – after this chapter you will be able to:
  • Explain step by step how an EOA address is derived from a private key.
  • Explain how contract addresses are computed with CREATE and CREATE2.
  • Describe the EIP-55 mixed-case checksum and why it is useful.
Ethereum Address
  • An Ethereum address is a 20-byte (160-bit) identifier for an account.
  • For an EOA, the address is the last 20 bytes of the Keccak-256 hash of the public key.
  • It is written in hexadecimal format and is usually shown with the prefix 0x, giving 0x + 40 hex characters.
  • Example :
    0x3DaA90098798193a000DE8C9A462f9Bf6271baDd
How an EOA Address is Generated
1. Private keyRandom 256-bit (32-byte) number. Keep secret!
2. Public keyDerived using elliptic-curve multiplication on secp256k1 (64 bytes).
3. Keccak-256Hash the public key → 32-byte hash.
4. AddressKeep the last 20 bytes, add 0x.
  • The process is one-way: you can go from private key to address, but not from an address back to the key.
  • Ethereum uses the original Keccak-256 function, which differs slightly (in padding) from the later NIST-standard SHA3-256, so the two give different outputs for the same input.
Contract Addresses

A contract has no key pair, so its address is computed deterministically:

MethodAddress formulaDepends on
CREATELast 20 bytes of keccak256(rlp([sender, nonce]))Creator’s address and its nonce (how many transactions/contracts it has created)
CREATE2 (EIP-1014)Last 20 bytes of keccak256(0xff ++ sender ++ salt ++ keccak256(init_code))Creator’s address, a chosen salt and the contract’s initialisation code – so the address can be known before deployment
Checksum Addresses (EIP-55)
  • An address can be written fully in lower-case, or in mixed case that contains a checksum.
  • EIP-55 rule: hash the lower-case hex address with Keccak-256; for each letter (a–f) in the address, write it in upper case if the matching hex digit of the hash is 8 or higher, otherwise in lower case.
  • Wallets that support EIP-55 can detect most typing mistakes, because a wrong character would make the capitalisation pattern invalid. The example address above is a valid EIP-55 checksum address.
  • Addresses are not case-sensitive for the protocol itself – the capitalisation is only a safety check.
Safety: always copy-paste and double-check addresses. Transactions sent to a wrong address cannot be reversed. Sending to the zero address (0x000…000) effectively destroys (burns) the funds.
Key Takeaways
  • EOA address = last 20 bytes of Keccak-256(public key), shown as 0x + 40 hex characters.
  • Contract addresses come from CREATE (sender + nonce) or CREATE2 (sender + salt + init code).
  • EIP-55 mixed-case checksums help catch typing errors.
Question / Answer (15 questions)

Answer : An Ethereum address is 20 bytes (160 bits). It is written as 40 hexadecimal characters, usually prefixed with 0x, for example 0x3DaA90098798193a000DE8C9A462f9Bf6271baDd.

Answer : Generate a random 256-bit private key; derive the 64-byte public key using secp256k1 elliptic-curve multiplication; hash the public key with Keccak-256; take the last 20 bytes of the hash and prefix it with 0x.

Answer : secp256k1, the same curve used by Bitcoin.

Answer : No. Deriving the public key from the private key and hashing it are one-way operations. Reversing them is computationally infeasible with current technology.

Answer : No. Ethereum adopted Keccak-256 before NIST finalised the SHA-3 standard. The final SHA3-256 uses different padding, so the two functions give different outputs for the same input.

Answer : It is the last 20 bytes of the Keccak-256 hash of the RLP encoding of the creator’s address and the creator’s nonce. Therefore it depends on who deploys the contract and how many transactions/contracts that account has created.

Answer : With CREATE2 the address depends on the creator, a chosen salt and the hash of the initialisation code – not on the nonce. This lets developers know a contract’s address before it is deployed, which is useful for counterfactual deployment and smart-contract wallets.

Answer : EIP-55 defines a mixed-case checksum encoding for addresses. The capitalisation of letters is determined by the Keccak-256 hash of the lower-case address, allowing software to detect most typing errors.

Answer : Hash the lower-case hex address (without 0x) with Keccak-256. For each letter in the address, if the corresponding hex digit of the hash is 8 or greater, write the letter in upper case; otherwise write it in lower case. Digits are unchanged.

Answer : Not for the protocol – lower-case and checksum versions represent the same account. Capitalisation only serves as an error-detection checksum for software that supports EIP-55.

Answer : The zero address is 0x0000000000000000000000000000000000000000. No one has its private key, so funds sent there are effectively burned and cannot be recovered.

Answer : Contract addresses are computed deterministically from deployment data, not from a key pair. A contract is controlled by its code, so it does not need a key.

Answer : Blockchain transactions are irreversible. If funds are sent to a wrong or mistyped address, no central party can return them.

Answer : There are 2^160 possible 20-byte addresses – an astronomically large number, which makes accidental collisions practically impossible.

Answer : An address is the identifier of an account. The account is the record in the Ethereum state (nonce, balance, codeHash, storageRoot) stored under that address.
MCQ Test : Check Your Understanding (5 questions)

Select an option and press Check Answer, or answer all questions and press Submit Test to see your score. Each answer comes with an explanation.

Q1. An Ethereum EOA address is formed from:

Show Answer

Correct Answer : B. The last 20 bytes of Keccak-256(public key)
The address is the last 20 bytes of the Keccak-256 hash of the public key.

Q2. How many hexadecimal characters follow “0x” in an Ethereum address?

Show Answer

Correct Answer : C. 40
20 bytes × 2 hex characters per byte = 40 characters.

Q3. The address of a contract created with CREATE depends on:

Show Answer

Correct Answer : A. The creator’s address and nonce
CREATE uses keccak256(rlp([sender, nonce])).

Q4. EIP-55 is used for:

Show Answer

Correct Answer : D. Mixed-case address checksums
EIP-55 encodes a checksum in the capitalisation of address letters.

Q5. Which elliptic curve is used to derive Ethereum public keys?

Show Answer

Correct Answer : B. secp256k1
Ethereum, like Bitcoin, uses secp256k1 for account key pairs.

Bibliography/References

The notes, questions and MCQs on this page are original explanations written for this course. The works listed below were consulted and are cited for attribution and further reading. Product names, logos and trademarks belong to their respective owners. Short quotations, where used, are marked and attributed.

  1. ethereum.org. (n.d.). Ethereum accounts. Ethereum Developer Documentation. https://ethereum.org/en/developers/docs/accounts/
  2. Ethereum Improvement Proposals. (2016). EIP-55: Mixed-case checksum address encoding. https://eips.ethereum.org/EIPS/eip-55
  3. Ethereum Improvement Proposals. (2018). EIP-1014: Skinny CREATE2. https://eips.ethereum.org/EIPS/eip-1014
  4. Wood, G. Ethereum: A Secure Decentralised Generalised Transaction Ledger (Ethereum Yellow Paper). https://ethereum.github.io/yellowpaper/paper.pdf
  5. National Institute of Standards and Technology. (2015). SHA-3 Standard: Permutation-Based Hash and Extendable-Output Functions (FIPS PUB 202). https://doi.org/10.6028/NIST.FIPS.202
  6. Certicom Research. (2010). SEC 2: Recommended Elliptic Curve Domain Parameters (Version 2.0). Standards for Efficient Cryptography Group. https://www.secg.org/sec2-v2.pdf
  7. Antonopoulos, A. M., & Wood, G. (2018). Mastering Ethereum: Building Smart Contracts and DApps. O’Reilly Media.