Dominik Farhan

Symmetric Ciphers

E and D are parameterized with a key K.

In symmetric cipher Alice and Bob share the same key (the encryption and decryption keys are the same).

Kerckhoffs's principle = “one ought to design systems under the assumption that the enemy will immediately gain full familiarity with them” —basically everything can and should be public except the key.

Some well known symmetric ciphers:

Asymmetric ciphers

Encryption and decryption keys are different.

Typical use cases:

Some well-known asymmetric ciphers:

Hash functions

We want:

Use-cases

Generating randomness

We want something unpredictable and uninfluenceable.

hybrid ciphers, challenge-response authentication.

Attacks

Birthday attacks

How many tries are needed before something repeats? P[random function from [m] to [n] is injection]=#injection#allP[\text{random function from [m] to [n] is injection}] = \frac{\# \text{injection}}{\# \text{all}} =1(11n)(12n)...(1m1n)1e1/ne2/n...e(m1)/n=em(m1)2n= 1\left(1-\frac{1}{n}\right)\left(1-\frac{2}{n}\right) \cdot...\cdot \left(1-\frac{m-1}{n}\right) \approx 1 \cdot e^{-1/n}\cdot e^{-2/n}\cdot...\cdot\cdot e^{(m-1)/n} = e^{\frac{m(m-1)}{2n}} P[random function from [m] to [n] is injection]=12    mnP[\text{random function from [m] to [n] is injection}] = \frac{1}{2} \implies m \approx \sqrt{n} often one can precompute and listen at once thus making the mm even smaller.

Vernam cipher a.k.a One-Time Pad

Xors key and the plaintext.

Another similar structure is E(x,k)=x+k,D(y,k)=ykE(x, k) = x+k, D(y,k) = y-k done in Z2\mathbb{Z}_2.

Perfectly secure. Key must not be repeated ever.

An attacker can easily change messages.

Perfect security

The probability that ciphertext decrypts to a given plaintext is the same for all plaintexts.

When the number of keys is smaller than the number of messages it must hold that for some 2 messages.

P[D(y,k)=x]>0,P[D(y, k) = x] > 0 , P[D(y,k)=x]=0P[D(y, k) = x'] = 0 Thus, such cipher is not secure.