Side:
First, generate a pair of keys:
Prompt whether to generate2048Key pairs in bytes:
The steps for generating a key pair are as follows:
PressO"Key to start generating the key pair:
I am prompted to add a password to the key pair:
Input2Times
Then, the key pair characters need to be captured by pressing the keyboard or moving the mouse:
After that, let's check the key pair:
The configuration file and information of the key pair can be stored in:
After the key is generated, We need to export the public key of the key: After the key is generated, there will be one more directoryPub. keyFile:
We send this public key to the remote host:
End B:
BThe client will receive the public key:
The client imports the public key to the local machine:
Import failed: it may be that the time is not synchronized:
Check whether the import is successful:
After the import is complete, I use the public keyPasswdFile encryption:
Encrypted Files are generated by default:
Send the file to Client:
Check whether the message is received:
A decryption:
Client A has a private key.
We will be prompted to enter the password of the key pair:
Then you can see the file: