7 - DH Key Exchange Flashcards

1
Q

Based on what problem?

A

The difficulty of the discrete logarithm problem

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

DH Paint analogy

A
  • Common paint
  • Alice and Bob pick another colour and mix
    ——- Paint separation is expensive
  • Transport mixes to each other
  • Alice and Bob mix received paints with colour they choose (2 to 1)
  • The final paint is the same
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Paint analogy, why is it resilient to hackers

A

Hacker only has the common paint, so they cannot mix either received paint to get the correct one

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

DH Mathematical Method

A

p is a public prime and g is a primitive root

  • Alice and Bob pick secret integers a, b (one each)
  • They compute g^a mod p or g^b mod p and send
  • On receive, they compute y^a mod p or x^b mod p
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Public Prime 23
Primitive root 7

Alice chooses 9
Bob chooses 4

Complete DH key echange

A

Alice: 7^9 mod 23 = 15 … send to Bob
Bob: 7^4 mod 23 = 9 … send to Alice

Alice: 9 ^ 9 mod 23 = 2
Bob: 15 ^ 4 mod 23 = 2

The number is the same

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does an attacker know listening in to DH exchange?

A

p, g, x, y

public prime
primitivie root
x from alice
y from bob

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What equation does DH reduce down to

A

g^(ba) mod p

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Integers used in DH should be small or large?

Each prime should be at least ? bits
p-1 must have a ???

A

Large

prime p (at least 2048bits)
p-1 must have a large prime factor

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Safe Prime p

A

a Sophie Germain prime.

If a prime p is still prime after 2p+1 then p is a safe prime

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

DH terminology in public/private

A

a Alice’s private key
x Alice’s public key
b Bob’s private key
y Bob’s public key

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Static vs Ephemeral

A

Static - Same keys for long time/many sessions
Ephemeral - changed for each session

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Forward Secrecy

A

Ephemeral DH - next session invalidates compromised previous information, compared to static DH

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Does RSA have forward secrecy?

A

No, they are kept for a long time.

So a compromise once is a consistent compromise.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Post quantum crypto - RSA and DH

A

Both algos will be vulnerable to sufficiently powerful quantum computers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly