Lecture 2: 20th September 2019 Flashcards
Encryption
What is encryption?
Methods of encoding messages or information in such a way that only authorized parties can access it and those who are not authorized cannot. Encryption turns plaintext into ciphertext.
What is symmetric encryption?
Encryption is any method that encodes messages or information in such a way that only authorized parties can access it and those who are not authorized cannot.
Symmetric encryption uses the same encryption key to encrypt and decrypt information.
What is asymmetric encryption? What is it aka?
Encryption is any method that encodes messages or information in such a way that only authorized parties can access it and those who are not authorized cannot.
Asymmetric encryption uses different keys to encrypt and decrypt information.
Asymmetric encryption is aka public-key cryptography.
How does symmetric key encryption work?
The parties agree on a key in advance and use it to encrypt and decrypt all communications between them.
Why is symmetric key encryption not practical on the Internet?
For an n-user system, we would require [n * (n-1)] / 2 keys for each pair of users
What is key exchange?
Methods by which keys can be exchanged to facilitate cryptographic algorithms to be used to protect privacy and confidentiality.
What is the Diffe-Hellman key exchange algorithm?
An algorithm is a method for securely exchanging cryptographic keys over a public communications channel. Keys are not actually exchanged – they are jointly derived.
How does the Diffe-Hellman key exchange algorithm work?
Alice and Bob would have to agree publicly on a generator and large prime, g and p. Each would then have a secret number, say a and b. Alice sends g ^ a mod p and Bob sends g ^ b mod p. Their shared secret is, therefore, g ^ ab mod p = g ^ ba mod p.
g = generator
p = prime
a = random secret number for person A = private key
b = random secret number for person B = private key
public keys = (generator ^ private key exponent) mod prime
e.g. Alice and Bob agree to use g and p, both prime numbers where p is large and g is such that (g mod p) has order (p-1).
Alice chooses a random number, a, as a private key and Bob chooses b.
Alice computes A = g ^ a (mod p) and Bob computes B = g ^ b (mod p) and each then sends that computation to the other.
Alice and Bob now have a shared key g ^ ab (mod p) which Alice computes as B ^ a (mod p)
= [(g ^ b ( mod p)) ^ a] mod p
= (g ^ ba) mod p
“colour mixing” in using each other’s private keys as exponents to create the public key
What are the conditions of the arithmetic used in D-H key exchange?
- It must be computationally easy to encode/ decode with a key
- it must be computationally infeasible to derive the private key from the public key
- it must be computationally infeasible to determine the private key from a plaintext attack.
Prime factorisation is used as it satisfies these requirements.
How does the prime modulus arithmetic work in D-H key exchange?
Generator, g, and large prime, p, agreed beforehand. Both make own secret numbers as private key. They send each other (g ^ b or a) mod p = B or A respectively. They then do (B ^ a) mod p or (A ^ b) mod p to find public key.
so s and b = private keys = exponents
public key = (generator ^ private keys) mod prime
generator and prime agreed beforehand
What is RSA?
An asymmetric cryptographic algorithm that is a defacto standard.
How does RSA work?
Select two primes, p and q.
Let n = p * q.
Let e = exponent where 1 < e < Φ(n)
Where Φ(n) = (P-1) * (Q-1)
public key, k = separate values of n and e
the encryption key, ke = a value such that ke < n and the greatest common denominator of e and Φ(n) is 1
decryption key, kd = ke ^ -1 mod Φ(n)
encrypt as: (p ^ ke) mod n
decrypt as: (c ^ kd) mod n
What are some encryption standards?
DES, AES, RSA
What is DES?
Data Encryption Standard is a 56 bit symmetric encryption algorithm introduced in 1976 that is ineffective today.
What is AES?
Advanced Encryption Standard is a 128, 192, and 256 bit symmetric block cipher. It is effective today.