0% found this document useful (0 votes)
3 views

RSA-LAB1

The report details a laboratory activity focused on public key cryptography using the RSA cryptosystem, where participants created public/private key pairs and exchanged encrypted messages between two computers. It outlines the steps taken to set up secure file sharing, generate keys, and encrypt/decrypt messages, demonstrating the principles of RSA and its application in ensuring confidentiality, authenticity, and integrity of communications. The lab session emphasized the importance of digital signatures and the unique relationship between public and private keys in secure messaging.

Uploaded by

lucyteamelite
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

RSA-LAB1

The report details a laboratory activity focused on public key cryptography using the RSA cryptosystem, where participants created public/private key pairs and exchanged encrypted messages between two computers. It outlines the steps taken to set up secure file sharing, generate keys, and encrypt/decrypt messages, demonstrating the principles of RSA and its application in ensuring confidentiality, authenticity, and integrity of communications. The lab session emphasized the importance of digital signatures and the unique relationship between public and private keys in secure messaging.

Uploaded by

lucyteamelite
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Report on Communication Using Public Key Cryptography with the RSA Cryptosystem

INTRODUCTION

This report is based on a laboratory activity performed on communication using public key cryptography
with the RSA cryptosystem. The purpose of these task was to comprehend RSA principles, create pairs of
public and private key, and encipher and decipher messages back and forth between two computers
models, which were designated as PCa and PCb, using RSA key exchange. The exercise was performed
using CrypTool 1 software and a shared folder via a network drive or flash drive to simulate secure file
sharing.

Creating Splitting Access to Folders

In PCa, I went ahead and set up the folders by creating a PCAB folder that could be used for safe
communication when transferring classified documents.

1. While on the Desktop of PC a, I worked on the creation of a folder dubbed PCAB.

2. After this, I right clicked the folder, selected Properties and proceeded to click the Sharing tab.

3. If that was not enabled, I enabled sharing option “Just Enable Sharing”.

4. I then clicked on Share this Folder and left everything as it was.

5. Then I ticked the option for network users to be able to change and file.

On PCb:

1. My teammate (PCb) opened Windows Explorer and mapped the shared folder to a network
drive.

2. From the Tools menu, they selected Map Network Drive.

3. Drive Y: was selected, and the folder path \\192.168.1.101\PCAB was entered (IP address
provided by the instructor).

4. PCb was able to access the shared folder (Drive Y:) for file exchange.

B. Public/Private Key Pair (PCa)


I generated an RSA public/private key pair on PCa using CrypTool:

1. Opened CrypTool.

2. Went to Digital Signatures/PKI → PKI → Key Generation/Import.

3. Selected RSA.

4. Entered my user information (Lisa Rodriguez) and created a short PIN: 7094.

5. Clicked Generate new key pair.

• My public key was displayed, and the private key was securely stored and protected by the PIN.

• My key identifier: | Lisa] [Rodriguez[RSA-1024][1734431487|.

C. Exporting the Public Key (PCa)

To share my public key with my teammate:

1. In CrypTool, went to Digital Signatures/PKI → PKI → Key Display/Export.

2. Selected my public/private key pair.

3. Chose Export PSE (PKCS #12).

4. Entered my original PIN: 7094.

5. Created a new PIN for the PKCS#12 file: 1234.

6. Saved the exported public key file in the shared folder PCAB for my teammate to access.

D. Teammate’s Public Key (PCb)

On PCb, my teammate imported my public key:

1. Opened CrypTool and went to Digital Signatures/PKI → PKI → Key Generation/Import.

2. Selected PKCS #12 Import.

3. Accessed the shared folder and selected my public key file.

4. Entered the PKCS#12 PIN I shared: 1234.

5. Created a new PSE PIN: 1101.

6. They were able to encrypt messages for me.

E. Encrypting a Text Document (PCb)

My teammate encrypted a message using RSA encryption and my public key:

1. In CrypTool, they created a new text file and typed a secret message:

"Hi Teammate, I have some confidential information to share with you."

1. From Crypt/Decrypt → Asymmetric Algorithms → RSA Encryption, they selected my public key.
2. They saved the file as Encrypted_Message_for_Stalon.txt in the shared folder PCAB.

F. Decrypting the File (PCa)

On PCa, I decrypted the message using my private key:

1. Opened the encrypted file Encrypted_Message_for_Stalon.txt in CrypTool.

2. Went to Crypt/Decrypt → Asymmetric Algorithms → RSA Decryption.

3. Selected my private key and entered my original PIN: 7094.

4. Decrypted the file and read the message:

"Hi Teammate, I have some confidential information to share with you."

Review Question

1. Using Different Public Keys to Decrypt

I've attempted to decrypt the encrypted message using different public keys-that of my team members-
but unfortunately failed. This failure arises due to the nature of RSA encryption. It asserts that-

• the message encrypted with a particular public key can only be decrypted by that key's matching
private key as decryption.

• For any unrelated public or private key, one lands with gibberish or failure.

This way, one can ensure that only a person having the right private key, which usually the recipient only
has, can decryption.

2. Showing Identity of a Member Who Sends Messages (My Teammate).

Here, R.S.A is used to prove the identity of a message sender using this method, that is by my teammate.
The process is:

1. My teammate signs with that message:

• My teammate creates a hash of the message (say, "Confidential data for our project") using a hashing
algorithm.

• They encrypt this hash with their private key to obtain a digital signature.

• The message is now sent to me along with the signature.

2. Now I check my teammate:

 I decrypt the digital signature with the help of my teammate's public key so that the original
message would get yielded from my teammate.
 I will generate a new hash using the received message through the same hashing algorithm, and
if that new hash is the same as the decrypted hash from the signature, it will confirm-
Integrity: that the message was not tampered with during transmission.

Authenticity: because only my teammate's private key could have created the valid digital signature that
I was able to decrypt with their public key.

However, the message hashed by the private key of my teammate would enable me to verify his or her
identity by checking the signature against the public key.

This all assures me that my teammate cannot simultaneously deny ever having made the signature, yet
the message stays intact for the duration of the communication.

For example:

If I send a message to my teammate with a digital signature, he/she can check my identity by decrypting
the signature with my public key.

Conclusion

This lab session provided practical exposure to the use of RSA cryptography in secure communication.
Key generation, public/private key pairs, export and import, encryption and decryption were all explored
in an effort to understand possible roles for RSA in the process of confidentiality. Even here, one
discovers the use of digital signatures as an example of how RSA further secures message authenticity
and integrity, which are critical for security in applications such as email encryption and online
transactions.

You might also like