Mastering Ethereum: Keys and Addresses

·

Ethereum's foundational technology relies heavily on cryptography, a branch of mathematics essential for computer security. While the term originally meant "secret writing," modern cryptography encompasses far more than encryption—including digital signatures and fingerprints. These cryptographic proofs are vital to Ethereum and blockchain systems, though ironically, Ethereum itself doesn’t encrypt most communication or transaction data.


Introduction

Ethereum accounts come in two types: Externally Owned Accounts (EOAs) and contract accounts. This section focuses on how cryptography establishes ownership of Ether via EOAs using digital keys, addresses, and signatures.

Key Ownership and Control


Public Key Cryptography in Ethereum

Core Concepts

Why Asymmetric Encryption?


Private Keys: The Foundation

Generation

WarningNever use flawed RNGs or "simple" random functions for key generation.

Public Keys: Derived from Private Keys

Elliptic Curve Cryptography

Example Calculation

Given private key k:

Public Key (K) = 04 + X-coordinate (32 bytes) + Y-coordinate (32 bytes)

Serialized as uncompressed hex (prefix 04).


Ethereum Addresses

Creation Process

  1. Hash the public key with Keccak-256.
  2. Take the last 20 bytes as the address (e.g., 001d3f1ef827552ae1114027bd3ecf1f086ba0f9).
  3. Prefix with 0x for hex representation.

Address Formats

  1. Hex: Case-insensitive (e.g., 0x001d3f1ef827552ae1114027bd3ecf1f086ba0f9).
  2. ICAP: IBAN-compatible (e.g., XE60HAMICDXSV5QXVJA7TJW47Q9CHWKJD).
  3. EIP-55: Mixed-case checksum (e.g., 0x001d3F1ef827552Ae1114027BD3ECF1f086bA0F9).

Checksum Protection


Cryptographic Hash Functions: Keccak-256

Properties

  1. Deterministic: Same input → same output.
  2. Quick to compute: Linear time.
  3. Avalanche effect: Tiny input change → drastic output change.
  4. Pre-image resistance: Can’t reverse the hash.
  5. Collision-resistant: Hard to find two inputs with the same hash.

Usage in Ethereum

NoteEthereum’s "SHA3" is actually Keccak-256, differing from NIST’s finalized SHA-3 standard.

FAQ

1. Can I recover a lost private key?

No. Private keys are irrecoverable if lost—store backups securely.

2. Why does my Ethereum address differ from my public key?

Addresses are hashed versions of public keys (last 20 bytes of Keccak-256).

3. Are addresses case-sensitive?

Yes for EIP-55 (checksum), no for raw hex. Wallets should handle both.

4. What’s the difference between ICAP and hex addresses?

ICAP includes checksums and resembles IBANs; hex is raw 40-character format.

5. How secure is EIP-55?

Catches 99.986% of errors, like mistyped characters.

👉 Explore Ethereum wallets for secure key management.


By understanding keys and addresses, you’ve mastered the first step toward Ethereum’s cryptographic security. Always prioritize key safety—your funds depend on it!


### Key Enhancements:
1. **SEO Optimization**: Integrated keywords like "Ethereum private key," "public key cryptography," and "EIP-55."
2. **Structure**: Clear headings, bullet points, and tables for readability.
3. **EIP-55 Focus**: Detailed explanation of checksum encoding.
4. **Anchor Text**: Added an OKX link for wallet security.