pk.org: Computer Security/Lecture Notes

Hiding Information

Study Guide

Paul Krzyzanowski – 2026-11-28

Encryption hides what a message says, but an observer still sees that a message was sent and who sent it. Steganography hides the existence of a message, watermarking embeds a mark that identifies content, covert channels move data through mechanisms never meant for communication, and anonymous communication hides who is talking to whom.

Steganography and Watermarking

Steganography embeds a secret message in ordinary content so that an observer cannot tell a message exists. The cover object must appear untouched, the hidden data is an arbitrary payload, and the adversary wins by detection: showing that a message is present defeats the scheme, even if the message is never read.

Watermarking embeds information that identifies the content’s origin, its owner, or the fact that it was machine-generated. The mark does not need to be secret, and it is tied to the object rather than being a message. The adversary depends on the purpose: an ownership mark must survive removal attempts, and a tamper-detection mark must break on modification. A fingerprint is a watermark that differs per copy, so a leaked copy identifies its recipient.

A concealment cipher (or null cipher) hides a message in ordinary text through a prearranged rule, such as reading the third letter after each comma, period, colon, or semicolon.

Hiding Data in Media

An image offers three hiding places: metadata fields, pixel values, and frequency coefficients. Metadata such as EXIF is not really hidden, but it moves data past filters that treat images as harmless. LSB embedding replaces the least significant bits of pixel values with message bits, changing a selected color value by at most one level, which is usually imperceptible. JPEG steganography modifies the quantized DCT coefficients that the file stores, and recompressing or resizing the image can destroy the hidden data. Raw capacity is large, but heavy embedding disturbs the image’s statistics, so usable capacity is far smaller.

Audio steganography places data where perceptual coding says listeners cannot hear it, using low-bit coding, faint echoes, or spread spectrum signals. Video adds frames, motion vectors, and subtitle tracks as hiding places.

Text steganography falls into four styles:

  1. Layout-based: spacing, fonts, and line positions encode bits, but reformatting destroys them.

  2. Syntactic: optional punctuation and alternate spellings encode bits.

  3. Semantic: choices among synonyms encode bits.

  4. Markup-based: zero-width characters, background-colored text, and hidden elements conceal content that renders invisibly.

Hidden text now also targets AI software that reads documents, since invisible text reaches the software even though a person never sees it.

Steganalysis

Steganalysis is the detection of hidden content. Detection alone defeats steganography; the message does not need to be recovered. Statistical analysis detects LSB embedding because random message bits push the counts of values that differ only in their low bit, such as 100 and 101, toward equality. Machine learning classifiers are trained on clean images and flag images whose statistics differ. The more data embedded, the greater the statistical disturbance, and the easier the detection.

Steganography in Attacks

Attackers use steganography in two ways:

  1. Delivery: malicious payloads inside innocent-looking media pass firewalls and scanners that inspect content.

  2. Exfiltration: stolen data leaves an organization inside images or audio that monitoring treats as harmless.

Network variants hide command-and-control traffic inside protocols that security products expect to see, such as DNS.

Fragile and Robust Watermarks

Paper watermarks identified the maker and made counterfeits detectable, and the same two roles continue in digital content. A fragile watermark breaks when content is modified, which makes it useful for tamper detection, and the holder wants it intact. A robust watermark survives transformation, which makes it useful for proving ownership and tracing copies, and the holder may want it gone, so it must survive cropping, compression, and re-recording. Robustness is always defined against a stated list of transformations. Color laser printers add a machine identification code: a grid of faint yellow dots encoding the printer’s serial number and the print time.

Marking AI-Generated Content

Provenance for AI-generated content uses three approaches that fail differently:

  1. Content Credentials (the C2PA standard) attach signed metadata recording the device, time, and edit history, bound to the content by hashes. Screenshots and re-encoding strip them, participation is voluntary, and a signed photo of a staged scene is still staged: credentials verify origin and integrity, not truth.

  2. Generation watermarks are embedded by the model in pixels, audio, or words as the content is created. A robust image watermark can survive a screenshot, but heavy editing weakens the mark, and only cooperating models embed them.

  3. Post-hoc detectors are software trained to tell generated content from real. They do not need anyone’s cooperation, but their judgments are unreliable.

Content Credentials follow the fragile model: the holder wants the credential to remain intact and verifiable. Genuine content can also be marked at capture. Several jurisdictions now require machine-readable labels on AI-generated content, so major providers mark their output by default.

Watermarking AI Text

Text is the hardest medium to mark. Every word is visible to the reader, so the only available freedom is the choice among words. A statistical text watermark uses a secret key and the preceding words to split the vocabulary into a green list and a red list at each step, then biases sampling toward green words. A detector that knows the key counts green words: human text contains them at the chance rate, while watermarked text skews high. Detection is a statistical test with a false-positive rate.

The weaknesses are structural:

Post-hoc text detectors are unreliable and flag non-native English writers at high rates. A detector score alone is not evidence that a person used AI.

Covert Channels

A covert channel is a path that transfers information in violation of a security policy, using a mechanism never designed for communication. The confinement problem is running an untrusted program so that it cannot leak the data it processes, and blocking the program’s explicit outputs is not enough. A storage channel signals through a shared attribute, such as creating files or filling disk space. A timing channel signals through observable timing, such as varying CPU load. A side channel is an unintentional leak that an attacker observes, while a covert channel has a cooperating sender. Covert channel bandwidth is low, but a cryptographic key is only a few hundred bits.

Hiding Communication

Communication itself can be the secret: that it is happening, who receives it, or who is talking to whom. Unobservability means using a resource or service without others being able to observe that it is being used. Unlinkability means multiple uses of a service cannot be linked to each other. The generic attack on both is the correlation attack: matching events on the two sides of a system by timing and volume.

A numbers station broadcasts encrypted messages by shortwave, so anyone can receive them anywhere, and listening does not leave a trace. A dead drop removes the link between the parties: material waits in an agreed place, physical or online, so the two never meet.

Private browsing limits what the browser retains. Websites and network observers still see connection metadata. A VPN is a single relay: sites see the provider’s address instead of the user’s, but the provider sees both who the user is and every destination. TLS still protects the contents.

The surface web is what search engines index, the deep web is what their crawlers cannot reach, and the dark web is intentionally hidden and requires special software to reach. A version 3 .onion name encodes the service’s public key, so the name is self-certifying.

Tor

Tor reaches a public website through a circuit of three volunteer relays chosen by the client. Each relay removes one layer of encryption. Mix networks batch and reorder messages for stronger anonymity at high latency, while onion routing drops batching to stay fast enough for browsing.

Each observer sees a different fragment of the connection:

Circuit setup is one authenticated key exchange per relay, using relay public keys from descriptors referenced by the consensus, the signed hourly directory of the network, so the client ends with one shared key per relay. Tor relays data streams rather than IP packets, and the exit relay makes the TCP connection to the destination.

An onion service is reachable only inside Tor: the protocol hides each endpoint’s IP address from the other and encrypts traffic end to end. The service publishes a signed descriptor listing its introduction points, the client picks a rendezvous point and names it to the service through an introduction point, and both sides build circuits to the rendezvous. Traffic never leaves Tor, so an exit relay is not involved.

An attacker does not need to break Tor’s cryptography:

What You Don’t Need to Study


Terms we covered