Add pgp/gpg encryption to gmail

This article will show you how to get started with gpg encryption and how to use it with gmail.


Installing gpg and generating a set of keys
First, lets install some necessary packages

sudo aptitude install gnupg gnupg-agent xsel

Now, generate your public and private keys with the following command

gpg --gen-key

Fill in your name, email address and a comment when required. It is a good idea to keep these accurate as people will use these when looking for your public key online. Finally, copy your public key it to the clipboard

gpg --export -a username | xsel --clipboard

where you replace username with your actual username. Now point your browser to MIT’s public key server. Click the mouse in the Submit a key field, and press CRTL-v to paste the public key. Finally, press the Submit this key to the keyserver!-button. Now, all your friends can find your public without any trouble.

Installing FireGPG
Launch Firefox and click this link to install FireGPG. You might have to restart firefox for the changes to take effect

Adding your friends to FireGPG’s address book
Suppose you have a friend by the name of John Doe and you wish to send him an encrypted message. To do this, you must first get his public key such that you can encode a message that only he can unencode with his private key. Once again, point your browser to MIT’s public key server. This time, type in the name John Doe in the Search String:-field and press Search to find any public keys matching this name. As you will no doubt find out, a great number of persons go by the name of John Doe so to identify your friend the comment (eg. his website’s address) will come in handy. Once you have found the John Doe you were looking for, click the KeyID link. This will take you to a page showing his public key probably looking similar to mine, shown below. Once the key is displayed, highlight it and select FireGPG->Import. You have now added John Doe to your FireGPG’s address book.

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: PGP Key Server 0.9.6

mQGiBEitk2oRBACn29bCdSH+vOuwSGuyrxfq3012sKmLTQlHtg6rus82FlbiI61E
JEyxTeJ6hSO2zr0Rihgl7JkJhSNkns8P1+o65w8+JaIhUcwr63TWJlOisfUGKlA3
RTWBy5uVve4lPXGZl6CfBx/+4T4L7BuVVRv3cKh2lEtmjMM6yq0sZkd+rwCgqv1Y
7sLEXO3iuMCHRhi/2C5XRvkD/RtQ3HV1aMfbJn41DFTvkB1e7DWJuu9ogXnaRMVa
lvOumtlP4q5m/XCRJJZXFPGH5ZqTYaswTTX41G7vpU9CxvSogMK40m3pJx3bfIDC
c7bA++3SQXidIRfVFrp3h8sEtOMXFdm1dHeh5HebowaBxX2MmCvqyLxHEE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Y9RPfkr2wcFlE5JFTopTBEMs1gSkFObyFaeduBwgbAAMFD/0Y
k1HIDG6/yPP/muHT5PbiVvPCLvMWm2uvYvPgWJXDCO8quKNDUnfQGQdvs8Q4M5hp
raKYvZiD9b9Z+ILXSqsn+7g7JQNwt6XtX+6mhbQp+X3L30/GDVC4wQNX37naFn7/
Q+3lUVgWjYJWp9CsZRKmFsNVU6BYUnvzi2jqSfumDG5yVhaMkceMP2YAiBEHDp+o
aZLDcFcALHSXd1b8iz77vwqvt02raM04NkZzx21fZQXRNS5ZQXi4HUFzku3LJXB4
LamZ8e6mBnL/nv9nIfIaq6XhyIcVqSHhGf9oxrhMsUnFIp86MPLIeguxBFdRxXGo
YJVhpgCMP1G01+9N1w805DLinzZGhwA8oGZ//9pTXrOYFnrO3A/aRcOX69qvmzzg
gDu7RG+X/e75K1WtF3ewmEQAIxqyrrG5tnJZcxZr7RtbRkaNhFyuXr250UHiSIYm
PVAAWIlPCoVlBy5Zpl1Pr4LcMtSyyM5R7HfqFIhsT8HjF7W+zgEd+WkDDYie4OnC
tFCO9Z4gvgNKLVOfCRNoVWsKS2Y89mF3MJZ3F51Mh6MH3e4yaP4pTU7EEZf2tP+A
grdkyN6boKE7N6uUW0kpWanJB8QMUskLA58um1aLbn3gTyxcpTCaVNZMCA8IlAIi
bsM9ofS2TIBFTamOhz60BaKvMr+zkCL/FQ3ihyCMsohJBBgRAgAJBQJIrZPCAhsM
AAoJEHm+3GkFleREU5QAniSL9zS31hLw0m52gNZcn0Ut88RkAKCgM65p2WylNTWF
XtZMfCOQlUo7fg==
=FPVk
-----END PGP PUBLIC KEY BLOCK-----

Using FireGPG to send encrypt emails
Point you browser to gmail.com and log into your account as usual. When you compose a new email, you will see some changes to the user interface, as shown in the figure below.


When sending emails you should choose the highlighted option sign, encrypt and send. One you click this button you will be presented with two dialogs. In the first dialog, select the person from the list you wish to send the encrypted message to. In the second dialog, select you own key.

Using FireGPG to decrypt emails
Suppose, that you have recieved an email from your friend John Doe with text somewhat similar to that shown below. To decrypt the message, simply highlight the text, right click and select FireGPG->Decrypt. Once you have entered your password, the decrypted message will appear in a separate window.

-----BEGIN PGP MESSAGE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: http://getfiregpg.org

hQQOA2TTWaKokFZgEA/8DqJX0Vt6BNhZGbDdFacQ25lkIgmX56zGbGjpagFwkizN
ImoayAaEQTkBt+tWHj0EreTNG0TYZJBYAIKaHCSCMeCL2B2/zC7wXWKYjoiTc6Uf
jfStDsBeFn/VchR//xhbk9CgupjuQBtJvljESakST3FpNtCJmnQPQ9iB3pL5VZka
3SrE1SNSjTXuwi2zaKm1gAsyZJJDSv6mdTWHU1FuTOm/ZkMPlbc1HKX8YoR1eK03
8CJLRX17AiKBFbestIhSDqPG1cCmsVCN3SlhQHBcmvMaQZQuchLTJ/fyPUOXcUS4
q0+losKYUaltpfprAxuDivpGL4oS3ZrALi8wDmOnS2G07bkYzA7KAr4E3yd8HDLg
sQIxTnxTA89wSSL1hefsn2HKaEbPAjJuAO76ueaWfOQBHSbLDswEyzctAMY3VBt4
dT8Rao2RNIVa7B9j4F0ndbvfvHMojyv0q/DPrlguC6PMP3BjpPLKeUoKv0WbUME5
yz0uYgJXSENTcgDTth5EEWtB8rBGuGQ28liuY39DZzkp16ESkRlFSNd4/fUrBLm/
ytBW8eujRARoNLdW/cTnwk+RIctKLwEb+BFeRZCbabhdZsCGODqrnExhMOD0/43o
FqA7epz+caVz1pvGABd2HZMG+i0DWfTxeMoXPdpw9DN5jcBplmSt2DhckHFLHw4P
/3Vgi1qTaiQJxXxHpMvFr8EESTy6mTpC0QOa7hbOKROJDhj+v2W8Tmv0ffqzac+e
jcn9O9IsbKGpWeFPJe92mNWG19Zhwy0fxrvOS1z0NKKt56ZNssQ5qsJm0GSLo11n
OmVU/mEbtudLT5bzZ7UW07kAOiWjK1D5fTe9JYG8uXOh9P+4cperUHxjnmqlycw0
2gkrZrzJrB8vFijQutUzknj/1y0mgcs4mAU4Gqfr8dNMthExFB6/jcfDX4U430pQ
uRs0Wn89S/I0SYbESfGbudXiwKDJlzNQnHDZaO5Tn/utJQj1GJcDfpb57c4X4Ti7
UpJbd1P/XzXYlL/ZgVZQyPbJtLWiiYT33bPsItq+lgcaIxDR5nnNa2SbhkwAvpp/
XFswTALoKWni6vwwq5rEE92Rbtq/+UqzY92na2ZxK2JdlHy+5y1n7WrTX5qc4o0x
ysUMzFtfVEtVqTRzl9RNzBRgVXjp6E48cjLy+Ca5ChamOmT9pS5ieE221v1smvoX
u/51pJPRqGeDdJmEKRIMVch7vOL+sVmnEPWezYwA2XDz+Q7+pd8NswXg6Gy7vrhx
gyifo2ad+ROzSvqIvZWqouBDO7jQ7CsjVSU/ZMVzgxaDXD56PSi6io4VityBqSgG
B9uveq9VdsaPTCWlAYGjOKir7vISRE0oTh1N603WLJrW0mkBdp2pjJdLTCFnbjue
AsSMPsEOjip7/nxiLN1/pWV6I6gmjGyEEhIPLcsMLsATWMz92Su6gKHsVI6+ddl3
RORps9CQ+hh1xX1UeQIR0TBozX5kXihP658Hl07xjVqdE+oT0TGZ3UBK9ME=
=LK0U
-----END PGP MESSAGE-----

Further reading
FireGPG’s website
GnuPG’s website

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google

19 thoughts on “Add pgp/gpg encryption to gmail

  1. I don’t normally post, but this reminded me of the recent news with the CEO of Craigslist wanting for an apology from the South Carolina attorney general. Always something different with Craigslist and events in the news.

  2. Pingback: Add pgp/gpg encryption to gmail | 小石头工作室 . Stone Studio .

  3. I rarely comment but I figured I needed to do it now after visiting your site so frequently. We readers need to show appreciation! Keep up the good work!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>