Encrypt a message
Suppose you want to send a secure message to Bob. You can do that by encrypting your message with Bob's public key, which is available to all (i.e., it's public).
For our purposes, we will have Bob's public key consist of two numbers: 7 and 143.
Enter a message below, along with the two parts of Bob's public key. The program will:
- Separate the characters of your message using commas.
- Convert the characters into ASCII format.
- Encrypt the characters using the public key. We are using modular exponentiation to do the encryption. Here is an explainer, if you are interested.