Definition
Confidentiality is the security property that information is disclosed only to parties authorized to learn it. It is always stated for a particular observer: what the observer can see, called its view, and which facts the observer is allowed to learn, such as the length of a message. Information stays confidential when the observer’s view reveals nothing about it beyond those allowed facts. The usual mechanisms are encryption, access control §1.7 and minimization, which means not collecting, storing or sending the information at all.
The idea
A clinic sends a test result to a patient’s phone, encrypted. An eavesdropper on the network cannot read the result, but still sees which clinic sent a message, to which phone, when, and how long the message is. If a positive result always comes with a two-page treatment plan and a negative result is one line, the length of the encrypted message tells the eavesdropper the diagnosis. Nothing was decrypted, yet the secret leaked.
Confidentiality is therefore about what an observer can infer, not about whether the bytes look scrambled. A sealed envelope is a fair picture: it hides the letter, but the outside shows the addresses, the postmark and how thick the letter is. The picture stops being accurate in two ways. A digital observer measures far more precisely, down to microseconds of timing or the electrical power a chip draws while it works on a secret. And a digital observer can collect thousands of messages and combine what each one reveals.
Confidentiality is one of three classic security goals. The other two are integrity §1.9, which means that data changes only in authorized ways, and availability §1.10, which means that authorized users get service when they need it. The three goals together, confidentiality, integrity and availability, are often called the CIA triad, after their initials. Each goal needs its own mechanisms.
How it works
A confidentiality analysis has four steps.
Name the secret. It may be the content of a message, a key, the identity of a sender, or the mere fact that a message was sent.
Name the observer and its view. A network eavesdropper sees packets: their lengths, their times, their source and destination addresses, and every header field that is not encrypted. A thief who takes a storage device sees every byte stored on it. Another program on the same processor may measure how long operations take. An attacker with a probe on the circuit board sees how much power the chip draws. Information that leaks through how a computation behaves, such as its timing or power use, rather than through its intended outputs, is called a side channel §1.29.
Name the allowed leakage. State which facts the observer may learn. Most encryption schemes reveal the length of the message, so length is on the allowed list unless the design hides it.
Hide everything else, and check. The check compares two possible values of the secret that share every allowed fact. If the observer can tell from its view which of the two was used, confidentiality fails.
The mechanisms differ in what they promise.
Encryption turns readable data, the plaintext, into unreadable data, the ciphertext, using a key. An observer without the key learns nothing from the ciphertext beyond the allowed facts, usually the length, even though the observer has the ciphertext in hand. Encryption therefore protects data on a network and on a stolen disk.
Access control relies on a trusted system to refuse to hand the data to unauthorized parties. It protects only while that system stands in the way: whoever reads the storage directly, around the system, sees everything.
Padding and shaping hide metadata, the facts about a message rather than its content. Padding makes every message the same length. Sending at fixed times, with dummy messages when there is nothing to send, hides timing and volume. Such measures are called traffic analysis defenses §5.47.
Threshold secret sharing §5.44 splits a secret into shares so that fewer than a chosen number of shares reveal nothing about it.
Worked example
The smallest encryption scheme that hides its message completely is the one-time pad on a single bit. The secret is a bit . The key is a bit chosen uniformly at random, meaning 0 and 1 each with probability 0.5, independently of , and used only once. The ciphertext is , where is exclusive or (XOR): the result is 0 when the two bits are equal and 1 when they differ.
The observer knows in advance that with probability 0.9 and with probability 0.1, and then sees . Two cases produce :
and , with probability ;
and , with probability .
So has probability , and the probability that given is . That is exactly the observer’s belief before seeing . Seeing gives the same result, , from the cases and . The ciphertext took away nothing the observer already knew and added nothing.
Using the key twice breaks the promise. Encrypt two bits and with the same key bit . Because , the observer computes without knowing . With , and , the ciphertexts are and , and tells the observer that the two secrets differ. The observer has learned a fact it was not allowed to learn, without recovering either secret.
Metadata leaks in the same way. A device answers a yes-or-no question with the text YES (3 bytes) or NO (2 bytes) and encrypts the answer with a scheme whose ciphertext is as long as the plaintext, plus a 16-byte authentication §1.6 tag, a check value that detects changes. The encrypted answers are and bytes long, so an eavesdropper who only counts bytes reads the answer. Padding both answers to 4 bytes before encryption makes both ciphertexts bytes long. The padding hides the length. It does not hide when the answer was sent or to whom.
Stated precisely
Claude Shannon defined perfect secrecy in 1949 [65]. Let be the secret message and the ciphertext, both random quantities, and let and be particular values of them. Write for the probability of an event , and for its probability given that the event happened. A scheme has perfect secrecy when for every and for every with : seeing the ciphertext never changes the probability of any message. Shannon also proved that perfect secrecy needs at least as many possible keys as possible messages. That is why the one-time pad needs a fresh key as long as the message, used once.
Modern definitions state confidentiality as a game between the system and an observer, called a distinguisher. Pick two values and of the secret that share every allowed fact, for example two messages of the same length. A fair coin chooses which one the system processes. The distinguisher sees its view and outputs 0 or 1. Let be the probability that it outputs 1 when was used, and the probability that it outputs 1 when was used. Its advantage is , the size of the difference between the two probabilities. A distinguisher that names when it outputs 1 is right with probability . Reversing its answers turns a negative difference into a positive one, so only the size of the difference matters. Advantage 0 means the view is useless to the distinguisher; advantage 1 means the view reveals the choice every time.
Three strengths of confidentiality follow.
Perfect: every distinguisher has advantage exactly 0, even one with unlimited computing time. For encryption this is equivalent to Shannon’s definition.
Statistical: the two distributions of views are close. Their statistical distance is half the sum, over all possible views, of the absolute differences between the two probabilities of that view; the half avoids counting the same moved probability twice. No distinguisher, whatever its computing power, has an advantage larger than this distance, and the best one has exactly this advantage. If processing yields the views A and B with probabilities 0.4 and 0.6, and processing yields them with probabilities 0.6 and 0.4, the distance is . The distinguisher that outputs 1 exactly on view A has and , so it reaches advantage 0.2 and is right with probability .
Computational: every distinguisher that runs for at most steps has advantage at most a small number . Practical ciphers give only this kind of confidentiality. The claim rests on an unproven assumption, that no computation of that size breaks the cipher, and it says nothing about an observer with more computing power than steps.
Every confidentiality claim also rests on named assumptions: the key is generated uniformly at random and kept secret; the endpoints that hold the key and the plaintext are not compromised; and the observer sees only the view that the analysis lists, so a side channel left off that list is not covered.
Limits and common mistakes
Encrypting the content does not hide metadata. Lengths, times, addresses, message counts and unencrypted headers stay visible unless separate mechanisms hide them.
Confidentiality is not integrity. With the one-time pad, or any cipher that combines a stream of key bits with the plaintext by exclusive or, as stream ciphers and counter mode §15.5 do, flipping one ciphertext bit flips the same plaintext bit, and the receiver decrypts the changed message without noticing. Detecting changes needs an authentication tag, as in authenticated encryption §5.16, which encrypts and tags in one operation.
Deterministic encryption, which always turns the same plaintext into the same ciphertext under one key, reveals when two messages are equal.
Recorded ciphertext stays readable to whoever later obtains the key. An attacker can store traffic today and decrypt it after a key leaks. Agreeing on a fresh key for each session, in a way that the long-term keys cannot later reproduce, and erasing each session key after use limits that damage; this property is called forward secrecy §5.33.
Responses leak too. A receiver that reports different errors, or takes different times, for different kinds of invalid input gives the observer information about the secret data the receiver processed.
Authorized readers are outside the guarantee. Every authorized reader learns the data in full, and confidentiality controls what the modeled observer learns, not what an authorized reader does with the information afterwards.
Questions answered
What metadata leaks even when payloads are encrypted?
Everything about the communication except the encrypted content can leak: who talks to whom, when, how often, how much, and in what pattern. The payload of a packet is its content; the metadata is everything else about the packet. An observer who sees encrypted packets usually still learns:
the source and destination addresses, and any device identifier sent unencrypted;
the length of each message, because most encryption reveals the length, either exactly plus a fixed overhead or rounded up to a whole number of blocks;
the time of each message and the gaps between messages, which reveal patterns of activity and, through response times §9.32, sometimes what the receiver did with a message;
the number and total volume of messages over time;
every header field that is protected against change but not encrypted, such as a protocol version, a message type or a sequence number;
the fact that communication happens at all.
Hiding metadata needs separate measures: padding messages to fixed lengths, sending at fixed times with dummy traffic, and routing through intermediaries that hide addresses. Each measure costs bandwidth, delay or energy, and each hides only the metadata it targets.
Does high ciphertext entropy §5.26 prove confidentiality?
No, high ciphertext entropy does not prove confidentiality. Entropy measures how unpredictable a value is on its own; confidentiality concerns how much a value tells an observer about the secret. If the secret is a uniformly random 128-bit number and a device sends it unencrypted, the transmitted value has the largest possible entropy, 128 bits, and reveals the whole secret. Likewise, encryption under a key that the attacker knows produces random-looking output that the attacker simply decrypts. Confidentiality is shown by comparing what the observer sees for different values of the secret, not by measuring how random the output looks.
Related entries: Authenticated encryption (AEAD) (§5.16), Entropy and min-entropy (§5.26), Threshold secret sharing (§5.44), Anonymity (§5.45), Unlinkability (§5.46), Traffic analysis defenses (§5.47), Secure multiparty computation (§5.48), Side channel (§1.29), Integrity (§1.9), Forward secrecy (§5.33). Further reading: [65, 66].