Cryptography & Security
Advanced
Diffie–Hellman Shared Secret
Two parties derive the same secret over a public channel.
Formula
Variables
sShared secret
BOther party's public value
aYour private key
pPrime modulus
Example
B=8, a=15, p=23: s = 8^15 mod 23 = 2
Did You Know?
Diffie–Hellman (1976) was the first published way for strangers to agree a secret in public — the birth of modern crypto.
Share this formula
More in Cryptography & Security
View allModular Exponentiation
IntermediateCore operation of RSA encryption — raise a message to a power, modulo n.
RSA Decryption
AdvancedRecovers the message using the private exponent d.
Euler's Totient
IntermediateCounts integers below n coprime to it, for n = pq — used to make RSA keys.
Shannon Entropy
AdvancedAverage information content — and the theoretical strength of a random source.
Password Entropy
IntermediateBits of security from password length and character-set size.
Key Space Size
IntermediateNumber of possible keys for a b-bit key.