Thread View: grc.techtalk.cryptography
1 messages
1 total messages
Started by Vela Nanashi
Sun, 05 May 2024 20:27
Re: Exploration of Diffie-Hellman Multiplication versus Exponentiation
Author: Vela Nanashi
Date: Sun, 05 May 2024 20:27
Date: Sun, 05 May 2024 20:27
135 lines
4623 bytes
4623 bytes
Since nobody else have replied to you, I thought I would toss my two cents your way :) Just some maybe stupid questions here. For diffie hellman we want to transfer things between two participants so that they can produce the same key in the end. I see how that works with the exponent version: shared knowledge with participants A and B and attacker C: x and m where x is a primitive root of m (for every positive integer a there is an integer k so that x ^ k = a mod m) secret knowledge A: a secret knowledge B: b message from A to B (and C): ma = x ^ a mod m message from B to A (and C): mb = x ^ b mod m shared secret between A and B: ss = ma ^ b mod m = mb ^ a mod m = x ^ (a*b) mod m what C knows: x, m, ma, mb ma * mb mod m = x ^ (a + b) mod m does not help us get x ^ (a + b) mod m for C to find ss they would need to compute either e or f: x ^ e mod m = ma x ^ f mod m = mb once they compute one of them they can finish the key exchange, this will on average take m/2 steps. --- I am not sure how you are going to do a key exchange with just multiplication. Could you show me how you would do that? So that A and B get the same value in the end and C does not have a way to derive that? Given that A and B send whatever they compute not only to B and A but to C. > Question 1 > ---------- > > How difficult is it to find the two hidden prime factors, as opposed to finding the secret exponent of a known factor as in the first example? > I do not know how the multiplication example works, but I gave you the estimate of m/2 steps for the exponentiation version. > Question 2 > ---------- > > What modern methods of attack are used to discover the hidden factors of example 3 and where can I read about them with examples? > Would first need to know how you propose to exchange the secret using just multiplication, then I can try to evaluate and see if I can find references to help. > Question 3 > ---------- > > Do any cryptosystems actually use any variation of example 3 with multiplication rather than exponentiation, and if so, which? > I don't know of one, but that means very little. > Question 4 > ---------- > > Per examples 1 through 3, if x, y are GREATER than modulus M, what are the implications for security or attack domain parameters and how? Or in other words, why are x and y usually chosen to be less than M, from a security perspective? > If what I call a and b are larger than m-1 we can compute a mod (m-1) and b mod (m-1), as if m is prime and x is a primitive root of m then the clock will wrap around after m-1 steps. example: m = 7 x = 3 a x ^ a mod m 0 1 1 3 2 2 3 6 4 4 5 5 6 1 (same as x ^ (a mod (m-1)) = 3 ^ (6 mod 6) = 3 ^ 0 = 1) For multiplication one can also optimize the calculation: hugeA * hugeB mod m = (hugeA mod m) * (hugeb mod m) mod m so larger multiplicative values will not actually be larger. We can see why if we do a silly example: m is 100 a = 123 b = 234 i = a mod m = 23 j = b mod m = 34 a * b = 28782 i * j = 782 a * b mod m = 82 i * j mod m = 82 Some useful links: https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange https://en.wikipedia.org/wiki/Discrete_logarithm https://en.wikipedia.org/wiki/Coprime_integers https://en.wikipedia.org/wiki/Primitive_root_modulo_n Of course there are ways to solve discrete logarithms if you can build a powerful enough quantum computer. As it can do some sort of try all the values and only get out a value that properly satisfies the equation. Also you can brute force and make sure you get a functionally correct value as the math will confirm that for you.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads