Tuesday, December 28, 2010

How to send gpg encrypted emails ?

1) Install Thunderbird mail client
2) Install the add on enigmail
3) send encrypted/signed mails via thunderbird

Sunday, December 26, 2010

How to delete a gpg key pair ?

How to revoke a gpg key ?

1) generate the revocation certificate

gpg --gen-revoke [Key-ID] > [ filename ]


2) Revoke the key

import revocation certificate created in the previous step

gpg --import [ filename ]



Exporting & Importing gpg keys:-

exporting public keys:-

gpg --export -a Keyname > keyfile


exporting a private key:-

gpg --export-secret-keys -a keyname/keyid >> keyfile


Importing keys:-

gpg --import Keyfile


NB:- -a used for creating ASCII version

How to generate finger print of your gpg keys ?

gpg --fingerprint keyname/keyid

why finger print your key ?

1) to generate the hash of the key
2) used to verify the key


Ex:-


zodiac@ubuntu:~$ gpg --list-keys
/home/zodiac/.gnupg/pubring.gpg
-------------------------------
pub 2048R/C6E7D2CB 2010-12-19
uid celsius thomas (celsius A.T)
sub 2048R/2D8037DF 2010-12-19


zodiac@ubuntu:~$ gpg --fingerprint C6E7D2CB
pub 2048R/C6E7D2CB 2010-12-19
Key fingerprint = 5562 3B1A C9F8 D210 6580 987D 3C1B 9A3F C6E7 D2CB
uid celsius thomas (celsius A.T)
sub 2048R/2D8037DF 2010-12-19

Asymmetric Key Encryption & Decryption using gpg

Encryption:-

gpg -a -r ( recepient-keyID ) --encrypt ( filename )

-a is ascii option ,it is needed only if you need encrypted file in ascii format

Decryption:-

gpg --decrypt ( encrypted-file )

Monday, December 20, 2010

Using GIT to Manage Config Files:-

A good use of GIT is to manage the configuration files in a GNU/Linux system.

1) create a git repository in /etc
cd /etc ; git init
2)
git add .
git commit -am "Initial commit. /etc now under version control"


3) From now on every time you modify a file you can do

git add
git commit -m "Description of the change to "


4) To see your pending changes do: git status

5)if some files are to be removed, run git add -u .