MozTips
- On Mozilla and Open Source Software
Recently Commented:
Previous Next

Posted on August 24, 2003 by jay_sheth. Edited: July 12, 2004 by jay_sheth2.

IV. Sending Encrypted Messages from Webmail to Thunderbird (Part IV. of V.)


I have a Hotmail account, from which I would like to send encrypted email to my primary email account.
Since I cannot send and receive Hotmail using Mozilla Thunderbird, there must be another way to preserve interoperability for the passage of encrypted emails between my primary email account and my Hotmail account.

If you are using GnuPG with your webmail account, you need to generate a private and public key (password) for that account using the command line prompt. To encrypt and decrypt emails, you can use the GPGshell tool mentioned in the Software Requirments article.

A Note of Caution:
When you install the GPGshell tool, make sure you choose C:\gnupg as the place where keys are stored. Otherwise the registry entry for the location of your keys will be changed, and Enigmail will no longer work within Thunderbird. (Fixing this requires manually editing the registry).

-- Follow these steps to create private and public keys for your Webmail account:

a) Type : gpg --gen-key and press enter

The above command generates a key pair interactively asking you
all kinds of questions like the type of key and so own, as is shown
below.

You should see the following after you typed the command above:

gpg (GnuPG) 1.2.2; Copyright (C) 2003 Free Software Foundation, Inc.
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions. See the file COPYING for details.

Please select what kind of key you want:
(1) DSA and ElGamal (default)
(2) DSA (sign only)
(5) RSA (sign only)

b) ** Choose (1) **

Your selection? 1
DSA keypair will have 1024 bits.
About to generate a new ELG-E keypair.
minimum keysize is 768 bits
default keysize is 1024 bits
highest suggested keysize is 2048 bits
What keysize do you want? (1024)

c)** Choose 2048 **

Requested keysize is 2048 bits
Please specify how long the key should be valid.
0 = key does not expire
= key expires in n days
w = key expires in n weeks
m = key expires in n months
y = key expires in n years
Key is valid for? (0)

d)** Choose 0 **

Key is valid for? (0) 0
Key does not expire at all
Is this correct (y/n)?

e)Type y at this point and press enter.

You need a User-ID to identify your key; the software constructs the user id
from Real Name, Comment and Email Address in this form:
"Heinrich Heine (Der Dichter) "

You are now required to enter your name and then press enter:

f)< Your Name >

Real name: Jayesh Sheth

Now enter your email address (and press enter):

g) <youremail [at] youremail.com>

Email address: jay****** [at] hotmail.com

Now enter a descriptive comment for the generated keys
(and press enter):

h) <my Webmail address>

Comment: Key for Jayesh's Hotmail Address

You selected this USER-ID:
"Jayesh Sheth (Key for Jayesh's Hotmail Address) "

Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit?

i) ** Press the letter O **

You need to enter a passphrase to secure this key

j) Enter Passphrase
Repeat Passphrase

We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.

public and secret key created and signed.
key marked as ultimately trusted.

** Your keys have now been created. Now export the public key.**
gpg --export -a > my-hotmail-key.asc

** No error message produced, hence it succeeded **

Confirm that the file you created exists by typing:
dir *.asc.

The file my-hotmail-key.asc should be listed there.

-- Encrypt a Message to be sent from the Webmail Account:

Now I will use GPGShell to encrypt a message which I will send from my Hotmail account to main account.

To do this, I will go to Start Menu, find the GPGshell menu, and choose the GPGtray program:

starting GPGtray

Right click on the green lock icon for GPGtray (in the system tray) and choose "View/Edit Clipboard".

starting GPGtray

Once the GPG "Clipboard" pops up, I begin to type my message:

gpg clipboard message

Now, once I have finished the message, I will encrypt and sign the message.

encrypt and sign message

Just as you would sign a check before you give it to someone, you can sign an encrypted email before you send it. In order to sign a message, you need to enter the sender's private password (key).

The screen below is confusing at first, but here's how you can make sense of it - The group of keys on top are public keys, and the group of keys on the bottom are private keys. You need to select the public key of the person to whom you are sending the email to first:

choose keys

Then I select the private key of my Hotmail account, because I am sending the message from that account, and because I need a private key to sign a message:

choose key

When I press "OK", the encrypted text looks like this:

encrypted text

I then copy and paste it into the Hotmail web interface:

hotmail

I then click the "Send" button, and check Thunderbird to see if the message has arrived.

Here is how it looks encrypted in Thunderbird:

encrypted in Thunderbird

I then enter the password which protects my private key, which is then used to decrypt the message.

enter pwd

The message looks like this in Thunderbird when it is decrypted:

decrypted in Thunderbird


Category: Email Encryption

Comment: Read 5 comment(s)

Link: Permanent Link