## On the Subject of the RSA Cipher

Hill Cipher 2.0

A 6 letter word has been encrypted in to 6 numbers in the middle of the screen. Submit this word to disarm the module.

Above these 6 numbers are 2 more numbers labeled N and E. Below that is a flashing cursor that will input anything you type with the keyboard up to 6 letters. The green circular button will submit your input while the red circular button will clear all input made.

Follow the instructions below to get your decrypted word.

### Step 1: Get λ(N)

First thing to do is to figure out the 2 prime numbers that were multiplied together to get N. Below is the list of primes used in this module:

11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97

Once, you figure out the 2 primes, then calculate λ(N) using the equation below:

λ(N) = ((P1 - 1) * (P2 - 1)) / GCD(P1 - 1, P2 - 1)

The Greatest Common Denominator (GCD) between 2 numbers can be found using these set of instructions:

- Take the greater of the 2 numbers and modulo it by the smaller number.
- Then take the right number of the previous operation and modulo it by the result of the previous step.
- Repeat step 2 until the result is 0.
- The right number of the operation when the result is 0 is the GCD of the 2 numbers.

#### Example

N = 1643

P1 = 31

P2 = 53

Calculating GCD

52 % 30 = 22

30 % 22 = 8

22 % 8 = 6

8 % 6 = 2

6 % 2 = 0

GCD(52, 30) = 2

λ(N) = (52 * 30) / 2 = 780