<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) 0
correct (y/n)? Y
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) <heinrichh@duesseldorf.de>"
Real name: Gerhard Mourani
Email address: gmourani@videotron.ca
Comment: [Press Enter]
You selected this USER-ID:
"Gerhard Mourani <gmourani@videotron.ca>"
Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? o
You need a Passphrase to protect your secret key.
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.
Новая пара ключей (общедоступный и личный) успешно созданы в домашнем каталоге пользователя root (~/root).
Импортирование ключей.
Как только мы создали нашу пару ключей, мы можем начать добавлять в нашу публичную базу ключей все ключи, которые мы получили от третьих лиц, чтобы в будущем использовать их для шифрования и опознания связи.
Для импортирования публичных ключей в базу данных ключей используйте команду:
[root@deep /]# gpg --import <file>
Например:
[root@deep /]# gpg --import redhat2.asc
gpg: key DB42A60E: public key imported
gpg: /root/.gnupg/trustdb.gpg: trustdb created
gpg: Total number processed: 1
gpg: imported: 1
Вышеприведенная команда будет добавлять все новые ключи в базу данных и будет обновлять все уже существующие ключи. Важно заметить, что GnuPG не импортирует не самоподписанные (self-signed) ключи. В вышеприведенном примере мы импортируем файл “redhat.asc”, содержащий публичный ключ компании Red Hat Linux, взятый с Интернет сайта Red Hat.
Подписание ключей.