RSA Encryption

In this document, we have a very simple implementation of the RSA encryption algorithm. We define an encoding scheme, as well as the neccessary functions to encrypt and decrypt data. We then go through a few examples of how to use the code.

Code Definitions

Run this cell to define all neccessary functions. Then go to the examples.

Example 1

Here is our first example, we define some simple (and definitely not secure) keys, and then encrypt and decrypt a simple message.

Example 2

Here we go through a more complicated example, encrypting our message with much larger primes.