The Diffie-Hellman key agreement protocol (1976) was the first practical method for establishing a shared secret over an unsecured communication channel.
The point is to agree on a key that two parties can use for a symmetric encryption, in such a way that an eavesdropper cannot obtain the key.
Steps in the algorithm:
But it is not only sufficiently large values of the exponents that give security to this system. The choice of gyn also has a marked influence. The modulus n must be a prime number and, more important than this, (n-1) / 2 must also be a prime number. The base g, on the other hand, must be a primitive root modulo n in (more on the matter immediately below). Now, the most important of all is that n should be large, there is at least 512 bits
- Alice and Bob agree on a prime number p and a base g.
- Alice chooses a secret number x, and sends Bob (gxmod p)
- Bob chooses a secret number y, and sends Alice (gymod p)
- Alice computes ((gymod p)x mod p).
- Bob computes ((gx mod p)y mod p).
Example:
- Alicea nd Bob agree on p=23 and g=5.
- Alice chooses a=6 and sends 56 mod23=8
- Bob chooses b = 15 and sends 515 mod 23 = 19.
- Alice computes 196 mod 23 = 2.
- Bob computes 815 mod 23 = 2
Hack alice and Bob Manually
Hack used Program in python
---------
"algarisms though" o_0 ¿qué es eso? la ortografía podría ser mejor y no en realidad necesitas trabajar con números tan grandes; usa más el módulo; van 7
ResponderEliminar