Docsity

Discrete Logarithms and Diffie-Hellman Key Exchange: A Comprehensive Guide with Exercises, Exams of Social Sciences

Toggle sidebar
bg1
3 - DISCRETE LOGARITHMS AND DIFFIE-HELLMAN
KEY EXCHANGE
fermat's little theorem: for p prime, and if _, we have that _ - Answers :gcd(a, p) = 1,
a^(p-1) ≡ 1 mod p
(Definition) ϕ(n) is the - Answers :number of elements in 1,...,n that are coprime to n
fermat's little theorem generalisation: if _, we have that _ - Answers :gcd(a, n) = 1,
a^(ϕ(n)) ≡ 1 mod n
if n = p₁^(a₁)p₂^(a₂)..., then ϕ(n) = - Answers :p₁^(a₁ - 1)(p₁ - 1)p₂^(a₂ - 1)(p₂ - 1)...
best way to compute a^d mod n is first to calculate _ mod n, then write _, this requires
at most _ multiplications - Answers :1, a, a², a⁴ etc, d as a sum of powers of 2, 2log₂(d)
(Definition) g is a primitive root mod p if - Answers :for all 1 ≤ a ≤ p -1 there exists a
unique 0 ≤ r ≤ p -2 such that g^r ≡ a mod p
g^i ≡ g^j mod p if and only if - Answers :i ≡ j mod p - 1
(Definition) r is an index of a mod p for base g if _, denoted _ - Answers :a ≡ g^r mod p,
I(a) = r
the index is unique if we limit - Answers :0 ≤ r ≤ p -2
I(ab) ≡ - Answers :I(a) + I(b) mod p - 1
I(a^k) ≡ - Answers :kI(a) mod p - 1
discrete log problem: given p, g, a such that _, find _ - Answers :gcd(a, p) = 1, x such
that g^x≡ a mod p
D-H key exchange:
- Alice and Bob publicly chose _ and _
- Alice chooses _ and computes _
- Bob chooses _ and computes _
- They send send these to each other _
- Alice computes _ and Bob computes _
- Resulting ky is k = _ - Answers :prime p, primitive root g, n, g^n mod p, m, g^m mod p,
publicly, (g^m)n mod p, (g^n)m, mod p, g^(mn) mod p
in D-H key exchange, eve wants to _ and thus _ - Answers :find m or n, solve the
discrete log problem
pf2

Partial preview of the text

Download Discrete Logarithms and Diffie-Hellman Key Exchange: A Comprehensive Guide with Exercises and more Exams Social Sciences in PDF only on Docsity!

3 - DISCRETE LOGARITHMS AND DIFFIE-HELLMAN

KEY EXCHANGE

fermat's little theorem: for p prime, and if _, we have that _ - Answers :gcd(a, p) = 1, a^(p-1) ≡ 1 mod p (Definition) ϕ(n) is the - Answers :number of elements in 1,...,n that are coprime to n fermat's little theorem generalisation: if _, we have that _ - Answers :gcd(a, n) = 1, a^(ϕ(n)) ≡ 1 mod n if n = p₁^(a₁)p₂^(a₂)..., then ϕ(n) = - Answers :p₁^(a₁ - 1)(p₁ - 1)p₂^(a₂ - 1)(p₂ - 1)... best way to compute a^d mod n is first to calculate _ mod n, then write _, this requires at most _ multiplications - Answers :1, a, a², a⁴ etc, d as a sum of powers of 2, 2log₂(d) (Definition) g is a primitive root mod p if - Answers :for all 1 ≤ a ≤ p - 1 there exists a unique 0 ≤ r ≤ p - 2 such that g^r ≡ a mod p g^i ≡ g^j mod p if and only if - Answers :i ≡ j mod p - 1 (Definition) r is an index of a mod p for base g if _, denoted _ - Answers :a ≡ g^r mod p, I(a) = r the index is unique if we limit - Answers :0 ≤ r ≤ p - 2 I(ab) ≡ - Answers :I(a) + I(b) mod p - 1 I(a^k) ≡ - Answers :kI(a) mod p - 1 discrete log problem: given p, g, a such that _, find _ - Answers :gcd(a, p) = 1, x such that g^x≡ a mod p D-H key exchange:

  • Alice and Bob publicly chose _ and _
  • Alice chooses _ and computes _
  • Bob chooses _ and computes _
  • They send send these to each other _
  • Alice computes _ and Bob computes _
  • Resulting ky is k = _ - Answers :prime p, primitive root g, n, g^n mod p, m, g^m mod p, publicly, (g^m)n mod p, (g^n)m, mod p, g^(mn) mod p in D-H key exchange, eve wants to _ and thus _ - Answers :find m or n, solve the discrete log problem

the baby step, giant step algorithm is used to find _ such that _ - Answers :x, α^x ≡ β mod p BS-GS algorithm to solve α^x ≡ β mod p:

  • Choose _ such that _
  • Make a list of _ for _
  • Make a list of _ for _
  • Look for a _
  • Solution is x = _ - Answers :N, N² ≥ p - 1, α^j mod p, 0 ≤ j ≤ N - 1, βα^(-Nk), 0 ≤ k ≤ N - 1, match, j + Nk worse case for BS-GS algorithm is computing _ values - Answers :2N