Jiwang | PGP protocol experiment (mail encryption and decryption)

1. The purpose of the experiment

1. Understand the principle of the encryption tool PGP

2. Familiar with the simple configuration method of PGP


2. Experimental environment

Install PGP encryption software; the host operating system is Windows


3. Experimental principle

What is the principle of PGP encryption and decryption of mail?
To encrypt and decrypt the public and private keys locally, first generate a pair of keys by yourself. The public key can be placed on the PGP server for others to use the public key to encrypt when they send you emails. The private key is stored locally by itself. Similarly, if you send an email to someone, encrypt the file with his public key and send it to him. All data in the network is encrypted, such as DES algorithm.


Fourth, the experimental content

Use PGP software to encrypt and sign mail, etc.

1. Use PGP to create a key pair

A. Install PGP.

B. After the computer restarts, copy the "Registration Code" to "PGP LICENSE AUTHORIZATION", and enter an N-digit passcode in PASSPHASE.

C. Open "PGP DISK" and follow the steps to create a pair of key pairs.

D. You can also do the same for creating a key pair: open "PGP KEYS", select "KEYS" à "NEW KEYS" and follow the prompts.

2. Use PGP to encrypt and decrypt email encryption process

        Use the public key sent by a friend to encrypt the email, import the public key in "PGP KEYS" à "KEYS" à "IMPORT", and encrypt with this public key. First copy the email body to the clipboard, then click "Start" - "Programs" - "PGP" - "PGPMail" - "EnCRYPT&Sign", and then paste the contents of the clipboard into the letter, which is the encrypted ciphertext. Export the public key as a file with the ASC extension, send this file to a friend.


1. Use PGP to encrypt and decrypt emails

Encryption process: encrypt the email with the public key sent by a friend, import the public key in "PGP KEYS" à "KEYS" "IMPORT", and encrypt with this public key. First copy the email body to the clipboard, then click "Start" - "Programs" - "PGP" - "PGPMail" - "EnCRYPT&Sign", and then paste the contents of the clipboard into the letter, which is the encrypted ciphertext.

!](https://img-blog.csdnimg.cn/20201014234823469.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80NTA2ODI3OA==,size_16,color_FFFFFF,t_70#pic_center)

Decryption process: During decryption, copy the ciphertext sent by a friend to the clipboard, then click "DECRYPT&VERIFY" and enter the passcode.

2. Use PGP to sign and verify the signature (the process is the same as above)

3. Use PGP to encrypt and decrypt files

A. Right-click the file to be encrypted, select "PGP" - "EnCrypt", and select the path where the encrypted file is stored .

B. Double-click the PGP encrypted file, enter the private key and pass the phrase.


V. Summary of the experiment

Through this experiment, I understand the principle of the encryption tool PGP and I am familiar with the simple configuration method of PGP .

The principle of PGP encryption and decryption of mail is : local encryption and decryption of public and private keys, first generate a pair of keys by yourself. The public key can be placed on the PGP server for others to use the public key to encrypt when they send you emails. The private key is stored locally by itself. Similarly, if you send an email to someone, encrypt the file with his public key and send it to him. All data in the network is encrypted, such as DES algorithm.

The simple configuration method of PGP is what I showed in the experimental content, mainly using PGP software to encrypt and sign emails and the specific process of using PGP to encrypt and decrypt emails .

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325244133&siteId=291194637
PGP