RSA Encryption Playground

Explore Public Key Cryptography with Small Primes

🧔

Bob

The Receiver

Step 1: Key Generation

1

Bob needs to generate a Public Key to share and a Private Key to keep secret.

Modulus (n = P × Q) --
Totient (φ = (P-1) × (Q-1)) --
🔓
Public Key (e=--, n=--)
Shared with Alice
🔑
Private Key (d=--, n=--)
Kept Secret
👩

Alice

The Sender

Step 2: Encryption

2

Alice uses Bob's Public Key to encrypt her message.

Formula: C = Me mod n
Calculation: Me mod n
Ciphertext (C): --
Alice sends the Ciphertext C to Bob...
🧔

Bob

The Receiver

Step 3: Decryption

3

Bob receives the Ciphertext and decrypts it with his Private Key.

Formula: M = Cd mod n
Calculation: Cd mod n
Decrypted Message (M): --