# MN502 Laboratory 4 Manual: Basic Cryptography Assessment Answer

MN502 Network Security

Laboratory 4 Manual: Basic Cryptography

Description:

This manual is for running experiments on cryptography.

• In the first experiment, you will use a Java applet on a website observe how RSA encrypts and decrypts.
• In the second experiment, you will install a command line hash generators to compare hash digest values.

Pre-work:

1. Launch Virtual Box
2. Launch your Win8.1 VM
3. Do all your exercises in the VM

Exercises 1: Running an RSA Cipher Demonstration

The steps for encryption using RSA can be illustrated in a Java applet on a website. In this project, you will observe how RSA encrypts and decrypts. It is recommended that you review the section earlier in this chapter regarding the steps in the RSA function.

1. Use your web browser to go to people.cs.pitt.edu/~kirk/cs1501/notes/rsademo/

Read the information about the demonstration.

1. Click key generation page.
2. Change the first prime number (P) to 7.
3. Change the second prime number (Q) to 5.
4. Click Proceed.
5. Read the information in the popup screen and record the necessary numbers. Close the screen when finished.
6. Click Encryption Page.
7. Next to Enter Alice’ Exponent key, E: enter 5 as the key value from the previous screen.
8. Under Enter Alice’ N Value: enter 35
9. Click Encrypt. Read the message and record the values. Close the screen when finished.
10. Click Decryption Page
11. Next to Enter the encrypted message enter 1.
12. Next to Enter your N value: enter 35.
13. Next to Enter your private key, D: enter 5
14. Click Proceed. Note that 1 has been decrypted to A
15. Close all windows.

Exercises 2: Installing GUI Hash Generators and Comparing Hashes

In this project, you will download different GUI hash generators to compare hash digest values.

1. Create a Microsoft Word document with the contents Now is the time for all good men to come to the aid of their country.
2. Save the document as Country1.docx on the desktop or in the directory specified by your tutor.
3. Now make a single change to Country1.docx removing the period at the end of the sentence so it says Now is the time for all good men to come to the aid of their country and then save the document as Country2.docx in the same directory.
4. Close the document and Microsoft Word.
5. Use your web browser to go to  hashcalc.soft112.com
6. Click Download
7. Click Download 1
8. Click External Download 1
9. Follow the default instruction to install HashCalc
10. Launch HashCalc to display the HashCalc window as seen as Figure 1
11. In addition to the hash algorithms selected by default check the box next to the following hash algorithms to add them: MD5, SHA256, SHA384, SHA512 and MD2
12. Click the file explore button next to Data:
13. Navigate to the document Country1.docx
14. Click Open.
15. Review the different digests generated. If necessary, expand the size of the window.
16. Click the file explore button next to Data
17. Navigate to the document Country2.docx
18. Click open
19. In the HashCalc window click calculate.

Figure 1: Hash calculator

## Answer

For solution, connect with our online professionals!