1 The GNU Privacy Guard 2
2 =========================
6 GnuPG 1.9 is the future version of GnuPG; it is based on the gnupg-1.3
7 code and the previous newpg package. It will eventually lead to a
8 GnuPG 2.0 release. Note that GnuPG 1.3 and 1.9 are not always in sync
9 and thus features and bug fixes done in 1.3 are not necessary
16 GnuPG 1.9 depends on the following packages:
18 libgpg-error (ftp://ftp.gnupg.org/gcrypt/alpha/libgpg-error/)
19 libgcrypt (ftp://ftp.gnupg.org/gcrypt/alpha/libgcrypt/)
20 libassuan (ftp://ftp.gnupg.org/gcrypt/alpha/libassuan/)
21 libksba (ftp://ftp.gnupg.org/gcrypt/alpha/libksba/)
23 You also need the pinentry package for most function of GnupG; however
24 it is not a build requirement. pinentry is available at
25 ftp://ftp.gnupg.org/gcrypt/pinentry/ .
27 You should get the latest versions of course, the GnuPG configure
28 script complains if a version is not sufficient.
30 After building and installing the above packages in the order as given
31 above, you may now continue with GnupG installation (you may also just
32 try to build GnuPG to see whether your already installed versions are
35 As with all packages, you just have to do
41 (Before doing install you might need to become root.)
43 If everything succeeds, you have a working GnuPG with support for
44 S/MIME and smartcards. Note that there is no binary gpg but a gpg2 so
45 that this package won't confict with a GnuPG 1.2 or1.3
46 installation. gpg2 behaves just like gpg and it is possible to symlink
47 oto gpg if you want to use gpg 1.9.
49 In case of problem please ask on gpa-dev@gnupg.org for advise. Note
50 that this release is only expected to build on GNU and *BSD systems.
52 A texinfo manual named `gnupg.info' will get installed. Some commands
53 and options given below. See also the section `SMARTCARD INTRO'.
64 Read information about the private keys from the smartcard and
65 import the certificates from there.
69 Export all certificates stored in the Keybox or those specified on
70 the command line. When using --armor a few informational lines are
71 prepended before each block.
79 Show information pertaining smartcards implementing the OpenPGP
84 Offers a menu to change the PIN of OpenPGP smartcards and to reset
89 Offers a menu to change any data object on the card and to generate
101 Using N of -2 includes all certificate except for the Root cert,
102 -1 includes all certs, 0 does not include any certs, 1 includes only
103 the signers cert (this is the default) and all other positives
104 values include up to N certs starting with the signer cert.
106 --policy-file <filename>
108 Chnage the deault name of the policy file
110 --enable-policy-checks
111 --disable-policy-checks
113 By default policy checks are enabled. These options may be used to
119 By default the CRL checks are enabled and the DirMngr is used to
120 check for revoked certificates. The disable option is most useful
121 with a off-line connection to suppres this check.
123 --agent-program <path_to_agent_program>
125 Specify an agent program to be used for secret key operations. The
126 default value is "../agent/gpg-agent". This is only used as a
127 fallback when the envrionment varaibale GPG_AGENT_INFO is not set or
128 a running agent can't be connected.
130 --dirmngr-program <path_to_dirmgr_program>
132 Specify a dirmngr program to be used for CRL checks. The default
133 value is "/usr/sbin/dirmngr". This is only used as a fallback when
134 the environment varaibale DIRMNGR_INFO is not set or a running
135 dirmngr can't be connected.
139 Don't print the warning "no secure memory"
143 Create PEM ecoded output. Default is binary output.
147 Create Base-64 encoded output; i.e. PEM without the header lines.
151 Assume the input data is PEM encoded. Default is to autodetect the
152 encoding but this is may fail.
156 Assume the input data is plain base-64 encoded.
160 Assume the input data is binary encoded.
164 Run in server mode. This is used by GPGME to control gpgsm. See
165 the assuan specification regarding gpgsm about the used protocol.
166 Some options are ignored in server mode.
168 --local-user <user_id>
170 Set the user to be used for signing. The default is the first
171 secret key found in the database.
175 Displays extra information with the --list-keys commands. Especially
176 a line tagged "grp" is printed which tells you the keygrip of a
177 key. This is string is for example used as the filename of the
185 --pinentry-program <path_to_pinentry_program>
187 Specify the PINentry program. The default value is
188 "<prefix>/bin/pinentry" so you most likely want to specify it.
192 Tell the pinentry not to grab keybourd and mouse. You most likely
193 want to give this option during testing and development to avoid
194 lockups in case of bugs.
200 --ctapi-driver <libraryname>
202 The default for Scdaemon is to use the PC/SC API currently provided
203 by libpcsclite.so. As an alternative the ctAPI can be used by
204 specify this option with the appropriate driver name
205 (e.g. libtowitoko.so).
207 --reader-port <portname>
209 This specifies the port of the chipcard reader. For PC/SC this is
210 currently ignored and the first PC/SC reader is used. For the
211 ctAPI, a number must be specified (the default is 32768 for the
216 Disable the integrated support for CCID compliant readers. This
217 allows to fall back to one of the other drivers even if the internal
218 CCID driver can handle the reader. Note, that CCID support is only
219 available if libusb was available at build time.
225 The default home directory is ~/.gnupg. It can be changed by
226 either the --homedir option or by seting the environment variable
227 GNUPGHOME. This is a list of files usually found in this directory:
231 Options for gpgsm. Options are the same as the command line
232 options but don't enter the leading dashes and give arguments
233 without an equal sign. Blank lines and lines starting with a
234 hash mark as the first non whitye space character are ignored.
238 Options for gpg-agent
242 Options for scdaemon.
246 Options for the DirMngr which is not part of this package and
247 the option file wilol most likely be moved to /etc
251 Options for gpg. Note that old versions of gpg use the
252 filename `options' instead of `gpg.conf'.
256 Options for gpg; tried before gpg.conf
261 A list of allowed CA policies. This file should give the
262 object identifiers of the policies line by line. Empty lines
263 and lines startung with a hash mark are ignored.
271 A list of trusted certificates usually maintained by
272 gpg-agent. It can however be edited manually. The file will
273 be created automagically with some explaining comments.
277 Used internally for keeping the state of the RNG over
282 The database file with the certificates.
286 The database file with the OpenPGP public keys. This will
287 eventually be merged with pubring.kbx
291 The database file with the OpenPGP secret keys. This will be
292 removed when gpg is changed to make use of the gpg-agent.
297 Directory holding the private keys maintained by gpg-agent.
298 For detailed info see agent/keyformat.txt. Note that there is
299 a helper tool gpg-protect-tool which may be used to protect or
300 unprotect keys. This is however nothing a user should care
307 Here is a list of directories with source files:
309 jnlib/ utility functions
311 g10/ the gpg program here called gpg2
312 sm/ the gpgsm program
314 scd/ the smartcard daemon
319 HOW TO SPECIFY A USER ID
320 ========================
322 Due to the way X.509 certificates are made up we need a few new ways
323 to specify a certificate (aka key in OpenPGP). In addition to the
324 ways a user ID can be specified with gpg, I have implemented 3 new
325 modes for gpgsm, here is the entire list of ways to specify a key:
329 This format is deducded from the length of the string and its
330 content or "0x" prefix. For use with OpenPGP a exclamation mark may
331 be appended to force use of the specified (sub)key.
333 As with v34 OpenPGP keys, the keyID of an X509 certificate are the
334 low 64 bits of the SHA-1 fingerprint. The use of keyIDs is just a
335 shortcut, for all automated processing the fingerprint should be
352 This is format is deduced from the length of the string and its
353 content or "0x" prefix. Note, that only the 20 byte fingerprint is
354 used with GPGSM (SHA-1 hash of the certificate). For use with
355 OpenPGP a exclamation mark may be appended to force use of the
360 1234343434343434C434343434343434
361 123434343434343C3434343434343734349A3434
362 0E12343434343434343434EAB3484343434343434
363 0xE12343434343434343434EAB3484343434343434
365 * Exact match on OpenPGP user ID
367 This is denoted by a leading equal sign. It does not make much
372 =Heinrich Heine <heinrichh@uni-duesseldorf.de>
374 * Exact match on an email address.
376 This is indicated by enclosing the email address in the usual way
377 with left and right angles
381 <heinrichh@uni-duesseldorf.de>
385 All words must match exactly (not case sensitive) but can appear in
386 any order in the user ID or a subjects name. Words are any
387 sequences of letters, digits, the underscore and all characters
392 +Heinrich Heine duesseldorf
394 * [NEW] Exact match by subject's DN
396 This is indicated by a leading slash, directly followed by the
397 rfc2253 encoded DN of the subject. Note that you can't use the
398 string printed by "gpgsm --list-keys" because that one as been
399 reordered and modified for better readability; use --with-colons to
400 print the raw (but standard escaped) rfc2253 string
404 /CN=Heinrich Heine,O=Poets,L=Paris,C=FR
406 * [NEW] Excact match by issuer's DN
408 This is indicated by a leading hash mark, directly followed by a
409 slash and then directly followed by the rfc2253 encoded DN of the
410 issuer. This should return the Root cert of the issuer. See note
415 #/CN=Root Cert,O=Poets,L=Paris,C=FR
417 * [NEW] Exact match by serial number and subject's DN
419 This is indicated by a hash mark, followed by the hexadecmal
420 representation of the serial number, the followed by a slahs and
421 the RFC2253 encoded DN of the issuer. See note above.
425 #4F03/CN=Root Cert,O=Poets,L=Paris,C=FR
429 By case insensitive substring matching. This is the default mode
430 but applications may want to explicitly indicate this by putting
431 the asterisk in front.
439 Please note that we have reused the hash mark indentifier which was
440 used in old GnuPG versions to indicate the so called local-id. It is
441 not anymore used and there should be no conflict when used with X.509
444 Using the rfc2253 format of DNs has the drawback that it is not
445 possible to map them back to the original encoding, however we don't
446 have to do this, because our key database stores this encoding as meta
449 Some of the search modes are not yet implemented ;-)
452 HOW TO IMPORT A PRIVATE KEY
453 ===========================
454 There is some limited support to import a private key from a PKCS-12
457 gpgsm --import foo.p12
459 This require that the gpg-agent is running.
462 HOW TO EXPORT A PRIVATE KEY
463 ===========================
464 There is also limited support to export a private key in PKCS-12
465 format. However the certificate is not stored and there is no MAC applied.
467 gpgsm --call-protect-tool --p12-export foo.key >foo.p12
473 GPG, the OpenPGP part of GnuPG, supports the OpenPGP smartcard
474 (surprise!); see http://g10code.com/p-card.html.
476 [Fixme: We need to explain this further]
479 GPGSM, the CMS (S/MIME) part of GnuPG, supports two kinds of
480 smartcards. The most flexible way is to use PKCS#15 compliant cards,
481 however you must have build GnuPG with support for the OpenSC library.
482 The build process automagically detects the presence of this library
483 and will include support for these cards.
485 The other card we currently support is the Telesec NetKey card with
486 the NKS 2.0 card application.
488 Before GPGSM can make use of a new card it must gather some
489 information, like the card's serial number, the public keys and the
490 certificates stored on the card. Thus for a new card you need to run
495 once. This is also a good test to see whether your card reader is
496 properly installed. See below in case of error. Once this has been
497 done you may use the keys stored on the card in the same way you use
498 keys stored on the disk. gpgsm automagically knows whether a card is
499 required and will pop up the pinentry to ask you to insert the
502 For selecting the driver, see the options of scdaemon. A useful
503 debugging flag is "--debug 2048" showing the communication between
504 scdaemon and the reader.
506 [fixme: write more stuff]