Skip to main content
Tweeted twitter.com/StackCrypto/status/1472673109178298371
introduced latex
Source Link
SEJPM
  • 46.4k
  • 9
  • 102
  • 210

Could someone explain why it's necessary to have the modulo operation in the Diffie-Hellman key exchange?

Let's imagine we do DH without the modulo operation (A = g^a, B = g^b$A = g^a, B = g^b$). Would that not work, because the logarithm (a = log_g(A)$a = \log_gA$) is easy to calculate? And why does the modulo operation have to be done with a prime?

I know it's a basic question, sorry. I understand the protocol, but not the maths around what is easy to calculate and what isn't. I guess we need A = g^a mod p$A = g^a \bmod p$ instead of just plain A = g^a$A = g^a$, because log_g(A) mod p$\log_gA \bmod p$ is very hard to calculate... would it be easy to calculate it without the mod p$\bmod p$?

Many thanks in advance.

Could someone explain why it's necessary to have the modulo operation in the Diffie-Hellman key exchange?

Let's imagine we do DH without the modulo operation (A = g^a, B = g^b). Would that not work, because the logarithm (a = log_g(A)) is easy to calculate? And why does the modulo operation have to be done with a prime?

I know it's a basic question, sorry. I understand the protocol, but not the maths around what is easy to calculate and what isn't. I guess we need A = g^a mod p instead of just plain A = g^a, because log_g(A) mod p is very hard to calculate... would it be easy to calculate it without the mod p?

Many thanks in advance.

Could someone explain why it's necessary to have the modulo operation in the Diffie-Hellman key exchange?

Let's imagine we do DH without the modulo operation ($A = g^a, B = g^b$). Would that not work, because the logarithm ($a = \log_gA$) is easy to calculate? And why does the modulo operation have to be done with a prime?

I know it's a basic question, sorry. I understand the protocol, but not the maths around what is easy to calculate and what isn't. I guess we need $A = g^a \bmod p$ instead of just plain $A = g^a$, because $\log_gA \bmod p$ is very hard to calculate... would it be easy to calculate it without the $\bmod p$?

Many thanks in advance.

Post Migrated Here from security.stackexchange.com (revisions)
Source Link
Andras
  • 143
  • 4

Diffie-Hellman key exchange - why is modulo operation necessary?

Could someone explain why it's necessary to have the modulo operation in the Diffie-Hellman key exchange?

Let's imagine we do DH without the modulo operation (A = g^a, B = g^b). Would that not work, because the logarithm (a = log_g(A)) is easy to calculate? And why does the modulo operation have to be done with a prime?

I know it's a basic question, sorry. I understand the protocol, but not the maths around what is easy to calculate and what isn't. I guess we need A = g^a mod p instead of just plain A = g^a, because log_g(A) mod p is very hard to calculate... would it be easy to calculate it without the mod p?

Many thanks in advance.