Let’s walk through a step-by-step encryption example with real numbers , keeping it simple so you see exactly what happens . Because modern algorithms like AES or RSA use huge numbers (hundreds or thousands of bits), I’ll show you a tiny toy example using RSA , with small numbers you can follow by hand . This will not be secure (too small), but it will demonstrate the principle perfectly. KEYS OF THE UNIVERSE - Awesome booklets on amazon 🎯 RSA Example (Small Numbers) Goal: Encrypt and decrypt the number M = 7 🛠️ STEP 1: Key Generation ✅ Choose two prime numbers: p = 3 q = 11 ✅ Compute n = p × q: n = 3 × 11 = 33 This number n will be part of your public key and private key . ✅ Compute Euler’s totient: Ï• ( n ) = ( p − 1 ) ( q − 1 ) = ( 3 − 1 ) ( 11 − 1 ) = 2 × 10 = 20 phi(n) = (p-1)(q-1) = (3-1)(11-1) = 2 × 10 = 20 ✅ Choose public exponent e: e must be coprime with 20. Let’s pick e = 3. Public Key = (e, n) = (3, 33) ✅ Compute private expon...
Tons of knowledge as digestible nuggets