HPUNIX Сайт о ОС и не только!

Глава Четырнадцать - GnuPG

31 декабря 2008 - unix
Глава Четырнадцать - GnuPG


  • gpg(1).

  • /usr/share/doc/gnupg/README.gz

    Глава Четырнадцать - GnuPG

  • GNU privacy handbook in /usr/share/doc/gnupg-doc/GNU_Privacy_Handbook/ (install gnupg-doc package)

14.1 Installing GnuPG

  1. # gpg --gen-key # generate a new key
  2. # gpg --gen-revoke my_user_ID # generate revoke key for my_user_ID
  3. # host -l pgp.net | grep www|less # figure out pgp keyservers
Глава Четырнадцать - GnuPG

Глава Четырнадцать - GnuPG
As of now, good keyservers are:

  1. keyserver wwwkeys.eu.pgp.net
  2. keyserver wwwkeys.pgp.net

Here one must be careful not to create more than Два sub-keys. If you do, keyservers on pgp.net will copt your key. Use the newer gnupg (>1.2.1-2) to handle these copted subkeys.

See http://fortytwo./hdbk//gpg/subkeys.

Also, only one keyserver can be specified in $HOME/.gnupg/options.

Unfortunately, the following does not work any more:

Глава Четырнадцать - GnuPG
  1. keyserver sear/hdbk/.keyserver.net
  2. keyserver pgp.ai.mit.edu

14.2 Using GnuPG

File handling:

  1. $ gpg [options] command [args]
  2. $ gpg {--armor|-a} {--sign|-s} file # sign file into a text file.asc
  3. $ gpg --clearsign file # clear-sign message
  4. $ gpg --clearsign --not-dash-escaped pat/hdbk/file # clear-sign pat/hdbk/file
  5. $ gpg --verify file # verify clear-signed file
  6. $ gpg -o file.sig {-b|--deta/hdbk/-sig} file # create deta/hdbk/ed signature
  7. $ gpg --verify file.sig file # verify file with file.sig
  8. $ gpg -o crypt_file {--recipient|-r} name {--encrypt|-e} file
  9. # public-key encryption intended for name
  10. $ gpg -o crypt_file {--symmetric|-c} file # symmetric encryption
  11. $ gpg -o file --decrypt crypt_file # decryption

14.3 Managing GnuPG

Key management:

Глава Четырнадцать - GnuPG
  1. $ gpg --edit-key user_ID # "help" for help, interactive
  2. $ gpg -o file --exports # export all keys to file
  3. $ gpg --imports file # import all keys from file
  4. $ gpg --send-keys user_ID # send key of user_ID to keyserver
  5. $ gpg --recv-keys user_ID # recv. key of user_ID from keyserver
  6. $ gpg --list-keys user_ID # list keys of user_ID
  7. $ gpg --list-sigs user_ID # list sig. of user_ID
  8. $ gpg --/hdbk/eck-sigs user_ID # /hdbk/eck sig. of user_ID
  9. $ gpg --fingerprint user_ID # /hdbk/eck fingerprint of user_ID
  10. $ gpg --list-sigs | grep '^sig' | grep '[User id not found]' \
  11. | awk '{print $2}' | sort -u | xargs gpg --recv-keys # get unknown keys
  12. # update keys for all unknown sigs.

st code:

  1. - No ownerst assigned / not yet calculated.
  2. e st calculation has failed.
  3. q Not enough information for calculation.
  4. n Never st this key.
  5. m Marginally sted.

  6. f Fully sted.
  7. u Ultimately sted.
Глава Четырнадцать - GnuPG

The following will upload my key "A8061F32" to multiple keyservers:

  1. $ for xx in us es cz de dk uk /hdbk/ net.uk earth.net.uk; \
  2. $ do gpg --keyserver wwwkeys.$xx.pgp.net --send-keys A8061F32; done
Глава Четырнадцать - GnuPG

14.4 Using GnuPG with applications

14.4.1 Using GnuPG with Mutt

Add the following to ~/.muttrc to keep a slow GnuPG from automatically starting, while allowing it to be used by typing `S' at the index menu.

  1. macro index S ":toggle pgp_verify_sig\n"
  2. set pgp_verify_sig=no

14.4.2 Using GnuPG with Vim

Add the contents of _vimrc obtained from the examples subdirectory into ~/.vimrc to run GnuPG transparently.


Osamu Aoki osamu#at#debian.org
Перевод Ильи В. Головко qref#at#yandex

Похожие статьи

  • Глава Восемь - Debian tips

    8.1 Booting the systemSee the LDP BootPrompt-HOWTOfor detailed information on the boot prompt. 8.1.1 "I forgot the root password!" (1)It is possible to boot a system and log on to the ro...

  • Глава Одиннадцать - Editors

    11.1 Popular editorsLinux offers many alternatives for console text editors. Among them: vim: Powerful and light BSD-heritage editor. VI iMproved. emacs: Ultimate and heavy GNU-heritage editor. RM...

  • Глава Тринадцать - Programming

    Do not use "test" as the name of an executable test file. test is a shell built-in. 13.1 Where to startReferences: Documents and examples under /usr/share/doc/packageUnix / Programming I...

  • Глава Двенадцать - Version Control Systems

    12.1 Concurrent Versions System (CVS)/hdbk/eck /usr/share/doc/cvs/html-cvsclient, /usr/share/doc/cvs/html-info, /usr/share/doc/cvsbookwith lynx orn info cvs and man cvsfor detailed information. 12...

  • Глава Семь - The Linux kernel under Debian

    Debian has its own method of recompiling the kernel and related modules. See also Debian и ядро, раздел 2.7. 7.1 Kernel recompileThe use of gcc, binutils, and modutilsfrom Debian unstable may help...

Рейтинг: +12 Голосов: 259 1868 просмотров
Комментарии (0)

Нет комментариев. Ваш будет первым!

Найти на сайте: параметры поиска

Windows 7

Среда Windows 7 на первых порах кажется весьма непривычной для многих.

Windows 8

Если резюмировать все выступления Microsoft на конференции Build 2013.

Windows XP

Если Windows не может корректно завершить работу, в большинстве случаев это

Windows Vista

Если к вашему компьютеру подключено сразу несколько мониторов, и вы регулярно...