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:
- Launch Virtual Box
- Launch your Win8.1 VM
- 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.
- Use your web browser to go to people.cs.pitt.edu/~kirk/cs1501/notes/rsademo/
Read the information about the demonstration.
- Click key generation page.
- Change the first prime number (P) to 7.
- Change the second prime number (Q) to 5.
- Click Proceed.
- Read the information in the popup screen and record the necessary numbers. Close the screen when finished.
- Click Encryption Page.
- Next to Enter Alice’ Exponent key, E: enter 5 as the key value from the previous screen.
- Under Enter Alice’ N Value: enter 35.
- Click Encrypt. Read the message and record the values. Close the screen when finished.
- Click Decryption Page.
- Next to Enter the encrypted message enter 1.
- Next to Enter your N value: enter 35.
- Next to Enter your private key, D: enter 5
- Click Proceed. Note that 1 has been decrypted to A.
- 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.
- Create a Microsoft Word document with the contents Now is the time for all good men to come to the aid of their country.
- Save the document as Country1.docx on the desktop or in the directory specified by your tutor.
- 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.
- Close the document and Microsoft Word.
- Use your web browser to go to hashcalc.soft112.com
- Click Download
- Click Download 1
- Click External Download 1
- Follow the default instruction to install HashCalc
- Launch HashCalc to display the HashCalc window as seen as Figure 1
- 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
- Click the file explore button next to Data:
- Navigate to the document Country1.docx
- Click Open.
- Review the different digests generated. If necessary, expand the size of the window.
- Click the file explore button next to Data
- Navigate to the document Country2.docx
- Click open
- In the HashCalc window click calculate.

Figure 1: Hash calculator