Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

Faculty of Technology and Engineering

Devang Patel Institute of Advanced Technology and Research


Department of Computer Science & Engineering
Date: 14 / 03 / 2024

Laboratory Manual
Academic Year : 2023-24 Semester : 6
Course code : CS361 Course name : Cryptography & Network Security
Name : Purvam Seat Number : 21DCS099
Prajapati
(Softcopy to be prepared for this and to be submitted on teams)

Practical – 6

Aim: Implement GPG for windows. (Implement file encryption and decryption)

 To encrypt and decrypt file, we will have to launch KLEOPATRA and for that we need
to follow the following steps.

1. Install GPG for Windows:


Before installing Kleopatra, you need to have GPG installed on your Windows system.
Follow the steps outlined in the previous response to download and install GPG for
Windows.

2. Download the Gpg4win Installer:


Kleopatra is included as part of the Gpg4win suite, which provides a graphical interface for
managing GPG keys and cryptographic operations on Windows. Visit the Gpg4win website
to download the installer: https://www.gpg4win.org/download.html.

3. Choose the Version:


On the download page, you'll see the latest version of Gpg4win available for download.
Choose the appropriate version based on your system architecture (32-bit or 64-bit) and click
on the download link.

4. Run the Installer:


Once the download is complete, locate the downloaded installer file (usually a .exe file) and
double-click on it to run the installer.

5. Follow the Installation Wizard:


The Gpg4win installation wizard will guide you through the installation process. Follow the
on-screen instructions to install Gpg4win on your Windows system. You can typically accept
the default settings unless you have specific preferences.

6. Select Components:
During the installation process, you'll be prompted to select which components of Gpg4win
you want to install. Make sure to select "Kleopatra" along with any other components you
may want to install.

7. Complete the Installation:


After the installation process is complete, you may need to restart your computer for the
changes to take effect. Once restarted, Kleopatra should be installed and ready to use on your
Windows system.

8. Launch Kleopatra:
You can launch Kleopatra from the Start menu or by searching for "Kleopatra" in the
Windows search bar. Once launched, you can use Kleopatra to manage your GPG keys,
perform encryption and decryption, and more.

 Now that we have se up Kleopatra, following are the steps to encrypt and decrypt the
files.

Encrypting a File with Kleopatra:


1. Launch Kleopatra:
Start by opening Kleopatra. You can usually find it in the Start menu or by searching for
"Kleopatra" in the Windows search bar.

2. Locate the "Encrypt Files" Option:


In Kleopatra, you'll typically find an option for encrypting files in the main window. It
may be labeled as "Encrypt Files" or something similar. Click on this option to begin the
encryption process.

3. Select the File to Encrypt:


After selecting the "Encrypt Files" option, you'll be prompted to choose the file you want
to encrypt. Use the file browser to locate and select the file you wish to encrypt.

4. Choose Recipients (Public Keys):


Next, you'll need to choose the recipients (public keys) for the encryption. If you have
imported public keys into Kleopatra previously, you can select them from the list.
Otherwise, you'll need to import the recipient's public key before proceeding.

5. Confirm Encryption Options:


Kleopatra may provide options for encryption settings, such as the encryption algorithm
and key size. Review these options and make any necessary adjustments according to
your preferences.

6. Initiate Encryption:
Once you've selected the file and recipients, and confirmed the encryption options,
proceed to initiate the encryption process. Kleopatra will encrypt the selected file using
the chosen public keys.

7. Save the Encrypted File:


After encryption is complete, Kleopatra will generate an encrypted version of the file.
You'll typically be prompted to choose a location to save the encrypted file. Select a
location and save the file.

Decrypting a File with Kleopatra:

1. Locate the "Decrypt/Verify Files" Option:


Look for an option in Kleopatra's main window labeled "Decrypt/Verify Files" or similar.
Click on this option to start the decryption process.

2. Select the Encrypted File:


After selecting the "Decrypt/Verify Files" option, you'll be prompted to choose the
encrypted file you want to decrypt. Use the file browser to locate and select the encrypted
file.

3. Enter Passphrase (if necessary):


If the encrypted file is encrypted using your private key, you'll be prompted to enter your
passphrase to unlock your private key.

4. Initiate Decryption:
Once you've selected the encrypted file and entered any necessary passphrases, proceed
to initiate the decryption process. Kleopatra will decrypt the file using the appropriate
private key.

5. Save the Decrypted File:


After decryption is complete, Kleopatra will generate a decrypted version of the file.
You'll typically be prompted to choose a location to save the decrypted file. Select a
location and save the file.
This is the public Key.

This is the Secret Key.

Encrypted Text File.

You might also like