codethrasher

Cipher

A cipher is defined over the spaces of:


All Keys, K\mathscr{K}


All Messages, M\mathscr{M}


All Cipher texts, C\mathscr{C}


Cipher (defined as a triple, (K,M,C)(\mathscr{K}, \mathscr{M}, \mathscr{C})) as a pair of algorithms (E,D)(\mathbf{E}, \mathbf{D}) where E\mathbf{E} represents the encryption algorithm and D\mathbf{D} represents the decryption algorithm.

E:K×MC\begin{equation} \mathbf{E}: \mathscr{K} \times \mathscr{M} \rightarrow \mathscr{C} \end{equation}

and

D:K×CM\begin{equation} \mathbf{D}: \mathscr{K} \times \mathscr{C} \rightarrow \mathscr{M} \end{equation}

Such that:

mM,kK:D(k,E(k,m))=m\begin{equation} \forall m \in \mathscr{M}, k \in \mathscr{K}: \mathbf{D}(k, \mathbf{E}(k, m)) = m \end{equation}

E\mathbf{E} is often randomized


D\mathbf{D} is always deterministic

A cipher (E,D)(\mathbf{E}, \mathbf{D}) has perfect secrecy if:


m0,m1M(m0=m1)andcC Pr[E(k,m0)=c]=Pr[E(k,m1)=c]\begin{equation} \forall m_{0}, m_{1} \in \mathscr{M} \, (|m_{0}| = |m_{1}|) \, and \, \forall c \in \mathscr{C} \\\ Pr[\mathbf{E}(k, m_{0}) = c] = Pr[\mathbf{E}(k, m_{1}) = c] \end{equation}

where kKk \leftarrow \mathscr{K} (k is a randomly distributed key from K\mathscr{K})


In other words, if I was given a particular cipher text (encrypted message), I will have no idea which message originally created it since it could be any other message with equal probability.

← Distribution Vector Yarn-NPM →