RSA Encryption Explorer

Convergent Math · Interactive Tool

Loading Python environment…

The Building Blocks

Before we touch encryption, let's get familiar with three operations that power everything. Try changing the inputs and see what happens.

Modular Arithmetic — what is the remainder when you divide?

Modular Exponentiation — raise to a power, then find remainder.

Generating Keys

Choose two prime numbers. We'll derive your public and private keys from them — step by step.

Encrypting a Message

Enter a message (as a number smaller than N). Watch it lock itself with your public key.

Decrypting a Message

Now watch the private key reverse the process — recovering the original message.