Symmetric key encryption
A symmetric key encryption (SKE) scheme allows a sender and receiver sharing a secret key to encrypt and decrypt messages. Its security notions specify what an adversary can learn about the message, allowing leakage of its length.
Syntax
A SKE scheme is a tuple of efficient algorithms with respect to keyspace message space and ciphertext space :
- is a randomized algorithm which samples a key ,
- is a randomized algorithm which takes a key and message , outputting a ciphertext ,
- is a deterministic algorithm which takes a key and ciphertext , outputting a message or to indicate an invalid ciphertext.
Every SKE scheme on this page is -correct for a negligible function , and for every its message space contains two distinct messages of equal length that an efficient algorithm outputs on input . Without correctness, the scheme with a fresh uniform bit and meets every notion here; without two such messages, so does the perfectly correct scheme that encrypts to a fresh uniform string of length and decrypts to the unique message of length — standard. A perfectly secret, CPA-secure, ROR-CPA-secure, IND$-CPA-secure or CCA-secure SKE scheme denotes such a scheme with the property of that name.
As an object, SKE denotes such a scheme that is one-time secure.
Properties
Correctness
A SKE scheme is -correct if for all and ,
over the choice of and randomness of When , we say is perfectly correct.
CPA Security
In the chosen-plaintext attack (CPA) game, the adversary adaptively queries a left-right encryption oracle: it submits message pairs and receives an encryption of , where is a single hidden bit shared by all queries. Each encryption uses fresh randomness. An admissible adversary submits with on every query; otherwise ciphertext length may reveal . The adversary wins by guessing — standard.
\begin{algorithm}
\algname{Game}
\caption{$\Game^{\mathrm{cpa}}_{\SKE,\calA}(\secpar)$}
\begin{algorithmic}
\State $k \gets \KeyGen(1^\secpar)$; $b \getsr \bits$
\State $\calO_0(m_0, m_1) := \Enc(k, m_0)$
\State $\calO_1(m_0, m_1) := \Enc(k, m_1)$
\Comment{Every query has $m_0,m_1 \in \calM$ and $|m_0|=|m_1|$}
\State $b' \gets \calA^{\calO_b}(1^\secpar)$
\Return $[b' = b]$
\end{algorithmic}
\end{algorithm}
A SKE scheme is CPA-secure if for all admissible efficient ,
is negligible.
No SKE scheme whose is deterministic, and stateless as in Syntax, is CPA-secure. Let be the two equal-length messages of Syntax. The adversary queries , receiving , then , receiving , and outputs . If , then . If , then only if or , which has probability at most for a -correct scheme. Hence , and the advantage is at least — standard. Electronic codebook (ECB) mode, which encrypts with each to under a PRP on bit strings with domain , is such a scheme, and so is the one-time pad. Randomized counter mode (Length-preserving PRF ⇒ CPA-secure SKE) and CBC with a uniform initialization vector (PRP on bit strings ⇒ CPA-secure SKE (CBC)) are CPA-secure when built from a length-preserving PRF and a PRP on bit strings respectively, while CBC with a counter as initialization vector, a stateful scheme, is not (No fixed-construction reduction from PRP on bit strings to CPA-secure SKE (CBC with a counter IV)).
One-time security
The one-time game is the CPA game played by an admissible that makes at most one query to . A SKE scheme is one-time secure if for all such efficient , the CPA advantage is negligible. The one-time pad on is perfectly correct and perfectly secret, hence one-time secure with advantage against every adversary (Perfectly secret SKE ⇒ SKE).
Perfect secrecy
Perfect secrecy asks for one-time security with advantage exactly against every adversary, efficient or not. Write for the messages of length , and let .
A SKE scheme is perfectly secret if for all and all with , the random variables and , over and the coins of , are identically distributed. Equivalently, every admissible , efficient or not, that makes at most one query in the CPA game has . Under perfect secrecy the answer to the query has the same distribution for both values of . Otherwise some admissible give distinct distributions, and the adversary that queries and outputs iff the answer lies in has advantage equal to their statistical distance, which is positive — standard.
Shannon secrecy is the equivalent a-posteriori form: for all and , every random variable on independent of , and ,
TODO: attribute this definition to Sha49 once the passage defining it is read.
The two notions are equivalent — standard. If is perfectly secret, is the same for every . As is independent of , whenever , so , and Bayes’ rule gives . Conversely, for distinct let be uniform on . Shannon secrecy and Bayes’ rule give for whenever , and both sides vanish otherwise, as is the average of and . Shannon secrecy fixes the message length because, as in the CPA game, the ciphertext length may reveal it.
One-time pad
The one-time pad for message length has ; outputs , and . It is perfectly correct, as , and perfectly secret: for every , is a bijection of , so is uniform on — standard. Its is deterministic, so it is not CPA-secure.
Shannon’s bound
If is perfectly correct and perfectly secret, then for all and , outputs at least keys with positive probability. Hence , and with at most messages of each length can be encrypted — standard.
TODO: attribute the bound to Sha49 once the passage stating it is read.
Fix and with . By perfect secrecy, for every , so some key that outputs with positive probability has . Perfect correctness gives , since otherwise decryption would fail with positive probability, and is deterministic, so is injective. The one-time pad meets the bound with equality; Messages longer than the key asks for one-time security in the regime where the bound rules out perfect secrecy.
Real-or-random CPA security
In the real-or-random (ROR) CPA game, the adversary queries single messages ; in world 0 the oracle encrypts , and in world 1 it encrypts a fresh uniform string of length in its place, under the same key — BDJR97. The game needs that string to be a message, so the notion applies to schemes whose message space contains, with each message , all of , as and do. An admissible adversary queries only messages in .
\begin{algorithm}
\algname{Game}
\caption{$\Game^{\mathrm{ror\text{-}cpa}}_{\SKE,\calA}(\secpar)$}
\begin{algorithmic}
\State $k \gets \KeyGen(1^\secpar)$; $b \getsr \bits$
\State $\calO_0(m) := \Enc(k, m)$
\State $\calO_1(m) := \Enc(k, r)$ for a fresh $r \getsr \bits^{|m|}$
\Comment{Each query has $m \in \calM$; fresh coins in both worlds}
\State $b' \gets \calA^{\calO_b}(1^\secpar)$
\Return $[b' = b]$
\end{algorithmic}
\end{algorithm}
A SKE scheme with such a message space is ROR-CPA-secure if for all admissible efficient ,
is negligible. For such schemes ROR-CPA security and CPA security are equivalent, with a factor from ROR to left-or-right (ROR-CPA-secure SKE ⇒ CPA-secure SKE) and no loss in the other direction (CPA-secure SKE ⇒ ROR-CPA-secure SKE) — BDJR97.
IND$-CPA Security
Indistinguishability from random (IND$-CPA) is a stronger notion where the adversary must distinguish real encryptions from uniformly random strings of the same length. For each security parameter, assume an encryption of always has length , independent of the key and encryption coins. An admissible adversary queries only messages in . The oracle in world 0 encrypts each query with fresh randomness; in world 1 it returns a fresh uniform string in , which need not be a valid ciphertext — standard.
\begin{algorithm}
\algname{Game}
\caption{$\Game^{\mathrm{ind\$\text{-}cpa}}_{\SKE,\calA}(\secpar)$}
\begin{algorithmic}
\State $k \gets \KeyGen(1^\secpar)$; $b \getsr \bits$
\State $\calO_0(m) := \Enc(k, m)$
\State $\calO_1(m) \getsr \bits^{\ell(\secpar, |m|)}$
\Comment{Each query has $m \in \calM$; use fresh coins in both worlds}
\State $b' \gets \calA^{\calO_b}(1^\secpar)$
\Return $[b' = b]$
\end{algorithmic}
\end{algorithm}
A SKE scheme is IND$-CPA-secure if for all admissible efficient ,
is negligible. IND$-CPA implies CPA security (IND$-CPA Security ⇒ CPA Security), but not vice versa (No fixed-construction reduction from CPA Security to IND$-CPA Security) — standard.
CCA Security
In the chosen-ciphertext attack (CCA) game, the adversary additionally has access to a decryption oracle. An admissible adversary submits equal-length messages in on every encryption query and may not query on any ciphertext already output by the encryption oracle .
\begin{algorithm}
\algname{Game}
\caption{$\Game^{\mathrm{cca}}_{\SKE,\calA}(\secpar)$}
\begin{algorithmic}
\State $k \gets \KeyGen(1^\secpar)$; $b \getsr \bits$
\State $\calO_b(m_0, m_1) := \Enc(k, m_b)$
\Comment{Every query has $m_0,m_1 \in \calM$ and $|m_0|=|m_1|$}
\State $\calD(c) := \Dec(k, c)$
\Comment{$\calA$ may not query $\calD$ on outputs of $\calO_b$}
\State $b' \gets \calA^{\calO_b, \calD}(1^\secpar)$
\Return $[b' = b]$
\end{algorithmic}
\end{algorithm}
A SKE scheme is CCA-secure if for all admissible efficient ,
is negligible. The admissibility restriction is necessary: without it, could query on two distinct equal-length messages and submit the answer to , which returns except with probability . Restricted to a single encryption query, made before any decryption query, the game becomes one-time CCA security, the notion a KEM-DEM data encapsulation mechanism needs.
A scheme is malleable if for some efficiently computable function on messages, an efficient algorithm given only a ciphertext of an unknown message outputs a ciphertext that decrypts to , except with negligible probability. Malleability with for two equal-length messages defeats CCA security: transforms the answer of its single query into , an admissible query to , and outputs iff the answer is , which gives advantage — standard. Randomized counter mode is malleable, since flipping a bit of the masked part of a ciphertext flips the same bit of the message, so it is not CCA-secure although it is CPA-secure under a length-preserving PRF (No fixed-construction reduction from length-preserving PRF to CCA-secure SKE (randomized CTR)). Appending to every ciphertext a bit that ignores makes any CPA-secure scheme malleable without affecting its CPA security, so a CPA-secure scheme need not be CCA-secure (No fixed-construction reduction from CPA-secure SKE to CCA-secure SKE).
Variations
Messages longer than the key
A SKE scheme has key length if . A one-time-secure SKE scheme for messages longer than the key is a one-time-secure SKE scheme of some key length whose message space contains every string of some length , that is, for every . By Shannon’s bound, no perfectly correct such scheme is perfectly secret. Two messages longer than the key would not suffice: for every , the keys , messages , and , where repeats the bit , give a perfectly correct, perfectly secret scheme of key length — standard. If a PRG exists, the scheme meets this notion (PRG ⇒ One-time SKE for messages longer than the key).
One-time CCA security
In the one-time CCA game, submits a single pair , receives , and then queries the decryption oracle on any number of ciphertexts other than ; it has no oracle before the challenge. This is the security of the data encapsulation mechanism (DEM) of KEM-DEM hybrid encryption, which encrypts one message under each fresh key. PSJS24 (Section III) restate the one-time symmetric-key encryption of the hybrid construction of CS03 in this form: keys uniform on , messages in , and the IND-OTCCA game they take from HHK10, with no oracle before the challenge and a decryption oracle after it. An admissible adversary submits with , since ciphertext length may reveal , and does not query on , which returns except with probability .
\begin{algorithm}
\algname{Game}
\caption{$\Game^{\mathrm{ot\text{-}cca}}_{\SKE,\calA}(\secpar)$}
\begin{algorithmic}
\State $k \gets \KeyGen(1^\secpar)$; $b \getsr \bits$
\State $(m_0, m_1, \stA) \gets \calA(1^\secpar)$
\Comment{$m_0,m_1 \in \calM$ and $|m_0|=|m_1|$; no oracle before the challenge}
\State $c^* \gets \Enc(k, m_b)$
\State $\calD(c) := \Dec(k, c)$
\State $b' \gets \calA^{\calD}(c^*, \stA)$
\Comment{$\calA$ may not query $\calD$ on $c^*$}
\Return $[b' = b]$
\end{algorithmic}
\end{algorithm}
A SKE scheme is one-time CCA-secure if for all admissible efficient ,
is negligible. As an object, one-time CCA-secure SKE denotes a one-time CCA-secure scheme whose outputs a uniform key , for a polynomial-time computable , so that a prefix of the uniform key of a KEM can key it; its message space is any one allowed by Syntax. Running on the key as its coins turns a CCA-secure scheme into one (CCA-secure SKE ⇒ One-time CCA-secure SKE) — folklore. With an IND-CCA KEM such a scheme gives IND-CCA PKE (IND-CCA KEM + one-time CCA-secure SKE ⇒ IND-CCA PKE) — CS03. Without decryption queries the game is the one-time game, so such a scheme is one-time secure (One-time CCA-secure SKE ⇒ SKE) — folklore.
Other results
- OWF ⇒ PRG
- Length-preserving PRF ⇒ CPA-secure SKE
- PRP on bit strings ⇒ CPA-secure SKE (CBC)
- ROR-CPA-secure SKE ⇒ CPA-secure SKE and CPA-secure SKE ⇒ ROR-CPA-secure SKE
- PRG ⇒ One-time SKE for messages longer than the key
- Length-preserving PRF ⇒ MAC
- Arbitrary-length SUF-CMA MAC + CPA-secure SKE ⇒ CCA-secure SKE
- Searchable symmetric encryption: an encrypted index that a server searches with keyword tokens, learning only a specified leakage function — SWP00, CGKO06.
- Order-preserving and order-revealing encryption: deterministic encryption whose ciphertexts reveal the order of the plaintexts — BCLO09, CLWW16.
Participates in
Builds on Symmetric key encryption
- CCA-secure SKE ⇒ CPA-secure SKE (via CCA Security)
- CCA-secure SKE ⇒ One-time CCA-secure SKE (via CCA Security)
- CPA-secure SKE + arbitrary-length SUF-CMA MAC ⇒ AE (Encrypt-then-MAC) (via CPA Security)
- CPA-secure SKE ⇒ ROR-CPA-secure SKE (via CPA Security)
- CPA-secure SKE ⇒ SKE (via CPA Security)
- IND-CPA KEM + SKE ⇒ IND-CPA PKE
- IND$-CPA Security ⇒ CPA Security (via IND$-CPA Security)
- IND-CCA KEM + one-time CCA-secure SKE ⇒ IND-CCA PKE (via One-time CCA security)
- Arbitrary-length SUF-CMA MAC + CPA-secure SKE ⇒ CCA-secure SKE (via CPA Security)
- One-time CCA-secure SKE ⇒ SKE (via One-time CCA security)
- Perfectly secret SKE ⇒ SKE (via Perfect secrecy)
- ROR-CPA-secure SKE ⇒ CPA-secure SKE (via Real-or-random CPA security)
- SKE ⇒ OWF (via CPA Security)
Produces Symmetric key encryption
- AE ⇒ CCA-secure SKE (via CCA Security)
- CCA-secure SKE ⇒ CPA-secure SKE (via CPA Security)
- CCA-secure SKE ⇒ One-time CCA-secure SKE (via One-time CCA security)
- CPA-secure SKE ⇒ ROR-CPA-secure SKE (via Real-or-random CPA security)
- CPA-secure SKE ⇒ SKE
- IND$-CPA Security ⇒ CPA Security (via CPA Security)
- Arbitrary-length SUF-CMA MAC + CPA-secure SKE ⇒ CCA-secure SKE (via CCA Security)
- One-time CCA-secure SKE ⇒ SKE
- Perfectly secret SKE ⇒ SKE
- PRC ⇒ SKE
- Length-preserving PRF ⇒ CPA-secure SKE (via CPA Security)
- PRG ⇒ One-time SKE for messages longer than the key (via Messages longer than the key)
- PRP on bit strings ⇒ CPA-secure SKE (CBC) (via CPA Security)
- ROR-CPA-secure SKE ⇒ CPA-secure SKE (via CPA Security)
Barriers
- No fixed-construction reduction from CPA-secure SKE to CCA-secure SKE (via CCA Security, CPA Security)
- No fixed-construction reduction from CPA Security to IND$-CPA Security (via CPA Security, IND$-CPA Security)
- No fixed-construction reduction from CPA security to circular security of symmetric-key bit encryption (via CPA Security)
- No fixed-construction reduction from length-preserving PRF to CCA-secure SKE (randomized CTR) (via CCA Security)
- No fixed-construction reduction from PRP on bit strings to CPA-secure SKE (CBC with a counter IV) (via CPA Security) — circumvented by PRP on bit strings ⇒ CPA-secure SKE (CBC)