{"id":2433,"date":"2023-03-12T18:41:00","date_gmt":"2023-03-12T13:11:00","guid":{"rendered":"https:\/\/smarttech101.com\/?p=2433"},"modified":"2023-03-12T18:41:05","modified_gmt":"2023-03-12T13:11:05","slug":"how-to-encrypt-and-sign-your-files-using-gpg","status":"publish","type":"post","link":"https:\/\/smarttech101.com\/how-to-encrypt-and-sign-your-files-using-gpg\/","title":{"rendered":"How to encrypt and Sign your files using GPG"},"content":{"rendered":"\n

GPG is used to encrypt and sign a file. In gpg, we have a key pair. Each key pair has one public and one secret (also known as private) key. <\/p>\n\n\n\n

Encryption<\/strong>: Public key is used to encrypt a message\/file. Now, to decrypt the encrypted message\/file, we need the corresponding private key. For example, Bob encrypts a massage\/file meant for Alice using Alice’s public key; now Alice can open it using her private key.<\/p>\n\n\n\n

\"public
Asymmetric encryption using gpg (source: Wikimedia)<\/figcaption><\/figure>\n\n\n\n

Signature: <\/strong>One can use his\/her private key to sign a message\/file. Now, another person can use the corresponding public key to verify the massage. For example, Alice signs a message with her private key. Using Alice’s public key, Bob can verify that Alice sent the message and that the message has not been modified.<\/p>\n\n\n\n

\"signature
Signature in gpg (source: Wikimedia)<\/figcaption><\/figure>\n\n\n\n

Table of Contents<\/h2>\n\n\n\n