Module 2 – Wallets, Keys, Addresses & Transaction Mechanics
This module explains how cryptocurrency wallets function, how public–private keys are generated, how addresses are derived, and how transactions are formed, verified, and propagated across decentralised networks. Together, these mechanisms define the user-facing and protocol-level behaviour of digital asset systems.
1. Public–Private Key Pairs
A public–private key pair is the cryptographic foundation of user identity in blockchain systems. Unlike traditional accounts, blockchain identities are not issued by institutions—they are self-generated using mathematical functions.
- Private Key: A long, randomly generated number that must remain secret.
- Public Key: Derived from the private key via elliptic curve multiplication.
- Address: A hashed, shorter representation of the public key for user-friendly use.
In decentralised systems, possession of the private key equals ownership of assets. No central authority can restore or reissue this key.
2. Types of Cryptocurrency Wallets
A “wallet” is not a container for coins; rather, it is a system that stores private keys and facilitates transaction signing. Three broad categories exist:
2.1 Hot Wallets
Connected to the internet; ideal for convenience and frequent use.
- Mobile wallets
- Desktop wallets
- Web-hosted wallets
2.2 Cold Wallets
Offline storage for high-security and long-term asset protection.
- Hardware wallets (e.g., Ledger, Trezor)
- Paper wallets
- Air-gapped signing devices
2.3 Custodial vs Non-Custodial
Custodial wallets delegate key control to third parties (e.g., exchanges), while non-custodial wallets give users full sovereignty.
In decentralised finance, “Not your keys, not your coins” remains a guiding principle.
3. Address Derivation & Hierarchical Deterministic Wallets
Modern wallets use Hierarchical Deterministic (HD) architectures (BIP32/BIP44), which allow structured generation of many keys from a single seed phrase.
3.1 Seed Phrase (Mnemonic Phrase)
A human-readable set of 12–24 words representing the root entropy used to derive the entire key hierarchy. Losing this phrase means permanent asset loss.
3.2 Deterministic Key Derivation
HD wallets generate child keys through deterministic mathematical functions. This allows:
- Unlimited addresses from one seed
- Backup once, restore anywhere
- Consistent cross-platform compatibility
3.3 Address Formats
Common formats include:
- Bitcoin: Legacy (P2PKH), SegWit (Bech32)
- Ethereum: Hex-encoded address (Keccak-256 derived)
- Others: Chain-specific encoding formats
4. Anatomy of a Cryptocurrency Transaction
A transaction is the fundamental state transition mechanism in blockchain networks. It authorises the movement or transformation of digital assets.
4.1 Bitcoin (UTXO-based)
Bitcoin transactions have the form:
- Inputs: Existing UTXOs being spent.
- Outputs: New UTXOs created.
- Signatures: Unlocking scripts proving authority.
- Locking Scripts: Spending conditions for outputs.
4.2 Ethereum (Account-based)
Transactions specify:
- Sender
- Receiver
- Value
- Nonce
- Gas limit and gas price
- Optional data payload (for smart contracts)
5. Digital Signatures & Transaction Authentication
Every transaction must be cryptographically signed to prove legitimacy. Blockchain networks commonly use elliptic curve signatures (e.g., ECDSA, Ed25519).
5.1 Why Signatures Are Essential
- Authenticity: Ensures sender is legitimate.
- Integrity: Transactions cannot be altered.
- Non-repudiation: Signer cannot deny the action.
5.2 Signature Verification
Nodes verify signatures using the sender’s public key. Verification ensures that:
- Funds exist
- Inputs are unspent
- The signature matches the message
6. Transaction Lifecycle: From User to Blockchain
The full lifecycle of a transaction proceeds through several distinct stages:
- Creation: User constructs transaction in a wallet.
- Signing: Private key signs transaction parameters.
- Broadcasting: Transaction is sent to the P2P network.
- Mempool: Transaction waits for miner/validator selection.
- Inclusion: Selected transaction is placed into a block.
- Confirmation: Additional blocks strengthen irreversibility.
7. Fees, Nonces, and Gas Economics
Transaction fees serve as an economic throttle, balancing supply (block space) against demand (network usage).
7.1 Bitcoin Fees
Bitcoin fees depend primarily on:
- Transaction byte size
- Network congestion
- Mempool dynamics
7.2 Ethereum Gas
Ethereum expresses computation as “gas”, with users specifying:
- Gas Limit: Maximum computational steps allowed.
- Gas Price: Fee per unit of gas.
- Base Fee: Protocol-defined minimum cost (EIP-1559).
7.3 Nonces
Nonces prevent replay attacks and enforce transaction ordering for each account.
8. Module Summary
Module 2 explored how keys, addresses, and wallets form the basis of user identity; how transactions encode state changes; how signatures authenticate spending; and how the transaction lifecycle unfolds across the P2P network. Together, these mechanics enable secure, decentralised digital money systems without institutional intermediaries.