# Technical foundations

> Source: https://timechain.wiki/wiki/technical-foundations · TimechainWiki, the Bitcoin encyclopedia. (sub-MOC · technical)

> The cryptographic, transactional, and network-layer mechanics that make Bitcoin function. Cryptographic primitives are treated as black boxes whose *properties* (collision resistance, unforgeability, one-wayness) matter for sound-money and self-sovereignty; the *internals* (the mathematics of elliptic curves, the bit-level operations inside SHA-256) belong in cryptographic textbooks. The primary notes are organized into six clusters: cryptographic primitives, addresses and transactions, blocks and chain, consensus, network and validation, and protocol upgrades. The section is the deferral-target for mechanism detail referenced from operational notes (Self-custody, On-chain), historical notes (History and origins), and analytical notes (Criticisms, Controversies).

---

## How to use this sub-MOC

The notes here are reference-style rather than essay-style. Each note treats one mechanism (a primitive, a transaction structure, a consensus rule) at a depth sufficient to be referenced from other sections. The clusters group notes by structural role:

1. **By cluster** — grouped by what conceptual layer the mechanism operates on (primitives, transactions, blocks, consensus, network, upgrades)
2. **By suggested reading order** — for someone working through the area systematically, the cluster order (1 → 6) is also the dependency order
3. **By function** — every note is a deferral-target. Operational and analytical notes elsewhere reference these for the underlying mechanism

Each note can be read on its own; the cluster structure is for navigation, not for redundant summary.

---

## The conceptual layering

The technical foundations are organized as a stack — each cluster builds on the one before.

**Layer 1 — Cryptographic primitives.** The building blocks. Public keys and signatures; hash functions; tree-of-hashes. What properties do these primitives provide, and which Bitcoin uses where?

**Layer 2 — Addresses and transactions.** How primitives compose into the application-visible mechanism. Addresses derive from keys; transactions consume and create UTXOs; scripts gate spending.

**Layer 3 — Blocks and chain.** How transactions compose into blocks, and how blocks compose into the chain. Where chain reorganizations come from and how they're handled.

**Layer 4 — Consensus.** How nodes agree on which chain is canonical. Proof of Work as the costly-anchor; difficulty adjustment as the self-correcting mechanism; consensus rules as the inviolable surface.

**Layer 5 — Network and validation.** How the system operates as a distributed network. Peer-to-peer propagation; the three node-types and their tradeoffs.

**Layer 6 — Protocol upgrades.** How the protocol changes (or doesn't) over time. Soft forks and hard forks as the two basic upgrade modes.

Each layer is reference-able from the next. The cross-link graph carries most of the integrative work; the notes themselves stay scope-disciplined.

---

## Cluster 1 — Cryptographic primitives

The foundational building blocks. Property-focused treatment: what each primitive guarantees, what it doesn't, and which Bitcoin uses depend on which properties.

- [Public key cryptography](https://timechain.wiki/wiki/public-key-cryptography.md) — Asymmetric cryptography fundamentals; key generation; the secp256k1 elliptic curve as the specific basis Bitcoin uses; private-key/public-key/address relationship. The black-box treatment: what the primitive guarantees and which subsequent layers rely on those guarantees.
- [SHA-256](https://timechain.wiki/wiki/sha-256.md) — Cryptographic hash function properties (preimage resistance, second-preimage resistance, collision resistance); where Bitcoin uses SHA-256 (hash of transactions, hash chain in Proof of Work, address derivation as part of HASH160); the double-SHA-256 convention; why SHA-256 specifically.
- [Merkle trees](https://timechain.wiki/wiki/merkle-trees.md) — Tree-of-hashes construction; the Merkle root in a block header; how SPV verification uses Merkle proofs; the role of Merkle structure in light-client architecture and in inclusion-proof workflows.
- [Signature schemes in Bitcoin](https://timechain.wiki/wiki/signature-schemes-in-bitcoin.md) — ECDSA (the original signature scheme; secp256k1; signature malleability and BIP-66/BIP-146 fixes); Schnorr signatures (Taproot 2021; BIP-340/341/342; key aggregation and the multisig efficiency story); the cohabitation of both schemes in modern Bitcoin; why Schnorr was added.

**Cross-listed from Criticisms (cryptographic-layer concerns):**

- [Quantum computing threat to Bitcoin](https://timechain.wiki/wiki/quantum-computing-threat-to-bitcoin.md) _(home: criticisms — substantive engagement; see also light-touch in [Public key cryptography](https://timechain.wiki/wiki/public-key-cryptography.md) and [Signature schemes in Bitcoin](https://timechain.wiki/wiki/signature-schemes-in-bitcoin.md))_

**Cross-listed from Controversies (cryptographic-layer event):**

- [The post-quantum migration debate](https://timechain.wiki/wiki/the-post-quantum-migration-debate.md) _(home: controversies — event-level engagement on which post-quantum scheme Bitcoin should adopt and when)_

---

## Cluster 2 — Addresses and transactions

How primitives compose into the application-visible mechanism. The UTXO model is the load-bearing structural choice; everything else in transaction-layer Bitcoin descends from it.

- [Bitcoin addresses](https://timechain.wiki/wiki/bitcoin-addresses.md) — Address types across eras (P2PKH, P2SH, Bech32 SegWit v0, Bech32m Taproot v1); the derivation path from private key through public key to address; address-reuse properties and chain-analysis implications.
- [UTXO model and Bitcoin transactions](https://timechain.wiki/wiki/utxo-model-and-bitcoin-transactions.md) — The UTXO (unspent transaction output) data model versus account-balance models; how transactions consume inputs and create outputs; how change works; the structural privacy and parallelizability properties of UTXO; how transactions chain.
- [Bitcoin Script and opcodes](https://timechain.wiki/wiki/bitcoin-script-and-opcodes.md) — The stack-based scripting language; opcode taxonomy (push, control, stack manipulation, arithmetic, crypto); standard script templates; the deliberate Turing-incompleteness; how Tapscript extended Script for Taproot.

---

## Cluster 3 — Blocks and chain

How transactions compose into blocks, and how blocks compose into the chain.

- [Blocks and the blockchain](https://timechain.wiki/wiki/blocks-and-the-blockchain.md) — Block structure (header, transactions, Merkle root, nonce); the chain of block headers as the chain anchor; block weight versus block size after SegWit; the 1 MB / 4 MWU constraint and its empirical history.
- [Chain reorganizations](https://timechain.wiki/wiki/chain-reorganizations.md) — How forks happen at the chain tip; longest-chain rule (more precisely, most-cumulative-work); reorganization depth distributions empirically; the confirmation-depth conventions for different transaction values; double-spend implications of shallow reorgs.

---

## Cluster 4 — Consensus

How nodes agree on which chain is canonical. The substantive technical content behind the "Bitcoin's consensus mechanism" framing.

- [Proof of Work](https://timechain.wiki/wiki/proof-of-work.md) — Hash-based costly-signaling; the SHA-256 difficulty puzzle; why energy expenditure is the mechanism's load-bearing property; relationship to Hashcash (Adam Back, 1997) as the immediate antecedent; what Proof of Work secures and what it doesn't.
- [Difficulty adjustment](https://timechain.wiki/wiki/difficulty-adjustment.md) — The 2016-block (~2 weeks) retarget mechanism; the four-times-bounded adjustment cap; how difficulty tracks hashrate; the dynamics around halvings and hashrate shocks; the self-correcting property as the heart of the protocol's economic stability.
- [Consensus rules](https://timechain.wiki/wiki/consensus-rules.md) — The full set of rules every node enforces (block validity, transaction validity, signature validity, scriptverify, etc.); the rule set as the inviolable surface; how rule changes happen (soft fork / hard fork); why "running a node" matters for consensus enforcement.

**Cross-listed from Criticisms (consensus-layer concerns):**

- [Long-term security budget](https://timechain.wiki/wiki/long-term-security-budget.md) _(home: criticisms — substantive engagement on what happens to mining incentives after block subsidies decline)_
- [Consensus-layer attack theories](https://timechain.wiki/wiki/consensus-layer-attack-theories.md) _(home: criticisms — substantive engagement on 51% attacks, selfish mining, and other theoretical attack vectors)_

---

## Cluster 5 — Network and validation

How the system operates as a distributed network.

- [The peer-to-peer network](https://timechain.wiki/wiki/the-peer-to-peer-network.md) — Node discovery (DNS seeds, hardcoded seeds, address gossip); block and transaction propagation; the relay network and compact-block relay; eclipse attack surface and partition resistance.
- [Full nodes vs pruned vs SPV](https://timechain.wiki/wiki/full-nodes-vs-pruned-vs-spv.md) — The three node-types and their tradeoffs; what each can verify; pruned-node disk savings; SPV (Simplified Payment Verification) trust assumptions; why running a full node matters for self-sovereignty.

---

## Cluster 6 — Protocol upgrades

How the protocol changes (or doesn't) over time.

- [Soft forks and hard forks](https://timechain.wiki/wiki/soft-forks-and-hard-forks.md) — The two upgrade modes; backward-compatibility properties; activation mechanisms (BIP9 versionbits, BIP8 with UASF, BIP148-style user activation); the recent history of soft-fork activations (SegWit, Taproot); why Bitcoin's culture strongly prefers soft forks over hard forks.

**Cross-listed from Criticisms (protocol-evolution concerns):**

- [Protocol-evolution constraints](https://timechain.wiki/wiki/protocol-evolution-constraints.md) _(home: criticisms — substantive engagement on why protocol changes are structurally difficult and what that costs)_

**Cross-listed from Controversies (protocol-evolution events):**

- [OP_CAT and the covenants programmability debate](https://timechain.wiki/wiki/op-cat-and-the-covenants-programmability-debate.md) _(home: controversies — event-level engagement on whether covenants should be reintroduced)_
- [BIP-300 and the Drivechains debate](https://timechain.wiki/wiki/bip-300-and-the-drivechains-debate.md) _(home: controversies — event-level engagement on sidechain peg mechanisms)_
- [The Ordinals, Inscriptions, and BIP-110 controversy](https://timechain.wiki/wiki/the-ordinals-inscriptions-and-bip-110-controversy.md) _(home: controversies — event-level engagement on data-on-chain disputes)_

---

## Analytical voices anchoring this area

The thinker pages most load-bearing for the technical foundations. Each treats a person's broader contribution; this section's notes reference them for specific technical work.

**Protocol architects and contributors**

- [Pieter Wuille](https://timechain.wiki/wiki/pieter-wuille.md) — Co-author of Schnorr/Taproot; SegWit architect; deep Bitcoin Core contributor. The most-cited technical-protocol thinker for this section.
- [Greg Maxwell](https://timechain.wiki/wiki/greg-maxwell.md) — Long-time Bitcoin Core contributor; co-author of Confidential Transactions and many cryptographic refinements; influential reviewer.
- [Peter Todd](https://timechain.wiki/wiki/peter-todd.md) — Independent Bitcoin Core contributor; vocal on protocol-conservatism, replace-by-fee, and merge-mining; the contrarian-but-substantive voice.
- [John Newbery](https://timechain.wiki/wiki/john-newbery.md) — Bitcoin Core contributor; founder of Brink (independent developer funding) and co-founder of Bitcoin Optech; the developer-education-and-funding-infrastructure anchor.

*(The Lightning/L2 protocol architects — Poon, Dryja, Osuntokun, Pickhardt — are homed in [Scaling and Layer 2](https://timechain.wiki/wiki/scaling-and-layer-2.md) § Analytical voices; the on-chain primitives they build on are here.)*

**Educators and reference authors**

- [Andreas Antonopoulos](https://timechain.wiki/wiki/andreas-antonopoulos.md) — *Mastering Bitcoin*; the canonical engineering reference; the educational anchor for this section.
- [Jimmy Song](https://timechain.wiki/wiki/jimmy-song.md) — *Programming Bitcoin*; Bitcoin technical writer; the working-programmer pedagogical voice.
- [Kalle Rosenbaum](https://timechain.wiki/wiki/kalle-rosenbaum.md) — *Grokking Bitcoin*; alternative pedagogical reference.

**Practitioners and toolmakers**

- [Jameson Lopp](https://timechain.wiki/wiki/jameson-lopp.md) — Bitcoin engineer and security practitioner; database-of-attacks and operational-security work; bridges technical and operational layers.
- [Rodolfo Novak](https://timechain.wiki/wiki/rodolfo-novak.md) — NVK; Coinkite co-founder; *Bitcoin & Quantum Computing* research series; the quantum-threat research anchor.

---

## Canonical sources for this area

- [Mastering Bitcoin - Andreas Antonopoulos](https://timechain.wiki/wiki/mastering-bitcoin-andreas-antonopoulos.md) — The canonical engineering reference for Bitcoin. Treated as the section's principal background source; specific notes cite specific chapters.
- [The Bitcoin whitepaper - Explainer](https://timechain.wiki/wiki/the-bitcoin-whitepaper-explainer.md) — The mechanism-focused walkthrough of the whitepaper. Companion reference for the consensus and Proof of Work clusters specifically.
- *Programming Bitcoin* (Jimmy Song, 2019) — Working-programmer treatment; useful especially for the addresses-and-transactions cluster.
- *Grokking Bitcoin* (Kalle Rosenbaum, 2019) — Pedagogical reference; alternative entry point.
- BIPs (Bitcoin Improvement Proposals) at github.com/bitcoin/bips — The primary-source technical documentation; specific notes cite specific BIPs.

---

## Key connections to other areas

This section is the deferral-target for technical mechanism referenced from other sections.

**To [Practical self-custody and sovereignty](https://timechain.wiki/wiki/practical-self-custody-and-sovereignty.md):**

- The cryptographic primitives (public-key crypto, signatures) underlie key management
- The UTXO model and addresses underlie transaction construction
- The full-node-versus-SPV tradeoff underlies the self-sovereignty case for running a node

**To [Economics and monetary theory](https://timechain.wiki/wiki/economics-and-monetary-theory.md):**

- [The halving - Mechanism](https://timechain.wiki/wiki/the-halving-mechanism.md) and [Bitcoin fixed supply and issuance schedule](https://timechain.wiki/wiki/bitcoin-fixed-supply-and-issuance-schedule.md) reference the consensus-rules infrastructure that enforces them
- Proof of Work's energy expenditure is the load-bearing mechanism for the hardness argument

**To [History and origins](https://timechain.wiki/wiki/history-and-origins.md):**

- [Bitcoin forks - History](https://timechain.wiki/wiki/bitcoin-forks-history.md) defers fork taxonomy to [Soft forks and hard forks](https://timechain.wiki/wiki/soft-forks-and-hard-forks.md)
- [Block Size Wars - History](https://timechain.wiki/wiki/block-size-wars-history.md) defers protocol-mechanism detail here
- [Pre-Bitcoin attempts at internet money](https://timechain.wiki/wiki/pre-bitcoin-attempts-at-internet-money.md) defers Hashcash mechanism to [Proof of Work](https://timechain.wiki/wiki/proof-of-work.md)

**To [Criticisms of Bitcoin](https://timechain.wiki/wiki/criticisms-of-bitcoin.md) and [Bitcoin controversies](https://timechain.wiki/wiki/bitcoin-controversies.md):**

- 4 cross-listed Criticism notes (Quantum, Long-term security budget, Consensus-layer attack theories, Protocol-evolution constraints) live in the Criticisms section but cross-list here
- 4 cross-listed Controversy notes (Post-quantum migration, OP_CAT covenants, BIP-300 Drivechains, Ordinals/Inscriptions) live in the Controversies section but cross-list here

---

## What this area doesn't cover

- **Cryptographic textbook material.** Elliptic-curve arithmetic, finite-field theory, bit-level hash construction. These belong in standard cryptography references; this section treats primitives as black boxes.
- **Bitcoin Core implementation specifics.** Code paths, data structures, internal APIs. These are documented at github.com/bitcoin/bitcoin and in BIP texts; this section treats the protocol as specified, not as implemented.
- **Wallet-software internals.** PSBT signing flows, descriptor handling, hardware-wallet protocols. The [Practical self-custody and sovereignty](https://timechain.wiki/wiki/practical-self-custody-and-sovereignty.md) section covers the operational side.
- **Lightning Network and Layer 2.** Lightning is the [Scaling and Layer 2](https://timechain.wiki/wiki/scaling-and-layer-2.md) section; the on-chain protocol that Lightning rides on is here.
