What's the difference between PGP signature and encryption?
Signature is used to verify the identity of the data generator, and encryption is used to prevent data leakage and tampering; The public key is public, the private key is in the hands of the key generator, and the data encrypted with the public key can only be decrypted with the private key; The data signed by the private key can only be decrypted by the public key (authentication, such as A generating a pair of keys, B obtaining the public key from A, B encrypting the data with the public key, and only A can decrypt the original data with the private key; A encrypts (signs) a piece of data with a private key. After receiving this piece of data, if it can be decrypted with the public key obtained from A, B can determine that this piece of data was sent by A.)