Public-Key Cryptosystems
Okamoto-Uchiyama
The Okamoto-Uchiyama cryptosystem is homomorphic and malleable. cryptosystem.
- Choose random primes $p$ and $q$
- Compute $n=p^2q$
- Choose $g\in{2\ldots n-1}$ such that $g^{p-1} \not\equiv 1\bmod p^2$
- Compute $h=g^n\bmod n$
Encryption
- Choose message $m<p$
- Chose integer $r\in{1\ldots n-1}$ at random
- Compute ciphertext $c=g^mh^r\bmod n$
Decryption
- Define $L(x)=\frac{x-1}{p}$
- $m=\frac{L(c^{p-1}\bmod p^2)}{L(g^{p-1}\bmod p^2)}\bmod p$
RSA
Rivest-Shamir-Adleman
- Choose random primes $p$ and $q$
- Compute $n=pq$
- Compute [Euler's totient](algo.org::*Euler’s Totient Function) of $n$, $\varphi(n)=(p-1)(q-1)$
- Choose $e$ such that $1<e<\varphi(n)$
- Compute $d$ such that $de \equiv 1\bmod \varphi(n)$
- Choose message $m$
- Compute ciphertext $c\equiv m^e \bmod n$
- $m\equiv c^d \bmod n$
Symmetric-Key Cryptosystems
Symmetric cryptosystems are malleable.
Stream Ciphers
Stream ciphers often produce correlated ciphertext. The initialization vector used must be random and unique to prevent
CTR
Counter mode
Counter mode is a method of using a block cipher as a stream cipher.
RC4
Rivest Cipher 4
Block Ciphers
AES
Advanced Encryption Standard
DES
Data Encryption Standard
Hash Functions
SHA
Secure Hash Algorithm