Alice Sends "go umass!" to Bob
A complete, step-by-step walkthrough of RSA encryption — from key generation to decryption — using a real message over a public channel where Eve is listening.
1 Bob Generates His Key Pair
Before anything else, Bob generates his keys. He does this once and keeps the private parts secret forever.
Bob's Key Generation
Choose two distinct primes. Bob does this secretly — Eve will never see them.
2 Bob Publishes His Public Key
Bob posts his public key online — a directory, a website, an email header. Everyone sees it. That's fine.
3 Alice Writes Her Message
Alice wants to send Bob a message. She looks up his public key and gets ready to encrypt.
Alice's plaintext message
4 Alice Converts the Message to Numbers
Computers work with numbers. Alice converts each character to its ASCII code — a universally agreed integer representation.
5 Alice Encrypts with Bob's Public Key
Alice uses Bob's public key (n, e) to encrypt each number. She applies the RSA formula to every character.
6 The Ciphertext Travels the Network
Alice sends the sequence of encrypted numbers. Eve intercepts every bit — but all she sees is a list of big integers that mean nothing without d.
7 Bob Decrypts with His Private Key
Bob receives the ciphertext. He applies his secret exponent d to each number — and gets back the original ASCII values.
8 Bob Reads the Message
+ Eve's Perspective
Eve intercepts everything on the wire. Let's tally what she knows vs. what she'd need to break RSA.