Hidden in Plain Sight
~/cit2640/module-02/hidden-in-plain-sight

CIT 2640 · Network Security · Module 2 reference

Hidden in Plain Sight

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.

Cryptography

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.

Steganography

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.

01

The Vigenère Cipher

Polyalphabetic substitution

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.

—
Show the tabula recta (Vigenère square)

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.

How the cipher was eventually broken

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.

02

Image Steganography

Least-significant-bit encoding

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.

Cover image — a generated network-traffic waterfall, 240×150px
Why a fingerprint instead of just trusting the image?

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.

03

Quick Check

Four questions, instant feedback, nothing recorded — just a gut check before the graded lab.