Key Generation Mini-Howto
Versão em Português
This is an attempt of a strong key generation mini-howto for GnuPG. I am assuming you already have GnuPG installed and has some knowledge of what you're doing.
bash$ cat >>~/.gnupg/gpg.conf <<EOF
personal-digest-preferences SHA256
cert-digest-algo SHA256
default-preference-list SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed
EOF
bash$ gpg --expert --gen-key
gpg (GnuPG) 1.4.6; Copyright (C) 2006 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)
(3) DSA (set your own capabilities)
(5) RSA (sign only)
(7) RSA (set your own capabilities)
Your selection? 7 <===================================== Choose 7 here!
Possible actions for a RSA key: Sign Certify Encrypt Authenticate
Current allowed actions: Sign Certify Encrypt
(S) Toggle the sign capability
(E) Toggle the encrypt capability
(A) Toggle the authenticate capability
(Q) Finished
Your selection? A <===================================== Add "Authenticate"
Possible actions for a RSA key: Sign Certify Encrypt Authenticate
Current allowed actions: Sign Certify Encrypt Authenticate
(S) Toggle the sign capability
(E) Toggle the encrypt capability
(A) Toggle the authenticate capability
(Q) Finished
Your selection? Q <===================================== You're done
RSA keys may be between 1024 and 4096 bits long.
What keysize do you want? (2048) <===================== hit <enter> to choose 2048. If you wish, make it larger!
Requested keysize is 2048 bits
Please specify how long the key should be valid.
0 = key does not expire
<n> = key expires in n days
<n>w = key expires in n weeks
<n>m = key expires in n months
<n>y = key expires in n years
Key is valid for? (0) <================================ hit <enter> and your key will never expire!
Is this correct? (y/N) y <============================= YES!!!!
You need a user ID to identify your key; the software constructs the user ID
from the Real Name, Comment and Email Address in this form:
"Heinrich Heine (Der Dichter) <heinrichh@duesseldorf.de>"
Real name: Test User <================================= Type your Name
Email address: test@example.com <====================== Type your email address
Comment: DONT USE <==================================== Any comment
You selected this USER-ID:
"Test User (DONT USE) <test@example.com>"
Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? <== Enter "O"
You need a Passphrase to protect your secret key.
Enter passphrase: <==================================== Enter your passphrase (a confirmation will be asked)
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.
.....+++++
...+++++
gpg: key XXXXXXXX marked as ultimately trusted
public and secret key created and signed.
gpg: checking the trustdb
gpg: 3 marginal(s) needed, 1 complete(s) needed, classic trust model
gpg: depth: 0 valid: 8 signed: 48 trust: 0-, 0q, 0n, 0m, 0f, 8u
gpg: depth: 1 valid: 48 signed: 42 trust: 46-, 0q, 0n, 0m, 2f, 0u
gpg: depth: 2 valid: 4 signed: 11 trust: 4-, 0q, 0n, 0m, 0f, 0u
gpg: next trustdb check due at 2009-07-17
pub 2048R/XXXXXXXX 2009-05-27
Key fingerprint = XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX
uid Test User (DONT USE) <test@example.com>
bash$
--
PabloLorenzzoni - 27 May 2009