MODULE 01
What is Encryption? ★ Beginner

What you'll understand after this module

  • What encryption is and why we need it
  • The difference between plaintext, ciphertext, and keys
  • How computers see text as numbers
  • The four security properties encryption can provide
🔒

Real-World Analogy

Imagine you want to pass a secret note in class. You and your friend agree on a code: replace every letter with the one 3 positions later in the alphabet. The original note is the plaintext. The coded note is the ciphertext. The rule "shift by 3" is the key. Without knowing the key, someone who intercepts the note just sees gibberish.

Encryption does exactly this — but with mathematics powerful enough that even supercomputers can't crack it in millions of years. Every time you visit a website with "https://", your browser and the server are encrypting everything sent between them.

TRY IT — SEE HOW COMPUTERS SEE YOUR TEXT
Type anything below. Computers don't see letters — they see numbers (and then bits). Encryption scrambles those numbers.
💡

Key Insight

Everything your computer stores — text, photos, music, video calls — is ultimately just a long string of 0s and 1s. Encryption scrambles those 0s and 1s using a mathematical recipe (the algorithm) and a secret number (the key). Without the right key, the scrambled data is meaningless noise.

The four things encryption can protect:

PROPERTYPLAIN ENGLISHWITHOUT ITEXAMPLE
Confidentiality Only the intended person can read the message Anyone who intercepts it can read it Your WhatsApp messages
Integrity The message wasn't changed in transit An attacker could secretly alter the data Verifying a downloaded file
Authentication Proof that the message came from who it claims Anyone could impersonate the sender Logging in to your bank
Non-repudiation The sender can't later deny sending it Contracts could be disputed Digital signatures on legal documents
MODULE 02
Caesar Cipher ★ Beginner

What you'll understand after this module

  • How the simplest cipher works (and how to break it)
  • What "key space" means and why it matters
  • Why letter frequency is a devastating weakness
🔄

Real-World Analogy

Imagine a combination lock where the only options are 1 through 25. Even without knowing the combination, you could try all 25 in under a minute. The Caesar Cipher has the same problem — there are only 25 possible "keys". Any attacker can try them all instantly.

The Caesar Cipher shifts every letter in your message by a fixed number. Julius Caesar himself reportedly used a shift of 3 — so A becomes D, B becomes E, and so on. It was secure in 44 BC when most people couldn't read. Today, a computer can crack it in microseconds.

TRY IT — CAESAR CIPHER LIVE
Type a message, drag the shift slider, and watch it encrypt. Then click "Brute Force" to see how trivially an attacker breaks it.
⚠️

Fatal Weakness — Frequency Analysis

In English, the letter E appears about 12.7% of the time. Since Caesar Cipher preserves letter frequency, an attacker just finds the most common letter in the ciphertext — that's the encrypted E — and instantly knows the shift. Even without trying all 25 keys, the cipher falls in seconds. This teaches us: a small key space is never enough.

MODULE 03
Vigenère Cipher ★ Beginner

What you'll understand after this module

  • How using a keyword instead of a single shift defeats frequency analysis
  • What a "polyalphabetic" cipher is
  • Why even this clever improvement was eventually broken
🎹

Real-World Analogy

Instead of one combination lock, imagine a safe that cycles through a sequence of combination locks. The first letter uses lock #1, the second uses lock #2, etc. When you've used all the locks, you cycle back to lock #1. Now "E" doesn't always encrypt to the same letter — it encrypts differently each time depending on which lock in the cycle you're on. Much harder to attack!

The Vigenère Cipher was considered unbreakable for 300 years. Instead of shifting every letter by the same amount, it uses a keyword. Each letter of the keyword tells you how much to shift the corresponding letter of your message. When the keyword runs out, it repeats.

TRY IT — VIGENÈRE CIPHER
Try changing the keyword. Notice how the same letter in your message encrypts to different letters each time it appears.

Letter-by-letter shifts applied:

🔍

How It Was Broken — The Kasiski Test (1863)

If the keyword is "LEMON" (5 letters), then every 5th letter gets the same shift. An analyst looks for repeated sequences in the ciphertext — they appear at distances that are multiples of the keyword length. Find the keyword length, and you reduce the problem to 5 separate Caesar Ciphers. The lesson: any cipher where the key repeats will eventually leak its pattern.

MODULE 04
XOR & Binary — The Building Block of Modern Crypto ●● Intermediate

What you'll understand after this module

  • What XOR is and why it's the heart of modern encryption
  • How XOR encrypts and decrypts with the same operation
  • What a One-Time Pad is and why it's theoretically perfect
💡

Real-World Analogy

XOR is like a light switch toggle. If you flip a switch ON, then flip it again, it goes OFF — back to the start. XOR works the same way with bits: apply the key once to encrypt, apply the exact same key again to decrypt. It's the only operation where encryption and decryption are identical — which makes it incredibly efficient and central to almost every cipher.

XOR (eXclusive OR) compares two bits: if they're the same, output is 0. If they're different, output is 1. The magic property: (A XOR B) XOR B = A. XOR your message with a key to encrypt; XOR the result with the same key to get your message back. AES, stream ciphers, and virtually every modern cipher use XOR internally.

TRY IT — XOR ENCRYPTION
Watch how XOR-ing with the key encrypts, and XOR-ing again with the same key perfectly decrypts — like flipping the same light switch twice.
🏆

The One-Time Pad — Theoretically Unbreakable

If the key is truly random, as long as the message, and never reused, this becomes the One-Time Pad — the only cipher proven mathematically unbreakable (Claude Shannon, 1949). The problem? Distributing a key as long as every message you'll ever send is impractical. Solving this key distribution problem is what motivated the invention of public-key cryptography (Modules 08–10).

MODULE 05
DES & Triple DES — The First Standard ●● Intermediate

What you'll understand after this module

  • How block ciphers work — processing data in chunks
  • What a Feistel network is and why it's clever
  • Why DES was broken and what replaced it
🏭

Real-World Analogy

A Feistel network is like a factory assembly line where each station transforms your message a little. The clever part: the line is designed so you can run it backwards to undo every transformation — even though each individual station's transformation is one-way. This gives you encryption and decryption from the same design.

DES (1977) was the world's first standardized encryption algorithm. It takes 64 bits (8 characters) of data at a time and scrambles them through 16 rounds of mixing. The key was only 56 bits long — which seemed enormous in 1977 but, by 1998, computers were fast enough to try all 72 quadrillion possible keys in just 22 hours.

DES FEISTEL NETWORK — 16 ROUNDS ANIMATED
Click "Animate Rounds" to watch DES process data step by step. Each row represents one of the 16 mixing rounds.
💀

Why DES Is Dead

In 1998, the Electronic Frontier Foundation built a machine called "Deep Crack" for $250,000 that broke DES in 22 hours by trying every possible key. Today, the same attack would take seconds on consumer hardware. Triple DES applied DES three times with different keys, extending its life — but it's now also deprecated. The lesson: key length is not the only factor, but it absolutely must be large enough that brute force is impossible.

MODULE 06
AES-256 — The Gold Standard ●● Intermediate

What you'll understand after this module

  • Why AES replaced DES and became the global standard
  • The four operations AES performs every round
  • Why AES-256 is approved for the most classified military data
🧩

Real-World Analogy

AES treats your data as a 4×4 grid of bytes — like a small chessboard. Each round, it: substitutes every piece using a secret lookup table, shifts the rows, mixes the columns, and XORs with a round key. After 14 rounds (for AES-256), the board looks nothing like the original. The operations are carefully designed so that changing even one bit of the input changes roughly half of the output bits.

AES (Advanced Encryption Standard) was selected by NIST in 2001 after a worldwide competition. Unlike DES's 56-bit key, AES-256 uses a 256-bit key — that's 2²⁵⁶ possible keys. Even if every atom in the universe were a computer running since the Big Bang, they couldn't try them all. No one has ever broken AES-256.

LIVE — REAL AES-256 ENCRYPTION (requires HTTPS or localhost)
This uses your browser's built-in cryptography chip — real AES-256-GCM, the same algorithm protecting classified military communications. Type a message and encrypt it.
AES INTERNALS — THE FOUR OPERATIONS (click each tab)
1. SubBytes
2. ShiftRows
3. MixColumns
4. AddRoundKey

SubBytes replaces every byte in the 4×4 grid using a fixed lookup table called the S-Box. The table was carefully designed so the output has no mathematical relationship to the input that an attacker could exploit. This is what makes AES "non-linear" — the property that defeats mathematical attacks.

🌌

How Secure Is AES-256?

The universe contains roughly 10⁸⁰ atoms. A computer checking one key per nanosecond, running since the Big Bang, would have checked roughly 2¹²⁰ keys. AES-256 has 2²⁵⁶ possible keys — about 2¹³⁶ times more than that. No cryptanalytic attack better than brute force is known for AES-256. It is approved for Top Secret information by the NSA.

MODULE 07
Block Ciphers, Stream Ciphers & Modes ●● Intermediate

What you'll understand after this module

  • The difference between encrypting blocks vs. a continuous stream
  • Why the same algorithm (AES) can be used in many different "modes"
  • Which mode to use — and why GCM is the modern answer

AES by itself only encrypts exactly 16 bytes at a time. For real messages (which can be any length), you need a mode of operation — a method for applying AES repeatedly. The choice of mode has enormous security consequences.

📦

Real-World Analogy

ECB (the bad one): Like photocopying identical items — two identical blocks of data encrypt to the same ciphertext, revealing patterns. CBC: Each block is XORed with the previous ciphertext before encryption, so identical blocks produce different output. GCM: Turns AES into a stream, adds a tamper-detection tag, and allows random access — the best of all worlds.

❌ ECB Mode
Electronic Codebook. Each block encrypted independently. Never use this — it reveals patterns in the data (the famous "ECB penguin" image attack).
AuthenticationNone
SecurityBroken for most uses
⚠ CBC Mode
Cipher Block Chaining. Each block is XORed with the previous before encryption. Widely used but vulnerable to padding oracle attacks.
AuthenticationNone
RequiresRandom IV
CTR Mode
Counter Mode. Turns AES into a stream cipher — fast and parallelizable. No authentication on its own.
AuthenticationNone
SpeedVery fast
✅ GCM Mode — Recommended
Galois/Counter Mode. CTR + a cryptographic authentication tag. Encrypts AND verifies the data wasn't tampered with. The modern standard.
Authentication128-bit tag ✓
PerformanceFast & parallel
✅ ChaCha20-Poly1305
Not based on AES — uses a different stream cipher. Preferred on mobile devices without hardware AES acceleration. Used in TLS 1.3.
AuthenticationPoly1305 MAC ✓
Best forMobile / IoT
AES-SIV
Deterministic AEAD — safe even if nonces are accidentally reused. Used for key wrapping in high-security hardware.
Nonce reuseResistant
StandardRFC 5297

The Rule of Thumb

Unless you have a specific reason otherwise, always use AES-256-GCM. It provides confidentiality (encryption) and integrity (tamper detection) in one operation. It's what modern TLS, Signal, WhatsApp, and military data links use.

MODULE 08
RSA — Public Key Cryptography ●● Intermediate

What you'll understand after this module

  • The "key distribution problem" — and how public key crypto solves it
  • How RSA works using two mathematically linked keys
  • Why factoring large numbers is hard — and why that protects you
📬

Real-World Analogy

Imagine you put an open padlock (no key) in a public place. Anyone can put a message in a box and snap the padlock shut. But only you — with the only key — can open it. That's public key cryptography. The open padlock is your public key (share it with everyone). The key to open it is your private key (never share it). Anyone can encrypt for you; only you can decrypt.

Before public key cryptography (1976), two people who'd never met couldn't exchange encrypted messages — they had no way to share a secret key without an attacker intercepting it. RSA solved this using a one-way mathematical trap door: multiplying two large prime numbers is easy, but factoring the result back into those primes is computationally infeasible.

TRY IT — RSA PRINCIPLES (SMALL NUMBERS FOR CLARITY)
Real RSA uses 2048-bit numbers. Here we use small primes so you can see every step. The mathematics is identical.
⚠️

RSA's Achilles' Heel — Quantum Computers

RSA's security relies on the difficulty of factoring large numbers — a problem that classical computers find essentially impossible for large enough numbers. However, Shor's algorithm (1994) allows a sufficiently powerful quantum computer to factor these numbers efficiently, breaking RSA entirely. This is why governments are urgently migrating to post-quantum algorithms (see Module 15).

MODULE 09
Diffie-Hellman Key Exchange ●● Intermediate

What you'll understand after this module

  • How two strangers can agree on a shared secret over an open channel
  • The colour-mixing analogy — and the actual maths behind it
  • Why this is fundamental to every HTTPS connection you make
🎨

Real-World Analogy — Mixing Paint

Alice and Bob both start with the same public yellow paint. Alice mixes in her secret red → gets orange. Bob mixes in his secret blue → gets green. They swap their orange and green. Alice mixes her secret red into Bob's green → gets brown. Bob mixes his secret blue into Alice's orange → gets the same brown! They both have the same colour (shared secret) but an eavesdropper only saw yellow, orange, and green — not enough to figure out brown.

Diffie-Hellman (1976) was revolutionary: it lets two parties who've never met compute the same secret number while only exchanging public information. An eavesdropper who sees all the exchanges still can't compute the secret. Every HTTPS website, every SSH session, every Signal message uses this idea.

TRY IT — DH KEY EXCHANGE ANIMATED
Click "Animate Exchange" to watch Alice and Bob derive the same shared secret without ever sending it.
MODULE 10
Elliptic Curve Cryptography (ECC) ●●● Advanced

What you'll understand after this module

  • Why ECC gives the same security as RSA with much smaller keys
  • What "point addition" on a curve means visually
  • Which curves are used in NATO military systems
🎯

Why ECC?

A 256-bit ECC key provides the same security as a 3072-bit RSA key. Smaller keys mean faster operations, less bandwidth, and less power — critical for resource-constrained military terminals, satellites, and smart cards. The NSA mandated ECC (P-384) as the minimum for Top Secret systems.

ELLIPTIC CURVE — y² = x³ − 3x + 3
The "private key" is just a number k. The "public key" is the point k·G on the curve — computed by doing point addition k times. Given the curve and k·G, finding k is the Elliptic Curve Discrete Logarithm Problem — computationally infeasible.
CURVEKEY SIZEEQUIVALENT RSAUSED FOR
P-256 (secp256r1)256-bit3072-bit RSATLS, ECDSA signatures
P-384 (secp384r1)384-bit7680-bit RSANSA Suite B Top Secret
P-521 (secp521r1)521-bit15360-bit RSAHighest assurance level
Curve25519255-bit3072-bit RSAECDH in Signal, TLS 1.3
MODULE 11
Hash Functions — Digital Fingerprints ●● Intermediate

What you'll understand after this module

  • What a hash function is — and why it's not "encryption"
  • The "avalanche effect" — how one bit changes everything
  • How hashes protect file integrity and passwords
🫆

Real-World Analogy — A Unique Fingerprint

A hash function is like a fingerprint machine. Feed in any document — 1 page or 1,000 pages — and it always outputs the same size fingerprint (e.g., 256 bits). Change even one comma in the document, and the fingerprint looks completely different. You can verify the fingerprint matches the document, but you cannot reconstruct the document from the fingerprint alone. This is what makes it "one-way".

Hash functions are not encryption — there is no key, and there is no decryption. They're used to verify that data hasn't been tampered with. When you download software, the website publishes its SHA-256 hash. After downloading, you compute the hash yourself. If they match, the file is intact. If they differ, someone tampered with it.

LIVE — SHA-256 & SHA-512 HASHING
Change even one letter in your message and watch how completely the hash output changes. This is called the "Avalanche Effect" — a key security property.
🌊

The Avalanche Effect

A good hash function changes approximately 50% of the output bits when you change even one input bit. This means an attacker can't gradually "nudge" the hash towards a target — every small change produces a completely unpredictable new output. SHA-256 and SHA-384 achieve this reliably.

MODULE 12
HMAC — Authenticating Messages ●● Intermediate

What you'll understand after this module

  • The difference between a hash and a MAC (Message Authentication Code)
  • How HMAC proves both integrity and identity of the sender
  • Why this is used in every secure military data link
🖊️

Real-World Analogy — A Wax Seal

A plain hash is like a fingerprint — anyone can compute it. An HMAC is like a wax seal stamped with a unique ring only you possess. Anyone can see the seal. Anyone can check it matches. But only someone with your ring (the secret key) could have created it. If the seal is intact, you know both that the message wasn't changed AND that it came from someone with the key.

LIVE — HMAC-SHA256
Change the message or the key — both produce a completely different authentication tag. An attacker without the key cannot forge a valid tag.
MODULE 13
Link 16 — How Military Tactical Data Links Are Secured ⬡ Military

What you'll understand after this module

  • How everything from Modules 01–12 is applied in a real military system
  • What TRANSEC and COMSEC mean — the two layers of protection
  • How frequency hopping makes jamming practically impossible
📋

Classification Note

This module covers unclassified/open-source technical aspects from published STANAG 5516, NATO documents, and declassified NSA specifications. Actual keying material, TSEC variables, and operational COMSEC parameters are classified.

📻

How Link 16 Defeats Jamming

Imagine you and a friend agree to switch radio stations 76,923 times per second in a pattern only the two of you know. An enemy trying to jam you would have to jam the entire frequency band simultaneously — and if they do that, they reveal their location and drain their power. They can't follow your hops without knowing the cryptographic seed that generates the pattern.

Link 16 (STANAG 5516) connects NATO aircraft, ships, and ground units in real time — sharing positions, tracks, and orders in a secure, jam-resistant network. Everything you've learned in Modules 01–12 is deployed here in a layered architecture called Defence in Depth.

LINK 16 — CRYPTOGRAPHIC LAYERS (click Animate)
A plaintext J-series message (e.g. a position report) travels through multiple protection layers before transmission. Click Animate to see each layer applied.
PARAMETERVALUEWHY IT MATTERS
Frequency Band960–1215 MHz (L-band)Shared with TACAN — covert in background noise
Hopping Rate76,923 hops/secondJammer has only 13 microseconds per frequency
Frequency Channels51 channelsPseudo-random selection from TSEC crypto seed
COMSEC AlgorithmAES-256 (modern) / 3DES (legacy)NSA Type 1 certified — protects message content
Key ManagementEKMS / KYK-13 fill devicePhysical keying — keys never transmitted wirelessly
Error CorrectionReed-Solomon FECMessages survive partial jamming or poor signal
🛡️

TRANSEC vs COMSEC — Two Independent Shields

TRANSEC (Transmission Security) protects the radio link itself — frequency hopping means an attacker can't even intercept the signal reliably. COMSEC (Communications Security) encrypts the message content — even if an attacker somehow captures the signal, AES-256 makes the content unreadable. Both are required independently. Losing one doesn't mean losing both.

MODULE 14
Link 22 — Over-the-Horizon Secure Comms ⬡ Military

What you'll understand after this module

  • Why Link 16 is limited to line-of-sight — and how Link 22 goes further
  • How HF radio waves "bounce" off the ionosphere to reach over the horizon
  • How Link 22 layers TRANSEC, COMSEC, and authentication together
🌐

Why Over-the-Horizon Matters

Link 16 is like a very secure walkie-talkie — it works great but only if you can "see" each other (typically under 500 km). Link 22 uses HF radio waves that bounce off the ionosphere like a ball off a curved wall, allowing communication with ships and submarines thousands of kilometres away — critical for maritime operations in contested environments.

LINK 22 vs LINK 16 — ARCHITECTURE COMPARISON
FEATURELINK 11 (Old)LINK 16 (Current)LINK 22 (Current)
RangeLOS + OTH (HF)Line-of-sight (~500 km)LOS + over horizon (HF)
Data Rate2.25 kbps115.2 kbps~26.9 kbps HF
Anti-JamLimitedHigh (76k hops/s)Improved ECCM
EncryptionDES (legacy)AES-256 / 3DESAES-256 (KIV-7HS)
AuthenticationNoneTSECHMAC-SHA256 per message
ParticipantsUp to 62Up to 128Up to 125 per net
MODULE 15
NSA Type 1 & Post-Quantum Cryptography ⬡ Military

What you'll understand after this module

  • What NSA "Type 1" certification means and why it matters
  • The CNSA Suite — the algorithms cleared for Top Secret systems
  • Why quantum computers threaten RSA/ECC — and what replaces them
📋

Classification Note

NSA Type 1 algorithms and implementations are classified. This module covers publicly available information from NSA, NIST, and declassified CNSS policy documents only.

🔐

What "NSA Type 1" Means

Think of NSA certification tiers like car safety ratings — but for algorithms. "Type 1" is the highest tier: algorithms implemented in tamper-resistant hardware, validated for protecting the most sensitive national security information. You can't buy this off a shelf. The hardware is physically inspected and controlled. The key material is tracked from manufacturing to destruction.

🔒

Note on Interactivity

Type 1 cryptographic algorithms are implemented only in classified, tamper-resistant hardware. No interactive simulation is possible — or appropriate — for this tier. The cards below summarise what is publicly known from declassified NSA and NIST documents.

BATON (Type 1 — Classified)
128-bit block cipher with 320-bit key. Used in STU-III secure phones. NSA Suite A. Algorithm itself is classified — only approved hardware can implement it.
Key Length320-bit
Classification LevelSECRET+
ACCORDION (Type 1)
16-bit block cipher optimised for battlefield voice encryption. Used in VINSON family devices (KY-57, KY-58) — the iconic "green phones" of Cold War-era military comms.
TargetVoice encryption
DeviceVINSON KY-57/58
AES-256 (CNSA Suite)
NSA-approved for Top Secret. Runs in Type 1 encryptors (KIV-7HS, TACLANE). Survives both classical and quantum attacks. The only symmetric cipher in CNSA 2.0.
Key Length256-bit
Quantum SafeYes (128-bit effective)
ECDSA P-384 (CNSA)
Elliptic curve digital signature on NIST P-384. Currently required for Top Secret authentication. Will be replaced by ML-DSA-87 as quantum computers advance.
Security Level192-bit classical
Quantum SafeNo
ML-KEM-1024 (FIPS 203)
Post-quantum key encapsulation based on lattice mathematics. Replaces ECDH/RSA for key exchange in CNSA 2.0. Required for new systems by 2030.
Quantum SafeYes (~256-bit)
StatusFIPS 203 (2024)
ML-DSA-87 (FIPS 204)
Post-quantum digital signature based on lattices. Replaces ECDSA in CNSA 2.0. Larger signatures than ECDSA but provably quantum-resistant.
Quantum SafeYes (~256-bit)
StatusFIPS 204 (2024)

The Post-Quantum Migration Deadline

NSA's CNSA 2.0 mandate (2022) sets clear deadlines: post-quantum algorithms must be in all new national security systems by 2030, and all legacy systems must be migrated by 2035. AES-256 and SHA-384 do not need replacing — they survive quantum attacks. The urgent replacements are RSA and ECC, which Shor's algorithm will break on a sufficiently powerful quantum computer.

MODULE 16
Comparison — What Algorithm Should You Use? ●● Intermediate

What you'll understand after this module

  • How to compare all algorithms by security level and status at a glance
  • How quantum computers change the security picture — toggle to compare
  • The practical answer: what algorithm to use and when
SECURITY STRENGTH — CLASSICAL vs QUANTUM THREAT
Toggle between threats. Notice AES-256 and SHA-384 survive both. RSA and ECDSA collapse entirely under a quantum computer.
ALGORITHMTYPEKEY SIZE CLASSICAL SECURITYQUANTUM SECURITYSTATUS
Caesar CipherSymmetric5-bit Trivially broken N/A BROKEN
DESSymmetric56-bit Broken in hours (1998) Trivial RETIRED
AES-128Symmetric128-bit Secure (2¹²⁸) Weakened to 64-bit CURRENT
AES-256Symmetric256-bit Secure (2²⁵⁶) Secure (2¹²⁸) CNSA 2.0 ✓
RSA-2048Asymmetric2048-bit Secure today Broken by Shor's algorithm MIGRATE NOW
ECDSA P-384Asymmetric384-bit 192-bit security Broken by Shor variant MIGRATE NOW
SHA-256Hash256-bit output 128-bit collision security Reduced to 64-bit CURRENT
SHA-384Hash384-bit output 192-bit collision security 96-bit quantum security CNSA 2.0 ✓
ML-KEM-1024PQC Lattice ~256-bit ~256-bit FIPS 203 ✓
ML-DSA-87PQC Lattice ~256-bit ~256-bit FIPS 204 ✓
🏁

The Bottom Line

For military-grade systems: AES-256-GCM for encryption, SHA-384 for hashing, ECDSA P-384 (transitioning to ML-DSA-87) for signatures, running in NSA-certified Type 1 hardware. For modern software (HTTPS, messaging): AES-256-GCM + ChaCha20-Poly1305 + X25519 key exchange. The most important rule: never invent your own cryptography — always use established, peer-reviewed standards implemented by experts.