Department of Electrical Engineering, IIT Bombay
August 2, 2024
Encryption schemes that are provably secure even against an adversary with unbounded computational power
Existence of such schemes is not obvious
Work done by Claude Shannon in the 1940s
His construction does not rely on any unproven computational assumptions
\texttt{Gen}: A probabilistic algorithm that outputs a key k according to some distribution. Denoted by k \leftarrow \texttt{Gen}
\mathcal{K}: Key space, the set of all possible keys that can be output by \texttt{Gen}
\texttt{Enc}: A probabilistic encryption algorithm that takes k, m as input and gives c as output. Denoted by c \leftarrow \texttt{Enc}_k(m)
\mathcal{C}: Set of all possible ciphertexts
\texttt{Dec}: Decryption algorithm that takes k, c as input and gives m as output. Denoted by m \coloneqq \texttt{Dec}_k(c)
We assume perfect correctness which is defined as follows
For all k \in \mathcal{K}, m \in \mathcal{M}, and any ciphertext c output by \texttt{Enc}_k (m), it holds that \texttt{Dec}_k(c) = m with probability 1
Perfect correctness implies that \texttt{Dec} is deterministic
So we can write m \coloneqq \texttt{Dec}_k(c)
Let K denote the random variable denoting the key generated by \texttt{Gen}
Let \Pr[K =k] denotes the probability that the key output by \texttt{Gen} is equal to k
Let M be the random variable denoting the message being encrypted
Let Pr[M = m] denote the probability that the message takes on the value m
K and M are assumed to be independent
Fixing an encryption scheme and a message distribution determines a distribution of ciphertexts as c \leftarrow \texttt{Enc}_k(m)
Let C be the random variable denoting the ciphertext
Let Pr[C = c] denote the probability that the ciphertext takes on the value c
\mathcal{K} = \{0,1,…,25\} with \Pr[K = k] = 1/26 for each k \in \mathcal{K}
Suppose we are given the following distribution over \mathcal{M} \Pr[M = \texttt{a}] = 0.7 \text{ and } \Pr[M = \texttt{z}] = 0.3
What is the probability that the ciphertext is \texttt{B}?
What is the probability that the message \texttt{a} was encrypted, given that we observe ciphertext \texttt{B}?
Consider the shift cipher again with \mathcal{M} = \{\texttt{ann}, \texttt{\texttt{boo}}, \texttt{kim}\} and \Pr[M = \texttt{ann}] = 0.2, \quad \Pr[M = \texttt{boo}] = 0.3,\\ \Pr[M = \texttt{kim}] = 0.5
What is the probability that C = \texttt{DQQ}?
What is the probability that the message \texttt{ann} was encrypted, given that we observe ciphertext \texttt{DQQ}?
Perfect secrecy = a posteriori probability of message m being sent equals the a priori probability of m being sent
An encryption scheme (\texttt{Gen}, \texttt{Enc}, \texttt{Dec}) with message space \mathcal{M} is perfectly secret if for every probability distribution over \mathcal{M}, every message m \in \mathcal{M}, and every ciphertext c \in \mathcal{C} for which \Pr\left[ C = c \right] > 0: \Pr[M = m \mid C = c] = Pr[M = m].
Yet another equivalent definition of perfect secrecy
Based on the idea of an experiment
Consider the following experiment
An adversary \mathcal{A} first specifies two arbitrary messages m_0, m_1 \in \mathcal{M}.
A key k is generated using \texttt{Gen}
One of m_0, m_1 is chosen with probability 1/2 and encrypted using k
Resulting ciphertext is given to \mathcal{A}
\mathcal{A} outputs a “guess” as to which of the two messages was encrypted
\mathcal{A} succeeds if it guesses correctly.
An encryption scheme is perfectly indistinguishable if no adversary \mathcal{A} can succeed with probability better than 1/2
Let \Pi = (\texttt{Gen}, \texttt{Enc}, \texttt{Dec}) be an encryption scheme with message space \mathcal{M}
Let \mathcal{A} be an adversary (an algorithm)
The adversarial indistinguishability experiment \texttt{PrivK}^{\texttt{eav}}_{\mathcal{A}, \Pi}
The adversary \mathcal{A} outputs a pair of messages m_0, m_1 \in \mathcal{M}.
A key k is generated using \texttt{Gen}
A uniform bit b \in \{0,1\} is chosen.
Ciphertext c \leftarrow \texttt{Enc}_k(m_b) is given to \mathcal{A}.
\mathcal{A} outputs a bit b'.
The output of the experiment is defined to be 1 if b' = b, and 0 otherwise.
Encryption scheme \Pi = (\texttt{Gen}, \texttt{Enc}, \texttt{Dec}) with message space \mathcal{M} is perfectly indistinguishable if for every \mathcal{A} it holds that \Pr\left[ \texttt{PrivK}^{\texttt{eav}}_{\mathcal{A}, \Pi} = 1 \right] = \frac{1}{2}.
Lemma: Encryption scheme \Pi = (\texttt{Gen}, \texttt{Enc}, \texttt{Dec}) is perfectly secret if and only if it is perfectly indistinguishable.
The shift cipher is not perfectly indistinguishable for messages longer than one character
Vigenère cipher is also not perfectly indistinguishable for certain parameters
A perfectly secret encryption scheme
Patented by Vernam in 1917
Shannon introduced the notion of perfect secrecy in the 1940s and proved that the one-time pad achieves it
Used by intelligence agencies in the mid-20th century
Theorem: The one-time pad is perfectly secret
Proof
Note: OTP’s perfect secrecy is lost if the key is reused
Chapter 2 from Katz & Lindell