Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added .nojekyll
Empty file.
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,17 @@ python3 labs/tls13_hybrid_demo.py

The labs use a pure-Python ML-KEM implementation for teaching. They are not production code and the timings are not representative.

## Host the quiz on GitHub Pages
## The site

1. In the repository, open **Settings > Pages**.
2. Under **Build and deployment**, choose **Deploy from a branch**, branch `main`, folder `/ (root)`.
3. The quiz is then served at `https://<user>.github.io/pqc-study/quiz/`.
Served by GitHub Pages from the repo root at **https://pqc.bartiklabs.com** (see `CNAME`). Pages: `/` home, `/guide/` chapters, `/quiz/`, `/labs/`.

The HTML pages are generated from the Markdown guide and the lab sources, and are committed because Pages serves the repo as-is:

```bash
pip install markdown
python3 build_site.py
```

## Keeping it current

The guide's status table (chapter 1) and the policy chapter (14) age fastest. When a standard or draft changes, update the guide first, then the matching quiz questions in `quiz/index.html` (each question carries its explanation inline).
The guide's status table (chapter 1) and the policy chapter (14) age fastest. When a standard or draft changes, update `docs/pqc-study-guide.md` first, re-run `build_site.py`, then update the matching quiz questions in `quiz/index.html` (each question carries its explanation inline).
46 changes: 46 additions & 0 deletions assets/site.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

95 changes: 95 additions & 0 deletions build_site.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
#!/usr/bin/env python3
"""Build the static site from docs/pqc-study-guide.md and labs/*.py.
Run: pip install markdown ; python3 build_site.py
Outputs index.html, guide/*.html, labs/index.html (commit them; Pages serves the repo as-is)."""
import html, re, pathlib, markdown

ROOT = pathlib.Path(__file__).parent
SRC = (ROOT / "docs/pqc-study-guide.md").read_text()
SITE = "PQC Study"
REPO = "https://github.com/bbartik/pqc-study"

def page(title, body, nav_active="", desc=""):
nav = "".join(
f'<a href="{h}"{" aria-current=page" if k == nav_active else ""}>{t}</a>'
for k, h, t in [("home", "/", "Home"), ("guide", "/guide/", "Guide"),
("quiz", "/quiz/", "Quiz"), ("labs", "/labs/", "Labs")])
return f"""<!doctype html>
<html lang="en"><head><meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>{html.escape(title)}</title>
<meta name="description" content="{html.escape(desc or 'Post-quantum cryptography study guide, quiz and labs for network engineers.')}">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500;600&display=swap">
<link rel="stylesheet" href="/assets/site.css">
</head><body>
<header class="top"><div class="wrap bar"><a class="brand" href="/">{SITE}</a><nav>{nav}</nav></div></header>
{body}
<footer><div class="wrap">Facts current to 3 December 2026. Confirm standards status against primary sources. <a href="{REPO}">Source on GitHub</a></div></footer>
</body></html>"""

md = markdown.Markdown(extensions=["tables", "fenced_code", "toc", "sane_lists"],
extension_configs={"toc": {"toc_depth": "2-3"}})
def render(text):
md.reset(); return md.convert(text)

# split guide
parts = re.split(r"(?m)^## ", SRC)
intro, chapters = parts[0], parts[1:]
chs = []
for i, c in enumerate(chapters, 1):
head, _, rest = c.partition("\n")
title = re.sub(r"^\d+\.\s*", "", head.strip())
chs.append(dict(n=i, title=title, body=rest, slug=f"{i:02d}-" + re.sub(r"[^a-z0-9]+", "-", title.lower()).strip("-")[:48].strip("-")))

(ROOT / "guide").mkdir(exist_ok=True)
for old in (ROOT / "guide").glob("*.html"): old.unlink()

def sidebar(cur=None):
li = "".join(f'<li><a href="/guide/{c["slug"]}.html"{" aria-current=page" if c["n"]==cur else ""}><span>{c["n"]}</span>{html.escape(c["title"])}</a></li>' for c in chs)
return f'<aside class="side"><a class="side-h" href="/guide/">All chapters</a><ol>{li}</ol></aside>'

for k, c in enumerate(chs):
prev = chs[k-1] if k else None
nxt = chs[k+1] if k+1 < len(chs) else None
pn = "".join([
f'<a class="pn" href="/guide/{prev["slug"]}.html"><small>Previous</small>{prev["n"]}. {html.escape(prev["title"])}</a>' if prev else "<span></span>",
f'<a class="pn r" href="/guide/{nxt["slug"]}.html"><small>Next</small>{nxt["n"]}. {html.escape(nxt["title"])}</a>' if nxt else '<a class="pn r" href="/quiz/"><small>Done reading?</small>Take the quiz</a>'])
body = f'<div class="wrap layout">{sidebar(c["n"])}<main class="prose"><p class="kicker">Chapter {c["n"]} of {len(chs)}</p><h1>{html.escape(c["title"])}</h1>{render(c["body"])}<div class="pnrow">{pn}</div></main></div>'
(ROOT / "guide" / f'{c["slug"]}.html').write_text(page(f'{c["n"]}. {c["title"]} | {SITE}', body, "guide"))

intro_html = render(re.sub(r"(?m)^# .*\n", "", intro))
cards = "".join(f'<li><a href="/guide/{c["slug"]}.html"><b>{c["n"]}</b><span>{html.escape(c["title"])}</span></a></li>' for c in chs)
body = f'<div class="wrap"><main class="prose wide"><p class="kicker">Study guide</p><h1>The Ultimate Post-Quantum Cryptography Study Guide</h1>{intro_html}<ol class="toc">{cards}</ol></main></div>'
(ROOT / "guide/index.html").write_text(page(f"Guide | {SITE}", body, "guide"))

# labs
labs = []
for f, blurb in [("tls13_hybrid_demo.py", "Hybrid X25519MLKEM768 exchange with the correct share and secret order, validation checks and two negative tests."),
("mlkem_sizes.py", "Real ML-KEM-512/768/1024 key, ciphertext and secret sizes with rough timings.")]:
code = html.escape((ROOT / "labs" / f).read_text())
labs.append(f'<section class="lab"><h2>{f}</h2><p>{blurb} <a href="{REPO}/blob/main/labs/{f}">View on GitHub</a></p><pre><code>{code}</code></pre></section>')
body = f'''<div class="wrap"><main class="prose wide"><p class="kicker">Hands-on</p><h1>Labs</h1>
<p>Pure-Python ML-KEM for teaching. Not production code, and timings are not representative.</p>
<pre><code>pip install kyber-py cryptography
python3 labs/mlkem_sizes.py
python3 labs/tls13_hybrid_demo.py</code></pre>{"".join(labs)}</main></div>'''
(ROOT / "labs/index.html").write_text(page(f"Labs | {SITE}", body, "labs"))

# home
body = f'''<div class="wrap"><section class="hero"><p class="kicker">For network engineers and architects</p>
<h1>Post-quantum cryptography, from the threat to the packet.</h1>
<p class="lede">An {len(chs)}-chapter guide, a 75-question quiz and runnable labs covering ML-KEM, ML-DSA, SLH-DSA, hybrid TLS 1.3, IPsec, SSH, PKI and migration planning.</p>
<div class="cta"><a class="btn" href="/guide/">Start the guide</a><a class="btn alt" href="/quiz/">Take the quiz</a></div></section>
<section class="grid3">
<a class="card" href="/guide/"><h2>Guide</h2><p>Quantum threat, KEMs vs signatures, lattices, ML-KEM, ML-DSA, hash-based signatures, hybrids, TLS, IPsec, PKI, policy deadlines and a migration playbook.</p></a>
<a class="card" href="/quiz/"><h2>Quiz</h2><p>75 questions across 12 chapters. Study mode with explanations, exam mode, score by chapter, retry what you missed.</p></a>
<a class="card" href="/labs/"><h2>Labs</h2><p>Run a hybrid X25519MLKEM768 handshake and measure real ML-KEM sizes. See the bytes that change your MTU math.</p></a>
</section>
<section class="facts"><h2>Numbers worth remembering</h2><dl>
<div><dt>1,216 B</dt><dd>X25519MLKEM768 client key share</dd></div>
<div><dt>1,120 B</dt><dd>server key share</dd></div>
<div><dt>0x11EC</dt><dd>TLS named group code point</dd></div>
<div><dt>2030 / 2035</dt><dd>NIST deprecate / disallow classical public-key</dd></div></dl></section></div>'''
(ROOT / "index.html").write_text(page(f"{SITE} | Post-quantum cryptography for network engineers", body, "home"))
(ROOT / ".nojekyll").write_text("")
print("built", len(chs), "chapters")
105 changes: 105 additions & 0 deletions guide/01-read-this-first-scope-and-status-december-2026.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
<!doctype html>
<html lang="en"><head><meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>1. Read this first: scope and status (December 2026) | PQC Study</title>
<meta name="description" content="Post-quantum cryptography study guide, quiz and labs for network engineers.">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500;600&display=swap">
<link rel="stylesheet" href="/assets/site.css">
</head><body>
<header class="top"><div class="wrap bar"><a class="brand" href="/">PQC Study</a><nav><a href="/">Home</a><a href="/guide/" aria-current=page>Guide</a><a href="/quiz/">Quiz</a><a href="/labs/">Labs</a></nav></div></header>
<div class="wrap layout"><aside class="side"><a class="side-h" href="/guide/">All chapters</a><ol><li><a href="/guide/01-read-this-first-scope-and-status-december-2026.html" aria-current=page><span>1</span>Read this first: scope and status (December 2026)</a></li><li><a href="/guide/02-the-quantum-threat.html"><span>2</span>The quantum threat</a></li><li><a href="/guide/03-foundations-kems-signatures-and-security-categor.html"><span>3</span>Foundations: KEMs, signatures and security categories</a></li><li><a href="/guide/04-lattices-without-the-phd.html"><span>4</span>Lattices without the PhD</a></li><li><a href="/guide/05-ml-kem-fips-203-in-depth.html"><span>5</span>ML-KEM (FIPS 203) in depth</a></li><li><a href="/guide/06-ml-dsa-fips-204-in-depth.html"><span>6</span>ML-DSA (FIPS 204) in depth</a></li><li><a href="/guide/07-hash-based-signatures-slh-dsa-lms-and-xmss.html"><span>7</span>Hash-based signatures: SLH-DSA, LMS and XMSS</a></li><li><a href="/guide/08-pending-and-backup-algorithms-fn-dsa-and-hqc.html"><span>8</span>Pending and backup algorithms: FN-DSA and HQC</a></li><li><a href="/guide/09-hybrid-and-composite-designs.html"><span>9</span>Hybrid and composite designs</a></li><li><a href="/guide/10-tls-1-3-with-pqc.html"><span>10</span>TLS 1.3 with PQC</a></li><li><a href="/guide/11-ipsec-ssh-and-other-protocols.html"><span>11</span>IPsec, SSH and other protocols</a></li><li><a href="/guide/12-pki-and-certificates.html"><span>12</span>PKI and certificates</a></li><li><a href="/guide/13-network-engineering-impact.html"><span>13</span>Network engineering impact</a></li><li><a href="/guide/14-policy-and-timelines.html"><span>14</span>Policy and timelines</a></li><li><a href="/guide/15-migration-playbook.html"><span>15</span>Migration playbook</a></li><li><a href="/guide/16-implementation-pitfalls-and-attacks.html"><span>16</span>Implementation pitfalls and attacks</a></li><li><a href="/guide/17-hands-on-labs.html"><span>17</span>Hands-on labs</a></li><li><a href="/guide/18-cheat-sheets-glossary-and-sources.html"><span>18</span>Cheat sheets, glossary and sources</a></li></ol></aside><main class="prose"><p class="kicker">Chapter 1 of 18</p><h1>Read this first: scope and status (December 2026)</h1><p>Post-quantum cryptography (PQC) is now a deployment problem, not a research problem: three NIST standards are final, major stacks ship hybrid key exchange by default, and US federal deadlines begin in 2030.</p>
<p>This guide is written for a network engineer or architect. It explains what each algorithm does, how it lands in TLS, IPsec, SSH and PKI, what it costs on the wire, and how to plan a migration. The math is covered only to the depth needed to reason about security properties and sizes, not to implement the algorithms.</p>
<p><strong>Reading paths</strong></p>
<ul>
<li>Sections 2 to 4: why PQC exists and the math in plain language.</li>
<li>Sections 5 to 8: the algorithms (ML-KEM, ML-DSA, SLH-DSA, FN-DSA, HQC).</li>
<li>Sections 9 to 13: hybrids, protocols, PKI and the network impact.</li>
<li>Sections 14 to 16: policy, migration planning and implementation pitfalls.</li>
<li>Sections 17 and 18: labs, cheat sheets, glossary and sources. The companion quiz follows the same section order.</li>
</ul>
<p><strong>Status snapshot, 3 December 2026</strong></p>
<p>Standards status moves quickly. Treat this table as a dated snapshot and re-check the primary source before you rely on a row.</p>
<table>
<thead>
<tr>
<th>Item</th>
<th>Status</th>
<th>What to know</th>
</tr>
</thead>
<tbody>
<tr>
<td>FIPS 203 (ML-KEM)</td>
<td>Final, August 2024</td>
<td>The primary NIST key encapsulation standard.</td>
</tr>
<tr>
<td>FIPS 204 (ML-DSA)</td>
<td>Final, August 2024</td>
<td>The primary general-purpose signature standard.</td>
</tr>
<tr>
<td>FIPS 205 (SLH-DSA)</td>
<td>Final, August 2024</td>
<td>Hash-based backup signature.</td>
</tr>
<tr>
<td>FIPS 206 (FN-DSA)</td>
<td>Still draft in the sources checked</td>
<td>Falcon-based, compact signatures. Final was expected late 2026 or early 2027.</td>
</tr>
<tr>
<td>FIPS 207 (HQC-KEM)</td>
<td>Not yet published as a draft, per an October 2026 IETF draft</td>
<td>Code-based backup KEM. Final targeted for 2027.</td>
</tr>
<tr>
<td>NIST IR 8547</td>
<td>Final, 27 October 2026</td>
<td>Quantum-vulnerable public-key crypto deprecated after 2030, disallowed after 2035.</td>
</tr>
<tr>
<td>Hybrid TLS 1.3 groups</td>
<td>Deployed</td>
<td>X25519MLKEM768 (0x11EC) is the common default.</td>
</tr>
<tr>
<td>ML-DSA in X.509</td>
<td>RFC 9881, October 2025</td>
<td>Certificate and CRL algorithm identifiers.</td>
</tr>
<tr>
<td>ML-DSA in TLS 1.3</td>
<td>IETF draft (-05, July 2026)</td>
<td>SignatureScheme values 0x0904 to 0x0906.</td>
</tr>
<tr>
<td>ML-KEM in IKEv2</td>
<td>IETF draft (-09, July 2026)</td>
<td>Builds on RFC 9370 multiple key exchanges.</td>
</tr>
<tr>
<td>OpenSSH</td>
<td>Hybrid default since 10.0 (April 2025)</td>
<td>mlkem768x25519-sha256.</td>
</tr>
<tr>
<td>OpenSSL</td>
<td>3.5 added ML-KEM, ML-DSA, SLH-DSA</td>
<td>Hybrid groups preferred by default.</td>
</tr>
<tr>
<td>Web traffic</td>
<td>About 52% of human traffic on Cloudflare used PQ key exchange in 2025</td>
<td>Mostly browser-driven.</td>
</tr>
</tbody>
</table>
<p><strong>Three labels used throughout</strong></p>
<ul>
<li><strong>Final</strong>: a published standard you can cite in a requirement.</li>
<li><strong>Draft</strong>: a working document that can still change code points or details.</li>
<li><strong>Deployed</strong>: shipping in products, which is not the same as standardized.</li>
</ul><div class="pnrow"><span></span><a class="pn r" href="/guide/02-the-quantum-threat.html"><small>Next</small>2. The quantum threat</a></div></main></div>
<footer><div class="wrap">Facts current to 3 December 2026. Confirm standards status against primary sources. <a href="https://github.com/bbartik/pqc-study">Source on GitHub</a></div></footer>
</body></html>
Loading