This is from our write up, but I just wanted to include it here in case you missed it. This will save a bunch of time on the computations.

# Making RSA Computations Easier

As mentioned in class, performing the encryption and decryption computations can be very tedious and time consuming. In the real world, one would be able to rely on computers for these computations. The way our group computed the values shown in the examples was using Mathematica.

Here are the functions we may need for the home work:

## PowerMod[a,b,m]

This computes $a^b \mod m$, which will come in handy for computing $P_i^e \mod m$ during encryption and $C_i^d \mod m$ during decryption.

For example to solve $(220)^{17} \mod 1147$, you type

`PowerMod[220,17,1147]`

And the result should be 611.

## PowerMod[a,-1,m]

This is really the same function as the previous one with setting b=-1. This function will be used to solve for the multiplicative inverse of a modulo m. For example, to solve for $d$ in $17d\equiv 1 \mod 1147$, you type

`PowerMod[17,-1,1147]`

And the result should be 953, as in our example.