This shows you the differences between two versions of the page.
|
articles:mathematics:crypto:introduction [2010/07/11 13:50] ali |
articles:mathematics:crypto:introduction [2010/07/11 13:50] (current) ali |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Cryptography ====== | ||
| + | ===== Definition ===== | ||
| + | A cryptography system is defined as follows: | ||
| + | |||
| + | *<latex>\mathcal{P}</latex>: is a finite set of decrypted text or plain text | ||
| + | *<latex>\mathcal{C}</latex>: is a finite set of encrypted text | ||
| + | *<latex>\mathcal{K}</latex>: is a finite set of keys | ||
| + | *<latex>\mathcal{E}</latex>: is a finite set of encryption rules, e.g. set of encryption functions | ||
| + | *<latex>\mathcal{D}</latex>: is a finiste set of decryption rules, e.g. set of decryption functions | ||
| + | |||
| + | <latex> | ||
| + | \begin{align*} | ||
| + | \forall k \in \mathcal{K}, \exists e_{k} \in \mathcal{E}, e_{k}: \mathcal{P} \longrightarrow \mathcal{C}, \exists d_{k} \in \mathcal{D}, d_{k}: \mathcal{C} \longrightarrow \mathcal{P} | ||
| + | \end{align*} | ||
| + | \begin{equation} | ||
| + | d_{k} o e_{k} = id_{p}. | ||
| + | \end{equation} | ||
| + | </latex> | ||
| + | |||
| + | In other words, for a given key k, we can find an encryption function <latex>e_{k}<latex> and a decryption function <latex>d_{k}<latex> depending on k, that we use to pass from the encrypted text to the decrypted one and vice versa. | ||
| + | |||
| + | ===== Examples ===== | ||
| + | ==== Affine cipher ==== | ||
| + | |||
| + | <latex> | ||
| + | $\mathcal{P}=\mathcal{C}=\mathbb{Z}$\\ | ||
| + | $\mathcal{K}=\mathbb{Z}^* \times \mathbb{Z}$\\ | ||
| + | $\forall$ $k=(a,b)$ $\in$ $\mathcal{K}$, $x\in$$\mathcal{P}$, $e_{k}(x)=ax+b$, $d_{k}(x)=a^{-1}(x-b)$\\ | ||
| + | $d_{k}oe_{k}(x)=a^{-1}((ax+b)-b)=x=id_{p}$ | ||
| + | </latex> | ||
| + | |||
| + | ==== Exclusive disjunction (XOR) ==== | ||
| + | |||
| + | <latex> | ||
| + | $\mathcal{P}=\mathcal{C}=\mathbb{Z}/(2\mathbb{Z})^n$\\ | ||
| + | $\mathcal{K}=\mathbb{Z}$\\ | ||
| + | $\forall k\in \mathcal{K}, x=(x_{1},...,x_{n})\in \mathcal{P}, e_{k}(x)=d_{k}(x)=(x_{1}\oplus k,... x_{n}\oplus k)$\\ | ||
| + | whereas $\oplus$ is the exclusive disjunction. | ||
| + | \begin{eqnarray*} | ||
| + | (d_{k}oe_{k})(x)&=&d_{k}(x_{1}\oplus k, x_{2}\oplus k,...,x_{n}\oplus k)\\ | ||
| + | &=& (x_{1}\oplus k \oplus k, x_{2}\oplus k \oplus k,...,x_{n}\oplus k \oplus k)\\ | ||
| + | &=& (x_{1}, x_{2},...,x_{n})\\ | ||
| + | &=& id_{p}\\ | ||
| + | \end{eqnarray*} | ||
| + | </latex> | ||