Member-only story
In this blog, we will explore how can we encrypt and decrypt files using GPG.
GPG (GNU Privacy Guard) is a free encryption software which is compliant with OpenPGP Standard. This is used to encrypt the secrets and share it with anyone.
We will learn how to use PGP encryption to send encrypted messages to anyone.
How to do the setup
- Download software from here
- Click on the exe file, install it with all default settings
- Generate the keypair
Once installation is complete, below screen will come

Click on New Key Pair — you can provide any random values.
Provide the passphrase — This is required to decrypt/import any file.



Store the keypair on your machine by selecting an option “Make a Backup of your keypair”. This will store two files, one is private key and one is public key.
Private key must not be shared by anyone else. Public Key can be shared with anyone so that they can share the secrets in an encrypted form.
How to share secrets
Now we will see how we can share the secrets with anyone. For ex- My colleague ask me for the database password then how can I share it in a secure way
Steps :
- Import the public key of the user
Click on Import — select the public key of the user which he has provided. It is recommended that he provides the public key as a file instead of copying the text via email/slack etc
You will see the pop up with message “Import is completed successfully.