Section 1.8

Confidentiality

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.

  1. 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.

  2. 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.

  3. 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.

  4. 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.

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 MM. The key is a bit KK chosen uniformly at random, meaning 0 and 1 each with probability 0.5, independently of MM, and used only once. The ciphertext is C=M⊕KC = M \oplus K, where ⊕\oplus 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 M=0M = 0 with probability 0.9 and M=1M = 1 with probability 0.1, and then sees C=0C = 0. Two cases produce C=0C = 0:

So C=0C = 0 has probability 0.45+0.05=0.500.45 + 0.05 = 0.50, and the probability that M=0M = 0 given C=0C = 0 is 0.45/0.50=0.90.45 / 0.50 = 0.9. That is exactly the observer’s belief before seeing CC. Seeing C=1C = 1 gives the same result, 0.45/0.50=0.90.45 / 0.50 = 0.9, from the cases M=0,K=1M = 0, K = 1 and M=1,K=0M = 1, K = 0. The ciphertext took away nothing the observer already knew and added nothing.

Using the key twice breaks the promise. Encrypt two bits M1M_1 and M2M_2 with the same key bit KK. Because K⊕K=0K \oplus K = 0, the observer computes C1⊕C2=M1⊕M2C_1 \oplus C_2 = M_1 \oplus M_2 without knowing KK. With M1=1M_1 = 1, M2=0M_2 = 0 and K=1K = 1, the ciphertexts are C1=0C_1 = 0 and C2=1C_2 = 1, and C1⊕C2=1C_1 \oplus C_2 = 1 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 3+16=193 + 16 = 19 and 2+16=182 + 16 = 18 bytes long, so an eavesdropper who only counts bytes reads the answer. Padding both answers to 4 bytes before encryption makes both ciphertexts 4+16=204 + 16 = 20 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 MM be the secret message and CC the ciphertext, both random quantities, and let mm and cc be particular values of them. Write Pr[E]\Pr[E] for the probability of an event EE, and Pr[E∣F]\Pr[E \mid F] for its probability given that the event FF happened. A scheme has perfect secrecy when Pr[M=m∣C=c]=Pr[M=m]\Pr[M = m \mid C = c] = \Pr[M = m] for every mm and for every cc with Pr[C=c]>0\Pr[C = c] > 0: 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 m0m_0 and m1m_1 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 p0p_0 be the probability that it outputs 1 when m0m_0 was used, and p1p_1 the probability that it outputs 1 when m1m_1 was used. Its advantage is |p1−p0|\lvert p_1 - p_0 \rvert, the size of the difference between the two probabilities. A distinguisher that names m1m_1 when it outputs 1 is right with probability 12⋅p1+12⋅(1−p0)=12+12(p1−p0)\frac{1}{2} \cdot p_1 + \frac{1}{2} \cdot (1 - p_0) = \frac{1}{2} + \frac{1}{2}(p_1 - p_0). 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.

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:

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].