Diffie Hellman, Encryption, Symmetric Encryption, Cryptography, Security.
values are blue, secret values are red. Why Does This Work? The are three main things you need to understand. First, you need to understand why Bᵃ mod p = Aᵇ mod p This is why Alice and Bob arrive at the same number, the same shared secret. So, let’s break it down. (gᵇ mod p)ᵃ mod p = (gᵃ mod p)ᵇ