CIT 2640 · Network Security · Module 2 reference
Two ways to keep a message safe from the wrong reader — and why they aren't the same tool. Work through both live below, then check your understanding at the bottom.
Hides what a message means. The message is visibly there — anyone can see the ciphertext — but without the key its meaning is scrambled. The Vigenère cipher below is a classic, breakable example.
Hides that a message exists at all. Nothing about the carrier — an image, a file, a sentence — looks unusual. The secret sits inside it, in plain sight.
Invented in the 16th century and unbroken in practice until the 1860s, the Vigenère cipher shifts each letter of the plaintext by an amount set by a repeating keyword — so the same plaintext letter can encrypt to a different ciphertext letter every time it appears. That defeats simple frequency analysis, which is why it was called le chiffre indéchiffrable — "the indecipherable cipher" — for nearly three centuries.
Each row of the square is the alphabet shifted by that row's letter — exactly a Caesar cipher. To encrypt a letter, find its column under the plaintext letter, follow it down to the row of the current key letter, and read off the cell where they meet. The highlight below tracks the last character you typed above.
The Kasiski examination (1863) looks for repeated sequences of three or more letters in the ciphertext. If the same short stretch of plaintext lines up with the same stretch of key twice, it produces identical ciphertext — and the distance between the repeats is a multiple of the key length. Enough repeats narrow the key length down to one likely value.
Once the key length n is known, the ciphertext splits into n interleaved streams,
each encrypted with a single, constant shift — a plain Caesar cipher. Frequency analysis (E, T, A are the
most common English letters) cracks each stream on its own, and the key falls out letter by letter.
Every pixel in an image is stored as color values, typically 0–255 per channel. Flipping a value's
least significant bit changes it by at most 1 out of 256 possible shades — a difference no
human eye can register. Spend one bit per color channel across enough pixels and you have a covert channel
hidden inside an ordinary-looking picture. Tools like steghide build on this idea (with real
encryption and randomized placement); the demo below uses the bare technique so the mechanism stays visible.
In the full lab, after extracting a hidden file you run md5sum against it and compare the
result to a known-good hash — that's how you confirm the extraction wasn't corrupted, not whether the
secret exists. Browsers don't expose MD5 directly, so this page computes a SHA-256
fingerprint of the extracted text instead: same purpose, a stronger algorithm.
Four questions, instant feedback, nothing recorded — just a gut check before the graded lab.