Cryptography & Security
Basic
XOR Cipher
Bitwise XOR of message and key; XOR again with k to decrypt.
Formula
Variables
cCiphertext
mMessage bit
kKey bit
Example
1 XOR 1 = 0; applying key twice returns the message
Did You Know?
A one-time pad — XOR with a truly random key as long as the message — is the only cipher proven unbreakable.
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.