Diffie Hellman, Encryption, Symmetric Encryption, Cryptography, Security.
mod p Since the modulo operation is distributive, this becomes: gᵇᵃ mod p = gᵃᵇ mod p Since gᵇᵃ = gᵃᵇ, it’s clear these are equal. Second, you need to understand why it’s important that p is prime, and that g is a primitive root modulo p. Notice that the shared secret is of the form gᵃᵇ mod p. If