🌑

Explore / Study / Computer Science / Cryptography 802 words | 5 minutes

§2 Perfectly Secret Encryption

  1. Perfect Secrecy
    1. Perfect Secrecy: Threat Model
    2. Perfect Secrecy: Definition
    3. Perfect Secrecy: Equivalent Definition
    4. Adversarial Indistinguishability Experiment PrivK⁡A,Πeav\operatorname{PrivK}_{\mathscr{A}, \Pi}^{\mathrm{eav}}PrivKA,Πeav​
    5. Perfect Indistinguishability
  2. One-Time Pad: A Perfectly Secret Private-Key Encryption Scheme
    1. One-Time Pad Encryption Scheme
    2. One-Time Pad: Bitwise XOR
    3. Perfect Secrecy of the One-Time Pad
    4. Optimality of the One-Time Pad

Perfect Secrecy

Perfect Secrecy: Threat Model

  • In defining the notion of perfect secrecy, we first consider the threat model of a single ciphertext-only attack.

  • Adversary knows (Gen,Enc,Dec)(Gen, Enc, Dec), and the probability distribution over M\mathscr M.

    Adversary passively eavesdrops on the communication and is able to get a single ciphertext.

  • No assumption is made on the computational power of the adversary.

    Adversary does not know the secret key shared by Alice and Bob.

Perfect Secrecy: Definition

  • Definition. An encryption scheme (Gen,Enc,Dec)(Gen, Enc, Dec) with message space M\mathscr M is perfectly secret if for every probability distribution over M\mathscr M, every message mMm \in \mathscr M and every ciphertext cCc \in \mathscr C for which Pr[C=c]>0\Pr [C = c] > 0, it holds that

    Pr[M=mC=c]=Pr[M=m]\Pr [M = m|C = c] = \Pr [M = m]

Perfect Secrecy: Equivalent Definition

  • Lemma. An encryption scheme (Gen,Enc,Dec)(Gen, Enc, Dec) with message space M\mathscr M is perfectly secret if and only if

    Pr[EncK(m)=c]=Pr[EncK(m)=c]\Pr [Enc_K(m) = c] = \Pr [Enc_K(m' ) = c]

    or equivalently if

    Pr[C=cM=m]=Pr[C=cM=m]\Pr [C = c|M = m] = \Pr [C = c|M = m']

    holds for every m,mMm, m' \in \mathscr M and every cCc \in \mathscr C.

Adversarial Indistinguishability Experiment PrivKA,Πeav\operatorname{PrivK}_{\mathscr{A}, \Pi}^{\mathrm{eav}}

  1. The adversary A\mathscr A outputs a pair of messages m0,m1Mm_0, m_1 \in \mathscr M.

  2. A key kk is generated using GenGen and a bit b{0,1}b \in \{0,1\} is chosen uniformly at random.

    The challenge ciphertext cEnck(mb)c \leftarrow Enc_k (m_b) is computed and given to A\mathscr A.

  3. A\mathscr A outputs a guess bit b{0,1}b' ∈ \{0,1\}.

  4. The adversary succeeds and the output of the experiment is defined to be 11 if b=bb' = b and 00 otherwise. We write PrivKA,Πeav=1\operatorname{PrivK}_{\mathscr{A}, \Pi}^{\mathrm{eav}}=1 if the output of the experiment is 11.

Perfect Indistinguishability

  • Definition. An encryption scheme Π=(Gen,Enc,Dec)\Pi = (Gen, Enc, Dec) with message space M\mathscr M is perfectly indistinguishable if for every A\mathscr A it holds that

    Pr[PrivKA,Πeav=1]=12\Pr \left[ \operatorname{PrivK}_{\mathscr{A}, \Pi}^{\mathrm{eav}}=1 \right] = \frac{1}{2}

  • Lemma. An encryption scheme Π\Pi is perfectly secret if and only if it is perfectly indistinguishable.

One-Time Pad: A Perfectly Secret Private-Key Encryption Scheme

One-Time Pad Encryption Scheme

  • Fix an integer l>0l > 0. The message space, key space and ciphertext space are the set of all binary strings of length ll, i.e. M=K=C={0,1}l\mathscr M = \mathscr K = \mathscr C = \{0,1\}^l.
  • GenGen: the key-generation algorithm chooses key uniformly at random from the key space i.e., kKk \leftarrow \mathscr K with Pr[K=k]=2lkK\Pr [K = k] = 2^{-l} \quad \forall k \in \mathscr K.
  • EncEnc : given inputs kKk \in \mathscr K and mMm \in \mathscr M, the encryption algorithm outputs c:=mkc := m \oplus k.
  • DecDec : given inputs kKk \in \mathscr K and cCc \in \mathscr C, the decryption algorithm outputs m:=ckm := c \oplus k.

One-Time Pad: Bitwise XOR

  • Correctness: The One-Time Pad satisfies the correctness criterion, since for every k,mk, m we have

    Deck(Enck(m))=(mk)k=m(kk)=m0=mDec_k (Enc_k (m)) = (m \oplus k) \oplus k = m \oplus (k \oplus k) = m \oplus 0 = m

Perfect Secrecy of the One-Time Pad

  • Theorem. The One-Time Pad encryption scheme is perfectly secret.

Optimality of the One-Time Pad

  • Theorem. If (Gen,Enc,Dec)(Gen, Enc, Dec) is a perfectly secret encryption scheme with message space M\mathscr M and key space K\mathscr K, then KM|\mathscr K| ≥ |\mathscr M|.

— Feb 1, 2023

Creative Commons License
§2 Perfectly Secret Encryption by Lu Meng is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Permissions beyond the scope of this license may be available at About.