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.
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:
| PROPERTY | PLAIN ENGLISH | WITHOUT IT | EXAMPLE |
|---|---|---|---|
| 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 |
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.
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.
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.
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.
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.
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).
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.
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.
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.
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.
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.
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.
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.
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).
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.
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.
| CURVE | KEY SIZE | EQUIVALENT RSA | USED FOR |
|---|---|---|---|
| P-256 (secp256r1) | 256-bit | 3072-bit RSA | TLS, ECDSA signatures |
| P-384 (secp384r1) | 384-bit | 7680-bit RSA | NSA Suite B Top Secret |
| P-521 (secp521r1) | 521-bit | 15360-bit RSA | Highest assurance level |
| Curve25519 | 255-bit | 3072-bit RSA | ECDH in Signal, TLS 1.3 |
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.
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.
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.
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.
| PARAMETER | VALUE | WHY IT MATTERS |
|---|---|---|
| Frequency Band | 960–1215 MHz (L-band) | Shared with TACAN — covert in background noise |
| Hopping Rate | 76,923 hops/second | Jammer has only 13 microseconds per frequency |
| Frequency Channels | 51 channels | Pseudo-random selection from TSEC crypto seed |
| COMSEC Algorithm | AES-256 (modern) / 3DES (legacy) | NSA Type 1 certified — protects message content |
| Key Management | EKMS / KYK-13 fill device | Physical keying — keys never transmitted wirelessly |
| Error Correction | Reed-Solomon FEC | Messages 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.
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.
| FEATURE | LINK 11 (Old) | LINK 16 (Current) | LINK 22 (Current) |
|---|---|---|---|
| Range | LOS + OTH (HF) | Line-of-sight (~500 km) | LOS + over horizon (HF) |
| Data Rate | 2.25 kbps | 115.2 kbps | ~26.9 kbps HF |
| Anti-Jam | Limited | High (76k hops/s) | Improved ECCM |
| Encryption | DES (legacy) | AES-256 / 3DES | AES-256 (KIV-7HS) |
| Authentication | None | TSEC | HMAC-SHA256 per message |
| Participants | Up to 62 | Up to 128 | Up to 125 per net |
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.
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.
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
| ALGORITHM | TYPE | KEY SIZE | CLASSICAL SECURITY | QUANTUM SECURITY | STATUS |
|---|---|---|---|---|---|
| Caesar Cipher | Symmetric | 5-bit | Trivially broken | N/A | BROKEN |
| DES | Symmetric | 56-bit | Broken in hours (1998) | Trivial | RETIRED |
| AES-128 | Symmetric | 128-bit | Secure (2¹²⁸) | Weakened to 64-bit | CURRENT |
| AES-256 | Symmetric | 256-bit | Secure (2²⁵⁶) | Secure (2¹²⁸) | CNSA 2.0 ✓ |
| RSA-2048 | Asymmetric | 2048-bit | Secure today | Broken by Shor's algorithm | MIGRATE NOW |
| ECDSA P-384 | Asymmetric | 384-bit | 192-bit security | Broken by Shor variant | MIGRATE NOW |
| SHA-256 | Hash | 256-bit output | 128-bit collision security | Reduced to 64-bit | CURRENT |
| SHA-384 | Hash | 384-bit output | 192-bit collision security | 96-bit quantum security | CNSA 2.0 ✓ |
| ML-KEM-1024 | PQC Lattice | — | ~256-bit | ~256-bit | FIPS 203 ✓ |
| ML-DSA-87 | PQC 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.