Why cryptography ?

  • Privacy and Authenticity

Pre-Internet :

  • Diplomats/generals
  • Signing a letter authenticity Internet :
  • Keeping our communication/activity private

Caesar’s Cipher

We shift the letter by the key , modulo the length of the alphabet

Caesar's cipher

we take the english alphabet and shift it by one letter

Monoalphabetic Cipher

We take an arbitrary permutation of the alphabet (The key is the permutation)

Polyalphabetic Cipher

Uses multiple substitution tables

Vigernère Cipher

Has multiple keys, uses caesar’s cipher

Security

The security of those algorithms is determined by the key, not the algorithm. If that was the case, then when the algorithm gets leaked you’re toast

Ideally, a cryptographic system should be secure against attacks on the plaintext At the very least it should be secure on ciphertext only attacks

OTP

The plaintext, the key and the cryptogram are -length binary The key is produced by selecting each bit independently with uniform distribution

Encryption : Decryption :

Perfect Secrecy

Definition

A cryptosystem has perfect secrecy if the plaintext and the cryptogram are statistically independent

Example

Perfect Secrecy of the OTP We have

Hence they are independent

Theorem

If we have perfect secrecy, then

Diffie and Hellman

A way to distribute keys over a public channel

We fix a large prime number . (we will do ) We pick a generator , which we will use to generate numbers

We pick a secret number , which gives The person we wish to share our key to picks , We can share those keys publicly

To get the shared key , we can get it by raising the other’s public key to our secret number :

One-Way Functions

Discrete exponentiation (DH) is an example of a one-way function a function of a fast algorithm, but where reversing is slow

Trapdoor One-Way Functions

A trapdoor one-way function is a function with a trapdoor information, where if we know this information, then the reverse function is trivial.

This could be used for public-key cryptography, to decode images

ElGamal’s Trapdoor One-Way

We pick as in DH.
We then randomly pick , which are both kept secret.

We have the function , with the plaintext. We compute the inverse of By multiplying the inverse to the result of the function, we find the plaintext

Here, we send . We get sent back We can then find , and therefore and therefore

Quote

“We share a secret number, we’re happy , we’re hahaha”

  • Gastpar