RSA ENCRYPTION LAB!!!

PLEASE, CAN SOMEONE HELP ME WITH THIS? I KNOW THIS LAB SAID TOWORK WITH PARTNERS, BUT I’M SO DEAD LATE. JUST PICK YOUR OWN PHRASEAND HELP ME PLEASE!!! THANK YOU!!

THE rsa.xls IS BELOW

IS 3413 Lab 4: RSA Encryption In this lab, you will be working with a simplified – and not very secure – version of one of the most popular public-key systems: the RSA public-key encryption system. Like all public-key systems, the keys are derived using a “trapdoor” operation – an operation that is easy to do but difficult to “undo.” In RSA, this operation is the multiplication of two large prime numbers: it is easy and fast to multiply the two numbers together, but it is significantly more difficult and time consuming to factor the resulting number back into its prime components. In this lab experience, you will be using relatively small primes (only three digits) to see how this system works. To explore this system in more depth, you will be exchanging encrypted messages with a partner. Choose your partner now. 1. Launch Microsoft Excel and open the spreadsheet rsa.xls. You may see a warning message informing you that the workbook contains macros. Since you will not need these macros to use the workbook (they are left over from an older and less efficient version of this lab), click on the Disable Macros button. 2. This spreadsheet makes use of some specialized functions that are not part of the standard function set in Microsoft Excel. However, they are included in an extra set of functions called the Analysis Toolpak. Consult https://support.office.com/en- us/article/load-the-analysis-toolpak-in-excel-a63e598-cd6d-42e3-9317- 6b40ba1a66b4#Office Version=Windows for how to enable Analysis Toolpak in your Excel. 3. Click on the tab for the Key Selection worksheet. Use a random process to choose two different prime numbers p and q between 137 and 311 (displayed in a list in cells g5:115). Enter these primes in cells B6 and B7. Be sure that cells C6 and C7 both display the message “OK”. The spreadsheet automatically computes the modulus (the product p*q) in cell B8 and the Euler totient (the product (p-1)*(4-1)) in cell B9. Note that the Euler totient would be difficult to determine from the modulus by itself; one needs to know the two primes. Write your two primes, your modulus, and your Euler totient below: p: modulus: Euler totient: IS 3413 Lab 4: RSA Encryption 4. Choose a small number (no more that two digits) that has no factors (except 1) in common with the Euler totient. Enter this number as your public key and enter it in cell B15. If cell C15 displays the message Invalid Public Key, you need to select a different public key. When you have chosen a valid public key, the message OK will appear in cell C15. The spreadsheet will automatically compute your private key in cell B20. The private key is chosen so that (Public Key)*(Private key) leaves a remainder of one when divided by the Euler totient. (This would not be possible if the private had a factor other than 1 in common with the Euler totient.) Write your public and private keys below: Public key: Private key: 5. Once both you and your partner have each created a modulus and pair of keys, you are ready to exchange encrypted messages. Give your modulus and public key to your partner. Do not give your partner your private key or Euler totient. In return, your partner will give you her/his public key and modulus. 6. Click on the tab for the Encoding worksheet. Enter your partner’s modulus and public key in cells B6 and B7. Write these values below: Partner’s modulus: Partner’s public key: 7. Enter a message in cell B11. This message should consist of a string of fifteen or more CAPITAL LETTERS with no spaces or punctuation marks. The spreadsheet will encipher only the first fifteen letters of your message. Your message could be a short phrase or sentence, your mother’s name or your pet iguana’s name. For example, I used DONALDJOHNTRUMP and PLEASEHELPMENOW to test this spreadsheet. Note that a message to be enciphered is usually called plaintext. The enciphered form of the message is called the ciphertext. IS 3413 Lab 4: RSA Encryption 8. The enciphered form of the message (the ciphertext) should appear in cell B13. (This may take a few seconds.) The spreadsheet determines the ciphertext as follows: • Split the plaintext up into blocks of three letters (called trigraphs). Obtain a numeric representation for each letter based on its position in the alphabet (A-0, B 1, etc.). Compute a numeric code for each trigraph using the formula (First Letter Code) * 262 + (Second Letter Code) * 26+ (Third Letter code). For the mathematically inclined, this is interpreting each trigraph as a number in base twenty-six. Encipher each plaintext trigraph code by computing (Plaintext trigraph code) Public Key, dividing the result by the Modulus and taking the remainder. Convert each enciphered trigraph code into a quadragraph – a block of four letters – as follows: Divide the code by 263. The quotient is the code for the first letter of the quadragraph. The spreadsheet uses the remainder to get codes for the other three letters. Divide the remainder from the first step by 26″. The quotient is the code for the second letter. The spreadsheet uses the remainder to get the codes for the other two letters. Divide the remainder from the second step by 26. The quotient is the code for the third letter and the remainder is the code for the fourth letter. For the mathematically inclined, this quadragraph calculation determines the representation of the enciphered message as a four-digit number in base twenty-six (using the letters of the alphabet as our digits). Some of the details of this calculation appear in cells A16:K38 of the Encoding worksheet. Enter the plaintext and ciphertext below. Show the steps of the conversion process in the table. Plaintext: Plaintext Trigraph Trigraph Code Ciphertext Enciphered Code Quadragraph Ciphertext: 9. Give the ciphertext (but not the plaintext) to your partner. In return, your partner will give you a ciphertext message. Record the ciphertext message from your partner below. In the rest of this exercise, you will be deciphering this message. Ciphertext from partner: 10. Click on the tab for the Decoding worksheet. Enter your modulus and your private key in cells B6 and B7 of this worksheet. Enter the ciphertext you received from your partner as the “Encrypted Message” in cell B13. The deciphering process is similar to the enciphering process: • Split the ciphertext up into quadragraphs (instead of trigraphs). Obtain the numeric representation for each letter and compute a numeric code for each trigraph using the formula (First Letter Code) * 269 + (Second Letter Code) * 262 + (Third Letter Code) * 26 + (Fourth Letter Code). Encipher each ciphertext quadragraph code by computing (Ciphertext quadragraph code) Private Key, dividing the result by the Modulus and taking the remainder O View + 125% Zoom Key Selection rsa Ev. Tv Insert Table Chart Text Shape Media Comment Add Category Collabor Encoding Decoding RSA Public Key Coding: Key Selection Worksheet Prime number table. Select two different three-digit primes between 137 and 311 (see the list to the right) and enter them in cells B6 and B7. 149 163 OUT OF RANGE BOTH THE SAME First Prime: Second Prime: Your modulus is: Euler totient*: 193 137 151 167 181 197 223 233 241 263 277 139 157 173 191 199 227 237 251 269 281 239 257 Enter a one-or two-digit number in cell B15 as your public key (except 1). Enter a different key if cell C15 does not display “OK” 283 Public key: OK 293 307 311 The spreadsheet will display your private key in cell B20. (The calculation is carried out in colums AP through AV.) Private key**: *If p and q are two primes, the Euler totient of p*q is just (p-1)*(4-1) This expresses the mathematical heart of the private key calculation, as well as the heart of the encryption and decryption algorithms. ** The spreadsheet computes a private key that satisfies the following property: multiplying the public key by the private key, and dividing the product by the Euler totient leaves a remainder of 1. Key test: Public key * Private key: Remainder modulo totient: Show transcribed image text IS 3413 Lab 4: RSA Encryption In this lab, you will be working with a simplified – and not very secure – version of one of the most popular public-key systems: the RSA public-key encryption system. Like all public-key systems, the keys are derived using a “trapdoor” operation – an operation that is easy to do but difficult to “undo.” In RSA, this operation is the multiplication of two large prime numbers: it is easy and fast to multiply the two numbers together, but it is significantly more difficult and time consuming to factor the resulting number back into its prime components. In this lab experience, you will be using relatively small primes (only three digits) to see how this system works. To explore this system in more depth, you will be exchanging encrypted messages with a partner. Choose your partner now. 1. Launch Microsoft Excel and open the spreadsheet rsa.xls. You may see a warning message informing you that the workbook contains macros. Since you will not need these macros to use the workbook (they are left over from an older and less efficient version of this lab), click on the Disable Macros button. 2. This spreadsheet makes use of some specialized functions that are not part of the standard function set in Microsoft Excel. However, they are included in an extra set of functions called the Analysis Toolpak. Consult https://support.office.com/en- us/article/load-the-analysis-toolpak-in-excel-a63e598-cd6d-42e3-9317- 6b40ba1a66b4#Office Version=Windows for how to enable Analysis Toolpak in your Excel. 3. Click on the tab for the Key Selection worksheet. Use a random process to choose two different prime numbers p and q between 137 and 311 (displayed in a list in cells g5:115). Enter these primes in cells B6 and B7. Be sure that cells C6 and C7 both display the message “OK”. The spreadsheet automatically computes the modulus (the product p*q) in cell B8 and the Euler totient (the product (p-1)*(4-1)) in cell B9. Note that the Euler totient would be difficult to determine from the modulus by itself; one needs to know the two primes. Write your two primes, your modulus, and your Euler totient below: p: modulus: Euler totient:

IS 3413 Lab 4: RSA Encryption 4. Choose a small number (no more that two digits) that has no factors (except 1) in common with the Euler totient. Enter this number as your public key and enter it in cell B15. If cell C15 displays the message Invalid Public Key, you need to select a different public key. When you have chosen a valid public key, the message OK will appear in cell C15. The spreadsheet will automatically compute your private key in cell B20. The private key is chosen so that (Public Key)*(Private key) leaves a remainder of one when divided by the Euler totient. (This would not be possible if the private had a factor other than 1 in common with the Euler totient.) Write your public and private keys below: Public key: Private key: 5. Once both you and your partner have each created a modulus and pair of keys, you are ready to exchange encrypted messages. Give your modulus and public key to your partner. Do not give your partner your private key or Euler totient. In return, your partner will give you her/his public key and modulus. 6. Click on the tab for the Encoding worksheet. Enter your partner’s modulus and public key in cells B6 and B7. Write these values below: Partner’s modulus: Partner’s public key: 7. Enter a message in cell B11. This message should consist of a string of fifteen or more CAPITAL LETTERS with no spaces or punctuation marks. The spreadsheet will encipher only the first fifteen letters of your message. Your message could be a short phrase or sentence, your mother’s name or your pet iguana’s name. For example, I used DONALDJOHNTRUMP and PLEASEHELPMENOW to test this spreadsheet. Note that a message to be enciphered is usually called plaintext. The enciphered form of the message is called the ciphertext.

IS 3413 Lab 4: RSA Encryption 8. The enciphered form of the message (the ciphertext) should appear in cell B13. (This may take a few seconds.) The spreadsheet determines the ciphertext as follows: • Split the plaintext up into blocks of three letters (called trigraphs). Obtain a numeric representation for each letter based on its position in the alphabet (A-0, B 1, etc.). Compute a numeric code for each trigraph using the formula (First Letter Code) * 262 + (Second Letter Code) * 26+ (Third Letter code). For the mathematically inclined, this is interpreting each trigraph as a number in base twenty-six. Encipher each plaintext trigraph code by computing (Plaintext trigraph code) Public Key, dividing the result by the Modulus and taking the remainder. Convert each enciphered trigraph code into a quadragraph – a block of four letters – as follows: Divide the code by 263. The quotient is the code for the first letter of the quadragraph. The spreadsheet uses the remainder to get codes for the other three letters. Divide the remainder from the first step by 26″. The quotient is the code for the second letter. The spreadsheet uses the remainder to get the codes for the other two letters. Divide the remainder from the second step by 26. The quotient is the code for the third letter and the remainder is the code for the fourth letter. For the mathematically inclined, this quadragraph calculation determines the representation of the enciphered message as a four-digit number in base twenty-six (using the letters of the alphabet as our digits).

Some of the details of this calculation appear in cells A16:K38 of the Encoding worksheet. Enter the plaintext and ciphertext below. Show the steps of the conversion process in the table. Plaintext: Plaintext Trigraph Trigraph Code Ciphertext Enciphered Code Quadragraph Ciphertext: 9. Give the ciphertext (but not the plaintext) to your partner. In return, your partner will give you a ciphertext message. Record the ciphertext message from your partner below. In the rest of this exercise, you will be deciphering this message. Ciphertext from partner: 10. Click on the tab for the Decoding worksheet. Enter your modulus and your private key in cells B6 and B7 of this worksheet. Enter the ciphertext you received from your partner as the “Encrypted Message” in cell B13. The deciphering process is similar to the enciphering process: • Split the ciphertext up into quadragraphs (instead of trigraphs). Obtain the numeric representation for each letter and compute a numeric code for each trigraph using the formula (First Letter Code) * 269 + (Second Letter Code) * 262 + (Third Letter Code) * 26 + (Fourth Letter Code). Encipher each ciphertext quadragraph code by computing (Ciphertext quadragraph code) Private Key, dividing the result by the Modulus and taking the remainder

O View + 125% Zoom Key Selection rsa Ev. Tv Insert Table Chart Text Shape Media Comment Add Category Collabor Encoding Decoding RSA Public Key Coding: Key Selection Worksheet Prime number table. Select two different three-digit primes between 137 and 311 (see the list to the right) and enter them in cells B6 and B7. 149 163 OUT OF RANGE BOTH THE SAME First Prime: Second Prime: Your modulus is: Euler totient*: 193 137 151 167 181 197 223 233 241 263 277 139 157 173 191 199 227 237 251 269 281 239 257 Enter a one-or two-digit number in cell B15 as your public key (except 1). Enter a different key if cell C15 does not display “OK” 283 Public key: OK 293 307 311 The spreadsheet will display your private key in cell B20. (The calculation is carried out in colums AP through AV.) Private key**: *If p and q are two primes, the Euler totient of p*q is just (p-1)*(4-1) This expresses the mathematical heart of the private key calculation, as well as the heart of the encryption and decryption algorithms. ** The spreadsheet computes a private key that satisfies the following property: multiplying the public key by the private key, and dividing the product by the Euler totient leaves a remainder of 1. Key test: Public key * Private key: Remainder modulo totient:

## Expert Answer

Answer to RSA ENCRYPTION LAB!!! PLEASE, CAN SOMEONE HELP ME WITH THIS? I KNOW THIS LAB SAID TO WORK WITH PARTNERS, BUT I’M SO DEAD…