Are your emails secured? No? OpenPGP will help you to secure your emails and files and I am going to show you how to do that.

We use Gmail every day and yes, we all use a password to login into our account but chances are high that your email account could be compromised and all your data could be easily read, because it’s just plain text.

Why don’t we add one more layer on top of your email messages too? Even if someone gets access to your main door you can still stop them from accessing your confidential emails.

Have you heard the word cryptography? If you haven’t, this article will make it a piece of a cake for you :-)

Gpg4win (a.k.a GnuPG4Win) is the tool that is going to help you encrypt files and messages. Before we proceed further on how to install and use GnuPG4Win lets just take a look at the below picture to know how it came into existence.


Note: The above diagram was created using a website called I have written a separate article here about these online tools that can help you to generate diagrams for free. Do check them out later.

As you can see from the above diagram GnuPG4Win is an encryption program created based on OpenPGP standard.

Understanding Public Key and Private Key

Before we proceed further it’s important to understand the concept of public key and private key:

Public Key will help you to create a secret message, share your public key to your friend so that he can send secret messages to you.

Private Key will help you to read and create secret messages and should never be shared with anyone.

How to install and Create Keys in Gpg4win

You can download Gpg4win full version (29 MB) or a light version (13 MB) from here and install it on your machine.

  • Once you have installed Gpg4win, run the GPA (GNU Privacy Assistant) key management tool from your start menu.
  • When you run the program for the first time, you will be prompted to create a new Private Key.
  • Click Generate Key now button and enter your name and a valid email address in the subsequent screens.
  • Leave the Create backup copy radio button checked and click Forward.
  • In the pin-entry dialog you will be asked to enter a pass-phrase, provide a strong pass-phrase so that the quality indicator reaches 100%


  • Finally you will be prompted to back up the secret key, just save it in a safe place.

Export Your Public Key

So now that you have a fair understanding of what public and private keys are, let’s just see how we can export the public key separately. Why should we export the public key? Because that’s the only way your friend can send you secret messages.

In the GPA window your newly created key will be available. Now select the key, right click and click on Export Keys.

Exported Public Key

Save the file and open it with any text editor and you can see your public key in it. This is the key that you need to send it your friend.

Exchange Secret Messages or Files Using Public Key

Now that you have exchanged your public key all you need to do now is to wait for a secret message from your friend. Why wait for one? Why don’t you send one?

  • To send a secret message to your friend you need his public key, so make sure you have that.
  • Now in the GPA program click on Import Keys from the Keys menu.
  • Select the public key that you got from your friend and import it.
  • The Gpg4win when installed would have created shell extensions for your context menu. So right click on any file and click Sign and encrypt.

Sign and Encrypt

  • Kleopatra – the certificate manager will launch and display a wizard. In the first screen, just leave the settings as it is and proceed to the next screen.
  • Choose your friend’s public key that you had imported earlier, add it and click Encrypt. That’s it you have now encrypted a secret file for your friend. Just send the file to your friend and he can decrypt it using his private key.
  • This entire process is technically called Asymmetric Encryption.

Add Mymail-Crypt to Chrome Browser

You can also add the Chrome extension Mymail-Crypt to your Chrome Browser which will integrate encryption and decryption option within Gmail itself.

Mymail-Crypt is powered by OpenPGP.js a work in progress project that implements OpenPGP standard. Below are the steps that can help you to use this extension within Chrome for Gmail.

  • Sign out of your Gmail Account.
  • Add the Mymail-Crypt extension to Chrome.
  • Once it is added go to Tools -> Extensions or directly type chrome://extensions/ in the browser URL.
  • Click on Options under Mymail-Crypt extension.
  • Go to friend’s keys tab and click insert public key and import your friend’s key.
  • Login into your Gmail Account and compose a new message.
  • In the To address type your friend’s email id and enter the secret message that you want to send.
  • Now click Encrypt and you will see that the message is encrypted.Hit Send.

Encrypted Gmail Message

  • Your friend can now decrypt it via GPA tool or using Mymail-Crypt extension.

Firefox Fanatics can try WebPG for Mozilla add-on but I haven’t personally tried it.

Sounds easy? Confused or Lost? Just let me know if you are not able to get this working, I will be more than happy to help you out.