Visits

[+/-]
Today:
Yesterday:
Day before yesterday:
346
517
481

+36
This week:
Last week:
Week before last week:
2205
2962
3860

-898

Last month:
Month before last month:
8463
15650
24339

-8689

Visitor Data

IP ADDRESS
38.107.179.212
-
Location
United States
-
Browser
Unknown Browser
-
Operating System
Unknown Operating System


   
Add to: JBookmarks Add to: Bookmarks.cc Add to: Digg Add to: Reddit Add to: Upchuckr Add to: StumbleUpon Add to: Slashdot Add to: Blogmarks Add to: Technorati Add to: Newsvine Add to: Blinkbits Add to: Smarking Add to: Spurl Add to: Google Information
Fundamentals of GPG Encryption (2)

GPG --  GnuPG

Reference: http://www.gnupg.org/documentation/faqs.html
http://codesorcery.net/mutt/mutt-gnupg-howto
http://www.gnupg.org/(en)/download/index.html
(SCRIPT 4) on following link:
http://prdownloads.sourceforge.net/souptonuts/README_common_script_commands.html?download


Generage key:

$ gpg --gen-key

Generate public key ID and fingerprint

$ gpg --fingerprint

Get a list of keys:

$ gpg --list-keys

pub  1024D/A11C1499 2004-07-15 Mike Chirico < This e-mail address is being protected from spambots. You need JavaScript enabled to view it >
sub  1024g/E1A3C2B3 2004-07-15

Encrypt

$ gpg -r Mike  --encrypt sample.txt

This will produce "sample.txt.asc", which is a binary file.  Note, I can use "Mike" because that's the
name on the list of keys. Again, it will be a binary file.

Encrypt using "ASCII-armored text"  (--armor), which is probably what you want when sending "in" the body of an
email, or some document.

$ gpg  -r Mike  --encrypt --armor sample.txt
or
$ gpg -r Mike -e -a sample.txt
or
$ gpg --output somefile.asc --armor -r Mike  --encrypt --armor sample.txt

The above 3 statements will still produce "sample.txt.asc", but look at it, or "$ cat sample.txt.asc" without
fear, since there are no binary characters. Yes, you could even compile a program "$ g++ -o test test.c" , then,
"$ gpg --output test.asc  -r Mike --encrypt --armor test". However, when decrypting make sure to pipe
the results.

$ gpg --decrypt test.asc > test

Export "public" key:

$ gpg --armor --export Mike > m1.asc

Signing the file "message.txt":

$ gpg --clearsign message.txt


Sending the key to the "key-server"

First, list the keys.

$ gpg --list-keys
/home/chirico/.gnupg/pubring.gpg
v------------------ Use this with "0x" in front -------
pub  1024D/A11C1499 2004-07-15 Mike Chirico  < This e-mail address is being protected from spambots. You need JavaScript enabled to view it >   |
sub  1024g/E1A3C2B3 2004-07-15                                        |
|
v----------------------------------------------------
$ gpg --send-keys 0xA11C1499

The above sends it to the keyserver defined in "/home/chirico/.gnupg/gpg.conf".  Other key servers:

wwwkeys.pgp.net
search.keyserver.net
pgp.ai.mit.edu

When you go to your user-group meetings, you need to bring 2 forms of ID, and
list your Key fingerprint. Shown below is the command for getting this fingerprint.

$ gpg --fingerprint This e-mail address is being protected from spambots. You need JavaScript enabled to view it
pub   1024D/A11C1499 2004-07-15
Key fingerprint = 9D7F C80D BB7B 4BAB CCA4  1BE9 9056 5BEC A11C 1499
uid   Mike Chirico (http://souptonuts.sourceforge.net/chirico/index.php) < This e-mail address is being protected from spambots. You need JavaScript enabled to view it >
sub   1024g/E1A3C2B3 2004-07-15


Receving keys:

The following will retrieve my This e-mail address is being protected from spambots. You need JavaScript enabled to view it key

$ gpg --recv-keys 0xA11C1499


Special Note: If you get the following error "GPG: Warning: Using Insecure Memory" , then,
" chmod 4755 /path/to/gpg"  to setuid(root) permissioins on the gpg binary.


NOTE: If using mutt, just before sending with the "y" option, hit "p" to sign or encrypt.

It's possible to create a gpg/pgp email from the command line. For a tutorial on this,
reference (SCRIPT 4) at the following link:
http://prdownloads.sourceforge.net/souptonuts/README_common_script_commands.html?download