Debian Codegraph @

doc/DETAILS

raw
1 # doc/DETAILS -*- org -*-
2 #+TITLE: GnuPG Details
3 # Globally disable superscripts and subscripts:
4 #+OPTIONS: ^:{}
5 #+STARTUP: showall
6
7 # Note: This file uses org-mode; it should be easy to read as plain
8 # text but be aware of some markup peculiarities: Verbatim code is
9 # enclosed in #+begin-example, #+end-example blocks or marked by a
10 # colon as the first non-white-space character, words bracketed with
11 # equal signs indicate a monospace font, and the usual /italics/,
12 # *bold*, and _underline_ conventions are recognized.
13
14 This is the DETAILS file for GnuPG which specifies some internals and
15 parts of the external API for GPG and GPGSM.
16
17 * Format of the colon listings
18
19 The format is a based on colon separated record, each recods starts
20 with a tag string and extends to the end of the line. Here is an
21 example:
22 #+begin_example
23 $ gpg --with-colons --list-keys \
24 --with-fingerprint --with-fingerprint [email protected]
25 pub:f:1024:17:6C7EE1B8621CC013:899817715:1055898235::m:::scESC:
26 fpr:::::::::ECAF7590EB3443B5C7CF3ACB6C7EE1B8621CC013:
27 uid:f::::::::Werner Koch <[email protected]>:
28 uid:f::::::::Werner Koch <[email protected]>:
29 sub:f:1536:16:06AD222CADF6A6E1:919537416:1036177416:::::e:
30 fpr:::::::::CF8BCC4B18DE08FCD8A1615906AD222CADF6A6E1:
31 sub:r:1536:20:5CE086B5B5A18FF4:899817788:1025961788:::::esc:
32 fpr:::::::::AB059359A3B81F410FCFF97F5CE086B5B5A18FF4:
33 #+end_example
34
35 Note that new version of GnuPG or the use of certain options may add
36 new fields to the output. Parsers should not assume a limit on the
37 number of fields per line. Some fields are not yet used or only used
38 with certain record types; parsers should ignore fields they are not
39 aware of. New versions of GnuPG or the use of certain options may add
40 new types of records as well. Parsers should ignore any record whose
41 type they do not recognize for forward-compatibility.
42
43 The double =--with-fingerprint= prints the fingerprint for the subkeys
44 too. Old versions of gpg used a slightly different format and required
45 the use of the option =--fixed-list-mode= to conform to the format
46 described here.
47
48
49 ** Description of the fields
50 *** Field 1 - Type of record
51
52 - pub :: Public key
53 - crt :: X.509 certificate
54 - crs :: X.509 certificate and private key available
55 - sub :: Subkey (secondary key)
56 - sec :: Secret key
57 - ssb :: Secret subkey (secondary key)
58 - uid :: User id
59 - uat :: User attribute (same as user id except for field 10).
60 - sig :: Signature
61 - rev :: Revocation signature
62 - rvs :: Revocation signature (standalone) [since 2.2.9]
63 - fpr :: Fingerprint (fingerprint is in field 10)
64 - fp2 :: SHA-256 fingerprint (fingerprint is in field 10)
65 - pkd :: Public key data [*]
66 - grp :: Keygrip
67 - rvk :: Revocation key
68 - tfs :: TOFU statistics [*]
69 - tru :: Trust database information [*]
70 - spk :: Signature subpacket [*]
71 - cfg :: Configuration data [*]
72
73 Records marked with an asterisk are described at [[*Special%20field%20formats][*Special fields]].
74
75 *** Field 2 - Validity
76
77 This is a letter describing the computed validity of a key.
78 Currently this is a single letter, but be prepared that additional
79 information may follow in some future versions. Note that GnuPG <
80 2.1 does not set this field for secret key listings.
81
82 - o :: Unknown (this key is new to the system)
83 - i :: The key is invalid (e.g. due to a missing self-signature)
84 - d :: The key has been disabled
85 (deprecated - use the 'D' in field 12 instead)
86 - r :: The key has been revoked
87 - e :: The key has expired
88 - - :: Unknown validity (i.e. no value assigned)
89 - q :: Undefined validity. '-' and 'q' may safely be treated as
90 the same value for most purposes
91 - n :: The key is not valid
92 - m :: The key is marginal valid.
93 - f :: The key is fully valid
94 - u :: The key is ultimately valid. This often means that the
95 secret key is available, but any key may be marked as
96 ultimately valid.
97 - w :: The key has a well known private part.
98 - s :: The key has special validity. This means that it might be
99 self-signed and expected to be used in the STEED system.
100
101 If the validity information is given for a UID or UAT record, it
102 describes the validity calculated based on this user ID. If given
103 for a key record it describes the validity taken from the best
104 rated user ID.
105
106 For X.509 certificates a 'u' is used for a trusted root
107 certificate (i.e. for the trust anchor) and an 'f' for all other
108 valid certificates.
109
110 In "sig" records, this field may have one of these values as first
111 character:
112
113 - ! :: Signature is good.
114 - - :: Signature is bad.
115 - ? :: No public key to verify signature or public key is not usable.
116 - % :: Other error verifying a signature
117
118 More values may be added later. The field may also be empty if
119 gpg has been invoked in a non-checking mode (--list-sigs) or in a
120 fast checking mode. Since 2.2.7 '?' will also be printed by the
121 command --list-sigs if the key is not in the local keyring.
122
123 *** Field 3 - Key length
124
125 The length of key in bits.
126
127 *** Field 4 - Public key algorithm
128
129 The values here are those from the OpenPGP specs or if they are
130 greater than 255 the algorithm ids as used by Libgcrypt.
131
132 *** Field 5 - KeyID
133
134 This is the 64 bit keyid as specified by OpenPGP and the last 64
135 bit of the SHA-1 fingerprint of an X.509 certifciate.
136
137 *** Field 6 - Creation date
138
139 The creation date of the key is given in UTC. For UID and UAT
140 records, this is used for the self-signature date. Note that the
141 date is usually printed in seconds since epoch, however, we are
142 migrating to an ISO 8601 format (e.g. "19660205T091500"). This is
143 currently only relevant for X.509. A simple way to detect the new
144 format is to scan for the 'T'. Note that old versions of gpg
145 without using the =--fixed-list-mode= option used a "yyyy-mm-tt"
146 format.
147
148 *** Field 7 - Expiration date
149
150 Key or UID/UAT expiration date or empty if it does not expire.
151
152 *** Field 8 - Certificate S/N, UID hash, trust signature info
153
154 Used for serial number in crt records. For UID and UAT records,
155 this is a hash of the user ID contents used to represent that
156 exact user ID. For trust signatures, this is the trust depth
157 separated by the trust value by a space.
158
159 *** Field 9 - Ownertrust
160
161 This is only used on primary keys. This is a single letter, but
162 be prepared that additional information may follow in future
163 versions. For trust signatures with a regular expression, this is
164 the regular expression value, quoted as in field 10.
165
166 *** Field 10 - User-ID
167
168 The value is quoted like a C string to avoid control characters
169 (the colon is quoted =\x3a=). For a "pub" record this field is
170 not used on --fixed-list-mode. A UAT record puts the attribute
171 subpacket count here, a space, and then the total attribute
172 subpacket size. In gpgsm the issuer name comes here. The FPR and FP2
173 records store the fingerprints here. The fingerprint of a
174 revocation key is stored here.
175
176 *** Field 11 - Signature class
177
178 Signature class as per RFC-4880. This is a 2 digit hexnumber
179 followed by either the letter 'x' for an exportable signature or
180 the letter 'l' for a local-only signature. The class byte of an
181 revocation key is also given here, by a 2 digit hexnumber and
182 optionally followed by the letter 's' for the "sensitive"
183 flag. This field is not used for X.509.
184
185 "rev" and "rvs" may be followed by a comma and a 2 digit hexnumber
186 with the revocation reason.
187
188 *** Field 12 - Key capabilities
189
190 The defined capabilities are:
191
192 - e :: Encrypt
193 - s :: Sign
194 - c :: Certify
195 - a :: Authentication
196 - r :: Restricted encryption (subkey only use)
197 - t :: Timestamping
198 - g :: Group key
199 - ? :: Unknown capability
200
201 A key may have any combination of them in any order. In addition
202 to these letters, the primary key has uppercase versions of the
203 letters to denote the _usable_ capabilities of the entire key, and
204 a potential letter 'D' to indicate a disabled key.
205
206 *** Field 13 - Issuer certificate fingerprint or other info
207
208 Used in FPR records for S/MIME keys to store the fingerprint of
209 the issuer certificate. This is useful to build the certificate
210 path based on certificates stored in the local key database it is
211 only filled if the issuer certificate is available. The root has
212 been reached if this is the same string as the fingerprint. The
213 advantage of using this value is that it is guaranteed to have
214 been built by the same lookup algorithm as gpgsm uses.
215
216 For "uid" records this field lists the preferences in the same way
217 gpg's --edit-key menu does.
218
219 For "sig", "rev" and "rvs" records, this is the fingerprint of the
220 key that issued the signature. Note that this may only be filled
221 if the signature verified correctly. Note also that for various
222 technical reasons, this fingerprint is only available if
223 --no-sig-cache is used. Since 2.2.7 this field will also be set
224 if the key is missing but the signature carries an issuer
225 fingerprint as meta data.
226
227 *** Field 14 - Flag field
228
229 Flag field used in the --edit-key menu output
230
231 *** Field 15 - S/N of a token
232
233 Used in sec/ssb to print the serial number of a token (internal
234 protect mode 1002) or a '#' if that key is a simple stub (internal
235 protect mode 1001). If the option --with-secret is used and a
236 secret key is available for the public key, a '+' indicates this.
237
238 *** Field 16 - Hash algorithm
239
240 For sig records, this is the used hash algorithm. For example:
241 2 = SHA-1, 8 = SHA-256.
242
243 *** Field 17 - Curve name
244
245 For pub, sub, sec, ssb, crt, and crs records this field is used
246 for the ECC curve name.
247
248 *** Field 18 - Compliance flags
249
250 Space separated list of asserted compliance modes and
251 screening result for this key.
252
253 Valid values are:
254
255 - 8 :: The key is compliant with RFC4880bis
256 - 23 :: The key is compliant with compliance mode "de-vs".
257 - 6001 :: Screening hit on the ROCA vulnerability.
258
259 *** Field 19 - Last update
260
261 The timestamp of the last update of a key or user ID. The update
262 time of a key is defined a lookup of the key via its unique
263 identifier (fingerprint); the field is empty if not known. The
264 update time of a user ID is defined by a lookup of the key using a
265 trusted mapping from mail address to key.
266
267 *** Field 20 - Origin
268
269 The origin of the key or the user ID. This is an integer
270 optionally followed by a space and an URL. This goes along with
271 the previous field. The URL is quoted in C style. Note that the
272 origin is stored for a user ID as well as for the entire key. The
273 latter solves the cases where a key is updated by fingerprint and
274 and thus there is no way to know which user ID shall be used.
275
276 *** Field 21 - Comment
277
278 This is currently only used in "rev" and "rvs" records to carry
279 the the comment field of the recocation reason. The value is
280 quoted in C style.
281
282 ** Special fields
283
284 *** PKD - Public key data
285
286 If field 1 has the tag "pkd", a listing looks like this:
287 #+begin_example
288 pkd:0:1024:B665B1435F4C2 .... FF26ABB:
289 ! ! !-- the value
290 ! !------ for information number of bits in the value
291 !--------- index (eg. DSA goes from 0 to 3: p,q,g,y)
292 #+end_example
293
294 *** TFS - TOFU statistics
295
296 This field may follows a UID record to convey information about
297 the TOFU database. The information is similar to a TOFU_STATS
298 status line.
299
300 - Field 2 :: tfs record version (must be 1)
301 - Field 3 :: validity - A number with validity code.
302 - Field 4 :: signcount - The number of signatures seen.
303 - Field 5 :: encrcount - The number of encryptions done.
304 - Field 6 :: policy - A string with the policy
305 - Field 7 :: signture-first-seen - a timestamp or 0 if not known.
306 - Field 8 :: signature-most-recent-seen - a timestamp or 0 if not known.
307 - Field 9 :: encryption-first-done - a timestamp or 0 if not known.
308 - Field 10 :: encryption-most-recent-done - a timestamp or 0 if not known.
309
310 *** TRU - Trust database information
311 Example for a "tru" trust base record:
312 #+begin_example
313 tru:o:0:1166697654:1:3:1:5
314 #+end_example
315
316 - Field 2 :: Reason for staleness of trust. If this field is
317 empty, then the trustdb is not stale. This field may
318 have multiple flags in it:
319
320 - o :: Trustdb is old
321 - t :: Trustdb was built with a different trust model
322 than the one we are using now.
323
324 - Field 3 :: Trust model
325
326 - 0 :: Classic trust model, as used in PGP 2.x.
327 - 1 :: PGP trust model, as used in PGP 6 and later.
328 This is the same as the classic trust model,
329 except for the addition of trust signatures.
330
331 GnuPG before version 1.4 used the classic trust model
332 by default. GnuPG 1.4 and later uses the PGP trust
333 model by default.
334
335 - Field 4 :: Date trustdb was created in seconds since Epoch.
336 - Field 5 :: Date trustdb will expire in seconds since Epoch.
337 - Field 6 :: Number of marginally trusted users to introduce a new
338 key signer (gpg's option --marginals-needed).
339 - Field 7 :: Number of completely trusted users to introduce a new
340 key signer. (gpg's option --completes-needed)
341
342 - Field 8 :: Maximum depth of a certification chain. (gpg's option
343 --max-cert-depth)
344
345 *** SPK - Signature subpacket records
346
347 - Field 2 :: Subpacket number as per RFC-4880 and later.
348 - Field 3 :: Flags in hex. Currently the only two bits assigned
349 are 1, to indicate that the subpacket came from the
350 hashed part of the signature, and 2, to indicate the
351 subpacket was marked critical.
352 - Field 4 :: Length of the subpacket. Note that this is the
353 length of the subpacket, and not the length of field
354 5 below. Due to the need for %-encoding, the length
355 of field 5 may be up to 3x this value.
356 - Field 5 :: The subpacket data. Printable ASCII is shown as
357 ASCII, but other values are rendered as %XX where XX
358 is the hex value for the byte.
359
360 *** CFG - Configuration data
361
362 --list-config outputs information about the GnuPG configuration
363 for the benefit of frontends or other programs that call GnuPG.
364 There are several list-config items, all colon delimited like the
365 rest of the --with-colons output. The first field is always "cfg"
366 to indicate configuration information. The second field is one of
367 (with examples):
368
369 - version :: The third field contains the version of GnuPG.
370
371 : cfg:version:1.3.5
372
373 - pubkey :: The third field contains the public key algorithms
374 this version of GnuPG supports, separated by
375 semicolons. The algorithm numbers are as specified in
376 RFC-4880. Note that in contrast to the --status-fd
377 interface these are _not_ the Libgcrypt identifiers.
378 Using =pubkeyname= prints names instead of numbers.
379
380 : cfg:pubkey:1;2;3;16;17
381
382 - cipher :: The third field contains the symmetric ciphers this
383 version of GnuPG supports, separated by semicolons.
384 The cipher numbers are as specified in RFC-4880.
385 Using =ciphername= prints names instead of numbers.
386
387 : cfg:cipher:2;3;4;7;8;9;10
388
389 - digest :: The third field contains the digest (hash) algorithms
390 this version of GnuPG supports, separated by
391 semicolons. The digest numbers are as specified in
392 RFC-4880. Using =digestname= prints names instead of
393 numbers.
394
395 : cfg:digest:1;2;3;8;9;10
396
397 - compress :: The third field contains the compression algorithms
398 this version of GnuPG supports, separated by
399 semicolons. The algorithm numbers are as specified
400 in RFC-4880.
401
402 : cfg:compress:0;1;2;3
403
404 - group :: The third field contains the name of the group, and the
405 fourth field contains the values that the group expands
406 to, separated by semicolons.
407
408 For example, a group of:
409 : group mynames = paige 0x12345678 joe patti
410 would result in:
411 : cfg:group:mynames:patti;joe;0x12345678;paige
412
413 - curve :: The third field contains the curve names this version
414 of GnuPG supports, separated by semicolons. Using
415 =curveoid= prints OIDs instead of numbers.
416
417 : cfg:curve:ed25519;nistp256;nistp384;nistp521
418
419
420 * Format of the --status-fd output
421
422 Every line is prefixed with "[GNUPG:] ", followed by a keyword with
423 the type of the status line and some arguments depending on the type
424 (maybe none); an application should always be willing to ignore
425 unknown keywords that may be emitted by future versions of GnuPG.
426 Also, new versions of GnuPG may add arguments to existing keywords.
427 Any additional arguments should be ignored for forward-compatibility.
428
429 ** General status codes
430 *** NEWSIG [<signers_uid>]
431 Is issued right before a signature verification starts. This is
432 useful to define a context for parsing ERROR status messages.
433 If SIGNERS_UID is given and is not "-" this is the percent-escaped
434 value of the OpenPGP Signer's User ID signature sub-packet.
435
436 *** GOODSIG <long_keyid_or_fpr> <username>
437 The signature with the keyid is good. For each signature only one
438 of the codes GOODSIG, BADSIG, EXPSIG, EXPKEYSIG, REVKEYSIG or
439 ERRSIG will be emitted. In the past they were used as a marker
440 for a new signature; new code should use the NEWSIG status
441 instead. The username is the primary one encoded in UTF-8 and %XX
442 escaped. The fingerprint may be used instead of the long keyid if
443 it is available. This is the case with CMS and might eventually
444 also be available for OpenPGP.
445
446 *** EXPSIG <long_keyid_or_fpr> <username>
447 The signature with the keyid is good, but the signature is
448 expired. The username is the primary one encoded in UTF-8 and %XX
449 escaped. The fingerprint may be used instead of the long keyid if
450 it is available. This is the case with CMS and might eventually
451 also be available for OpenPGP.
452
453 *** EXPKEYSIG <long_keyid_or_fpr> <username>
454 The signature with the keyid is good, but the signature was made
455 by an expired key. The username is the primary one encoded in
456 UTF-8 and %XX escaped. The fingerprint may be used instead of the
457 long keyid if it is available. This is the case with CMS and
458 might eventually also be available for OpenPGP.
459
460 *** REVKEYSIG <long_keyid_or_fpr> <username>
461 The signature with the keyid is good, but the signature was made
462 by a revoked key. The username is the primary one encoded in UTF-8
463 and %XX escaped. The fingerprint may be used instead of the long
464 keyid if it is available. This is the case with CMS and might
465 eventually also beñ available for OpenPGP.
466
467 *** BADSIG <long_keyid_or_fpr> <username>
468 The signature with the keyid has not been verified okay. The
469 username is the primary one encoded in UTF-8 and %XX escaped. The
470 fingerprint may be used instead of the long keyid if it is
471 available. This is the case with CMS and might eventually also be
472 available for OpenPGP.
473
474 *** ERRSIG <keyid> <pkalgo> <hashalgo> <sig_class> <time> <rc> <fpr>
475 It was not possible to check the signature. This may be caused by
476 a missing public key or an unsupported algorithm. A RC of 4
477 indicates unknown algorithm, a 9 indicates a missing public
478 key. The other fields give more information about this signature.
479 sig_class is a 2 byte hex-value. The fingerprint may be used
480 instead of the long_keyid_or_fpr if it is available. This is the
481 case with gpgsm and might eventually also be available for
482 OpenPGP. The ERRSIG line has FPR filed which is only available
483 since 2.2.7; that FPR may either be missing or - if the signature
484 has no fingerprint as meta data.
485
486 Note, that TIME may either be the number of seconds since Epoch or
487 an ISO 8601 string. The latter can be detected by the presence of
488 the letter 'T'.
489
490 *** VALIDSIG <args>
491
492 The args are:
493
494 - <fingerprint_in_hex>
495 - <sig_creation_date>
496 - <sig-timestamp>
497 - <expire-timestamp>
498 - <sig-version>
499 - <reserved>
500 - <pubkey-algo>
501 - <hash-algo>
502 - <sig-class>
503 - [ <primary-key-fpr> ]
504
505 This status indicates that the signature is cryptographically
506 valid. This is similar to GOODSIG, EXPSIG, EXPKEYSIG, or REVKEYSIG
507 (depending on the date and the state of the signature and signing
508 key) but has the fingerprint as the argument. Multiple status
509 lines (VALIDSIG and the other appropriate *SIG status) are emitted
510 for a valid signature. All arguments here are on one long line.
511 sig-timestamp is the signature creation time in seconds after the
512 epoch. expire-timestamp is the signature expiration time in
513 seconds after the epoch (zero means "does not
514 expire"). sig-version, pubkey-algo, hash-algo, and sig-class (a
515 2-byte hex value) are all straight from the signature packet.
516 PRIMARY-KEY-FPR is the fingerprint of the primary key or identical
517 to the first argument. This is useful to get back to the primary
518 key without running gpg again for this purpose.
519
520 The primary-key-fpr parameter is used for OpenPGP and not
521 available for CMS signatures. The sig-version as well as the sig
522 class is not defined for CMS and currently set to 0 and 00.
523
524 Note, that *-TIMESTAMP may either be a number of seconds since
525 Epoch or an ISO 8601 string which can be detected by the presence
526 of the letter 'T'.
527
528 *** ASSERT_SIGNER <fingerprint>
529 This is emitted for the matching <fingerprint> when option
530 --assert-signer is used. The fingerprint is printed with
531 uppercase hex digits.
532
533 *** ASSERT_PUBKEY_ALGO <fingerprint> <state> <algostr>
534 This is emitted when option --assert-pubkey-algo is used and the
535 signing algorithms is accepted according to that list if state is
536 1 or denied if state is 0. The fingerprint is printed with
537 uppercase hex digits.
538
539 *** SIG_ID <radix64_string> <sig_creation_date> <sig-timestamp>
540 This is emitted only for signatures of class 0 or 1 which have
541 been verified okay. The string is a signature id and may be used
542 in applications to detect replay attacks of signed messages. Note
543 that only DLP algorithms give unique ids - others may yield
544 duplicated ones when they have been created in the same second.
545
546 Note, that SIG-TIMESTAMP may either be a number of seconds since
547 Epoch or an ISO 8601 string which can be detected by the presence
548 of the letter 'T'.
549
550 *** ENC_TO <long_keyid> <keytype> <keylength>
551 The message is encrypted to this LONG_KEYID. KEYTYPE is the
552 numerical value of the public key algorithm or 0 if it is not
553 known, KEYLENGTH is the length of the key or 0 if it is not known
554 (which is currently always the case). Gpg prints this line
555 always; Gpgsm only if it knows the certificate.
556
557 *** BEGIN_DECRYPTION
558 Mark the start of the actual decryption process. This is also
559 emitted when in --list-only mode.
560 *** END_DECRYPTION
561 Mark the end of the actual decryption process. This is also
562 emitted when in --list-only mode.
563 *** DECRYPTION_KEY <fpr> <fpr2> <otrust>
564 This line is emitted when a public key decryption succeeded in
565 providing a session key. <fpr> is the hexified fingerprint of the
566 actual key used for decryption. <fpr2> is the fingerprint of the
567 primary key. <otrust> is the letter with the ownertrust; this is
568 in general a 'u' which stands for ultimately trusted.
569 *** DECRYPTION_INFO <mdc_method> <sym_algo> [<aead_algo>]
570 Print information about the symmetric encryption algorithm and the
571 MDC method. This will be emitted even if the decryption fails.
572 For an AEAD algorithm AEAD_ALGO is not 0. GPGSM currently does
573 not print such a status.
574
575 *** DECRYPTION_FAILED
576 The symmetric decryption failed - one reason could be a wrong
577 passphrase for a symmetrical encrypted message.
578
579 *** DECRYPTION_OKAY
580 The decryption process succeeded. This means, that either the
581 correct secret key has been used or the correct passphrase for a
582 symmetric encrypted message was given. The program itself may
583 return an errorcode because it may not be possible to verify a
584 signature for some reasons.
585
586 *** SESSION_KEY <algo>:<hexdigits>
587 The session key used to decrypt the message. This message will
588 only be emitted if the option --show-session-key is used. The
589 format is suitable to be passed as value for the option
590 --override-session-key. It is not an indication that the
591 decryption will or has succeeded.
592
593 *** BEGIN_ENCRYPTION <mdc_method> <sym_algo> [<aead_algo>]
594 Mark the start of the actual encryption process.
595 MDC_METHOD shall be 0 if an AEAD_ALGO is not 0. Users should
596 however ignore MDC_METHOD if AEAD_ALGO is not 0.
597
598 *** END_ENCRYPTION
599 Mark the end of the actual encryption process.
600
601 *** FILE_START <what> <filename>
602 Start processing a file <filename>. <what> indicates the performed
603 operation:
604 - 1 :: verify
605 - 2 :: encrypt
606 - 3 :: decrypt
607
608 *** FILE_DONE
609 Marks the end of a file processing which has been started
610 by FILE_START.
611
612 *** BEGIN_SIGNING
613 Mark the start of the actual signing process. This may be used as
614 an indication that all requested secret keys are ready for use.
615
616 *** ALREADY_SIGNED <long-keyid>
617 Warning: This is experimental and might be removed at any time.
618
619 *** SIG_CREATED <type> <pk_algo> <hash_algo> <class> <timestamp> <keyfpr>
620 A signature has been created using these parameters.
621 Values for type <type> are:
622 - D :: detached
623 - C :: cleartext
624 - S :: standard
625 (only the first character should be checked)
626
627 <class> are 2 hex digits with the OpenPGP signature class.
628
629 Note, that TIMESTAMP may either be a number of seconds since Epoch
630 or an ISO 8601 string which can be detected by the presence of the
631 letter 'T'.
632
633 *** NOTATION_
634 There are actually three related status codes to convey notation
635 data:
636
637 - NOTATION_NAME <name>
638 - NOTATION_FLAGS <critical> <human_readable>
639 - NOTATION_DATA <string>
640
641 <name> and <string> are %XX escaped. The data may be split among
642 several NOTATION_DATA lines. NOTATION_FLAGS is emitted after
643 NOTATION_NAME and gives the critical and human readable flags;
644 the flag values are either 0 or 1.
645
646 *** POLICY_URL <string>
647 Note that URL in <string> is %XX escaped.
648
649 *** PLAINTEXT <format> <timestamp> <filename>
650 This indicates the format of the plaintext that is about to be
651 written. The format is a 1 byte hex code that shows the format of
652 the plaintext: 62 ('b') is binary data, 74 ('t') is text data with
653 no character set specified, and 75 ('u') is text data encoded in
654 the UTF-8 character set. The timestamp is in seconds since the
655 epoch. If a filename is available it gets printed as the third
656 argument, percent-escaped as usual.
657
658 *** PLAINTEXT_LENGTH <length>
659 This indicates the length of the plaintext that is about to be
660 written. Note that if the plaintext packet has partial length
661 encoding it is not possible to know the length ahead of time. In
662 that case, this status tag does not appear. The length is only
663 exact for binary formats; other formats ('t', 'u') may do post
664 processing like line ending conversion so that the actual number
665 of bytes written may be differ.
666
667 *** ATTRIBUTE <arguments>
668 The list or arguments are:
669 - <fpr>
670 - <octets>
671 - <type>
672 - <index>
673 - <count>
674 - <timestamp>
675 - <expiredate>
676 - <flags>
677
678 This is one long line issued for each attribute subpacket when an
679 attribute packet is seen during key listing. <fpr> is the
680 fingerprint of the key. <octets> is the length of the attribute
681 subpacket. <type> is the attribute type (e.g. 1 for an image).
682 <index> and <count> indicate that this is the N-th indexed
683 subpacket of count total subpackets in this attribute packet.
684 <timestamp> and <expiredate> are from the self-signature on the
685 attribute packet. If the attribute packet does not have a valid
686 self-signature, then the timestamp is 0. <flags> are a bitwise OR
687 of:
688 - 0x01 :: this attribute packet is a primary uid
689 - 0x02 :: this attribute packet is revoked
690 - 0x04 :: this attribute packet is expired
691
692 *** SIG_SUBPACKET <type> <flags> <len> <data>
693 This indicates that a signature subpacket was seen. The format is
694 the same as the "spk" record above.
695
696 *** ENCRYPTION_COMPLIANCE_MODE <flags>
697 Indicates that the current encryption operation was in compliance
698 with the given set of modes for all recipients. "flags" is a
699 space separated list of numerical flags, see "Field 18 -
700 Compliance flags" above.
701
702 *** DECRYPTION_COMPLIANCE_MODE <flags>
703 Indicates that the current decryption operation is in compliance
704 with the given set of modes. "flags" is a space separated list of
705 numerical flags, see "Field 18 - Compliance flags" above.
706
707 *** VERIFICATION_COMPLIANCE_MODE <flags>
708 Indicates that the current signature verification operation is in
709 compliance with the given set of modes. "flags" is a space
710 separated list of numerical flags, see "Field 18 - Compliance
711 flags" above.
712
713 ** Key related
714 *** INV_RECP, INV_SGNR
715 The two similar status codes:
716
717 - INV_RECP <reason> <requested_recipient>
718 - INV_SGNR <reason> <requested_sender>
719
720 are issued for each unusable recipient/sender. The reasons codes
721 currently in use are:
722
723 - 0 :: No specific reason given
724 - 1 :: Not Found
725 - 2 :: Ambiguous specification
726 - 3 :: Wrong key usage
727 - 4 :: Key revoked
728 - 5 :: Key expired
729 - 6 :: No CRL known
730 - 7 :: CRL too old
731 - 8 :: Policy mismatch
732 - 9 :: Not a secret key
733 - 10 :: Key not trusted
734 - 11 :: Missing certificate
735 - 12 :: Missing issuer certificate
736 - 13 :: Key disabled
737 - 14 :: Syntax error in specification
738
739 If no specific reason was given a previously emitted status code
740 KEY_CONSIDERED may be used to analyzed the problem.
741
742 Note that for historical reasons the INV_RECP status is also used
743 for gpgsm's SIGNER command where it relates to signer's of course.
744 Newer GnuPG versions are using INV_SGNR; applications should
745 ignore the INV_RECP during the sender's command processing once
746 they have seen an INV_SGNR. Different codes are used so that they
747 can be distinguish while doing an encrypt+sign operation.
748
749 *** NO_RECP <reserved>
750 Issued if no recipients are usable.
751
752 *** NO_SGNR <reserved>
753 Issued if no senders are usable.
754
755 *** KEY_CONSIDERED <fpr> <flags>
756 Issued to explain the lookup of a key. FPR is the hexified
757 fingerprint of the primary key. The bit values for FLAGS are:
758
759 - 1 :: The key has not been selected.
760 - 2 :: All subkeys of the key are expired or have been revoked.
761
762 *** KEYEXPIRED <expire-timestamp>
763 The key has expired. expire-timestamp is the expiration time in
764 seconds since Epoch. This status line is not very useful because
765 it will also be emitted for expired subkeys even if this subkey is
766 not used. To check whether a key used to sign a message has
767 expired, the EXPKEYSIG status line is to be used.
768
769 Note, that the TIMESTAMP may either be a number of seconds since
770 Epoch or an ISO 8601 string which can be detected by the presence
771 of the letter 'T'.
772
773 *** KEYREVOKED
774 The used key has been revoked by its owner. No arguments yet.
775
776 *** NO_PUBKEY <long keyid>
777 The public key is not available. Note the arg should in general
778 not be used because it is better to take it from the ERRSIG
779 status line which is printed right before this one.
780
781 *** NO_SECKEY <long keyid>
782 The secret key is not available
783
784 *** KEY_CREATED <type> <fingerprint> [<handle>]
785 A key has been created. Values for <type> are:
786 - B :: primary and subkey
787 - P :: primary
788 - S :: subkey
789 The fingerprint is one of the primary key for type B and P and the
790 one of the subkey for S. Handle is an arbitrary non-whitespace
791 string used to match key parameters from batch key creation run.
792
793 *** KEY_NOT_CREATED [<handle>]
794 The key from batch run has not been created due to errors.
795
796 *** TRUST_
797 These are several similar status codes:
798
799 #+begin_src
800 - TRUST_UNDEFINED <error_token> [<validation_model> [<mbox>]]
801 - TRUST_NEVER <error_token> [<validation_model> [<mbox>]]
802 - TRUST_MARGINAL 0 [<validation_model> [<mbox>]]
803 - TRUST_FULLY 0 [<validation_model> [<mbox>]]
804 - TRUST_ULTIMATE 0 [<validation_model> [<mbox>]]
805 #+end_src
806
807 For good signatures one of these status lines are emitted to
808 indicate the validity of the key used to create the signature.
809 <error_token> values other that a literal zero are currently only
810 emitted by gpgsm.
811
812 VALIDATION_MODEL describes the algorithm used to check the
813 validity of the key. The defaults are the standard Web of Trust
814 model for gpg and the standard X.509 model for gpgsm. The
815 defined values are
816
817 - classic :: The classic PGP WoT model.
818 - pgp :: The standard PGP WoT.
819 - external :: The external PGP trust model.
820 - tofu :: The GPG Trust-On-First-Use model.
821 - tofu+pgp :: Ditto but combined with mopdel "pgp".
822 - always :: The Always trust model.
823 - direct :: The Direct Trust model.
824 - shell :: The Standard X.509 model.
825 - chain :: The Chain model.
826 - steed :: The STEED model.
827 - unknown :: An unknown trust model.
828
829 Note that the term =TRUST_= in the status names is used for
830 historic reasons; we now speak of validity.
831
832 MBOX is the UTF-8 encoded and percent escaped addr-spec of the
833 User ID used to compute the validity of a signature. If this is
834 not known the validity is computed on the key with no specific
835 User ID. Note that MBOX is always the addr-spec of the User ID;
836 for User IDs without a proper addr-spec a dash is used to
837 distinguish this from the case that no User ID at all is known.
838 The MBOX is either taken from the Signer's User ID signature
839 sub-packet or from the addr-spec passed to gpg using the --sender
840 option. If both are available and they don't match
841 TRUST_UNDEFINED along with an error code is emitted. MBOX is not
842 used by gpgsm.
843
844 *** TOFU_USER <fingerprint_in_hex> <mbox>
845
846 This status identifies the key and the userid for all following
847 Tofu information. The fingerprint is the fingerprint of the
848 primary key and the mbox is in general the addr-spec part of the
849 userid encoded in UTF-8 and percent escaped. The fingerprint is
850 identical for all TOFU_USER lines up to a NEWSIG line.
851
852 *** TOFU_STATS <MANY_ARGS>
853
854 Statistics for the current user id.
855
856 The <MANY_ARGS> are the usual space delimited arguments. Here we
857 have too many of them to fit on one printed line and thus they are
858 given on 3 printed lines:
859
860 : <summary> <sign-count> <encryption-count>
861 : [<policy> [<tm1> <tm2> <tm3> <tm4>
862 : [<validity> [<sign-days> <encrypt-days>]]]]
863
864 Values for SUMMARY are:
865 - 0 :: attention, an interaction with the user is required (conflict)
866 - 1 :: key with no verification/encryption history
867 - 2 :: key with little history
868 - 3 :: key with enough history for basic trust
869 - 4 :: key with a lot of history
870
871 Values for POLICY are:
872 - none :: No Policy set
873 - auto :: Policy is "auto"
874 - good :: Policy is "good"
875 - bad :: Policy is "bad"
876 - ask :: Policy is "ask"
877 - unknown :: Policy is "unknown" (TOFU information does not
878 contribute to the key's validity)
879
880 TM1 is the time the first message was verified. TM2 is the time
881 the most recent message was verified. TM3 is the time the first
882 message was encrypted. TM4 is the most recent encryption. All may
883 either be seconds since Epoch or an ISO time string
884 (yyyymmddThhmmss).
885
886 VALIDITY is the same as SUMMARY with the exception that VALIDITY
887 doesn't reflect whether the key needs attention. That is it never
888 takes on value 0. Instead, if there is a conflict, VALIDITY still
889 reflects the key's validity (values: 1-4).
890
891 SUMMARY values use the euclidean distance (m = sqrt(a² + b²)) rather
892 then the sum of the magnitudes (m = a + b) to ensure a balance between
893 verified signatures and encrypted messages.
894
895 Values are calculated based on the number of days where a key was used
896 for verifying a signature or to encrypt to it.
897 The ranges for the values are:
898
899 - 1 :: signature_days + encryption_days == 0
900 - 2 :: 1 <= sqrt(signature_days² + encryption_days²) < 8
901 - 3 :: 8 <= sqrt(signature_days² + encryption_days²) < 42
902 - 4 :: sqrt(signature_days² + encryption_days²) >= 42
903
904 SIGN-COUNT and ENCRYPTION-COUNT are the number of messages that we
905 have seen that have been signed by this key / encryption to this
906 key.
907
908 SIGN-DAYS and ENCRYPTION-DAYS are similar, but the number of days
909 (in UTC) on which we have seen messages signed by this key /
910 encrypted to this key.
911
912 *** TOFU_STATS_SHORT <long_string>
913
914 Information about the TOFU binding for the signature.
915 Example: "15 signatures verified. 10 messages encrypted"
916
917 *** TOFU_STATS_LONG <long_string>
918
919 Information about the TOFU binding for the signature in verbose
920 format. The LONG_STRING is percent escaped.
921 Example: 'Verified 9 messages signed by "Werner Koch
922 (dist sig)" in the past 3 minutes, 40 seconds. The most
923 recent message was verified 4 seconds ago.'
924
925 *** PKA_TRUST_
926 This is one of:
927
928 - PKA_TRUST_GOOD <addr-spec>
929 - PKA_TRUST_BAD <addr-spec>
930
931 Depending on the outcome of the PKA check one of the above status
932 codes is emitted in addition to a =TRUST_*= status.
933
934 ** Remote control
935 *** GET_BOOL, GET_LINE, GET_HIDDEN, GOT_IT
936
937 These status line are used with --command-fd for interactive
938 control of the process.
939
940 *** USERID_HINT <long main keyid> <string>
941 Give a hint about the user ID for a certain keyID.
942
943 *** NEED_PASSPHRASE <long keyid> <long main keyid> <keytype> <keylength>
944 Issued whenever a passphrase is needed. KEYTYPE is the numerical
945 value of the public key algorithm or 0 if this is not applicable,
946 KEYLENGTH is the length of the key or 0 if it is not known (this
947 is currently always the case).
948
949 *** NEED_PASSPHRASE_SYM <cipher_algo> <s2k_mode> <s2k_hash>
950 Issued whenever a passphrase for symmetric encryption is needed.
951
952 *** NEED_PASSPHRASE_PIN <card_type> <chvno> [<serialno>]
953 Issued whenever a PIN is requested to unlock a card.
954
955 *** MISSING_PASSPHRASE
956 No passphrase was supplied. An application which encounters this
957 message may want to stop parsing immediately because the next
958 message will probably be a BAD_PASSPHRASE. However, if the
959 application is a wrapper around the key edit menu functionality it
960 might not make sense to stop parsing but simply ignoring the
961 following BAD_PASSPHRASE.
962
963 *** BAD_PASSPHRASE <long keyid>
964 The supplied passphrase was wrong or not given. In the latter
965 case you may have seen a MISSING_PASSPHRASE.
966
967 *** GOOD_PASSPHRASE
968 The supplied passphrase was good and the secret key material
969 is therefore usable.
970
971 ** Import/Export
972 *** IMPORT_CHECK <long keyid> <fingerprint> <user ID>
973 This status is emitted in interactive mode right before
974 the "import.okay" prompt.
975
976 *** IMPORTED <long keyid> <username>
977 The keyid and name of the signature just imported
978
979 *** IMPORT_OK <reason> [<fingerprint>]
980 The key with the primary key's FINGERPRINT has been imported.
981 REASON flags are:
982
983 - 0 :: Not actually changed
984 - 1 :: Entirely new key.
985 - 2 :: New user IDs
986 - 4 :: New signatures
987 - 8 :: New subkeys
988 - 16 :: Contains private key.
989
990 The flags may be ORed.
991
992 *** IMPORT_PROBLEM <reason> [<fingerprint>]
993 Issued for each import failure. Reason codes are:
994
995 - 0 :: No specific reason given.
996 - 1 :: Invalid Certificate.
997 - 2 :: Issuer Certificate missing.
998 - 3 :: Certificate Chain too long.
999 - 4 :: Error storing certificate.
1000
1001 *** IMPORT_RES <args>
1002 Final statistics on import process (this is one long line). The
1003 args are a list of unsigned numbers separated by white space:
1004
1005 - <count>
1006 - <no_user_id>
1007 - <imported>
1008 - always 0 (formerly used for the number of RSA keys)
1009 - <unchanged>
1010 - <n_uids>
1011 - <n_subk>
1012 - <n_sigs>
1013 - <n_revoc>
1014 - <sec_read>
1015 - <sec_imported>
1016 - <sec_dups>
1017 - <skipped_new_keys>
1018 - <not_imported>
1019 - <skipped_v3_keys>
1020
1021 *** EXPORTED <fingerprint>
1022 The key with <fingerprint> has been exported. The fingerprint is
1023 the fingerprint of the primary key even if the primary key has
1024 been replaced by a stub key during secret key export.
1025
1026 *** EXPORT_RES <args>
1027
1028 Final statistics on export process (this is one long line). The
1029 args are a list of unsigned numbers separated by white space:
1030
1031 - <count>
1032 - <secret_count>
1033 - <exported>
1034
1035
1036 ** Smartcard related
1037 *** CARDCTRL <what> [<serialno>]
1038 This is used to control smartcard operations. Defined values for
1039 WHAT are:
1040
1041 - 1 :: Request insertion of a card. Serialnumber may be given
1042 to request a specific card. Used by gpg 1.4 w/o
1043 scdaemon
1044 - 2 :: Request removal of a card. Used by gpg 1.4 w/o scdaemon.
1045 - 3 :: Card with serialnumber detected
1046 - 4 :: No card available
1047 - 5 :: No card reader available
1048 - 6 :: No card support available
1049 - 7 :: Card is in termination state
1050
1051 *** SC_OP_FAILURE [<code>]
1052 An operation on a smartcard definitely failed. Currently there is
1053 no indication of the actual error code, but application should be
1054 prepared to later accept more arguments. Defined values for
1055 <code> are:
1056
1057 - 0 :: unspecified error (identically to a missing CODE)
1058 - 1 :: canceled
1059 - 2 :: bad PIN
1060
1061 *** SC_OP_SUCCESS
1062 A smart card operation succeeded. This status is only printed for
1063 certain operation and is mostly useful to check whether a PIN
1064 change really worked.
1065
1066 ** Miscellaneous status codes
1067 *** NODATA <what>
1068 No data has been found. Codes for WHAT are:
1069
1070 - 1 :: No armored data.
1071 - 2 :: Expected a packet but did not found one.
1072 - 3 :: Invalid packet found, this may indicate a non OpenPGP
1073 message.
1074 - 4 :: Signature expected but not found
1075
1076 You may see more than one of these status lines.
1077
1078 *** UNEXPECTED <what>
1079 Unexpected data has been encountered. Codes for WHAT are:
1080 - 0 :: Not further specified
1081 - 1 :: Corrupted message structure
1082
1083 *** TRUNCATED <maxno>
1084 The output was truncated to MAXNO items. This status code is
1085 issued for certain external requests.
1086
1087 *** ERROR <error location> <error code> [<more>]
1088 This is a generic error status message, it might be followed by
1089 error location specific data. <error code> and <error_location>
1090 should not contain spaces. The error code is a either a string
1091 commencing with a letter or such a string prefixed with a
1092 numerical error code and an underscore; e.g.: "151011327_EOF".
1093
1094 Some of the error locations are:
1095
1096 - decryption.early_plaintext :: The OpenPGP message contains more
1097 than one plaintext.
1098 - genkey :: Problem generating a key. The error code further
1099 describes the problem.
1100 - get_passphrase :: Problem getting the passphrase from the
1101 gpg-agent.
1102 - keyedit.passwd :: Changing the password failed.
1103 - nomdc_with_legacy_cipher :: The message was not MDC protected.
1104 Use the command line to lern about a workaround.
1105 - random-compliance :: The random number generator or the used
1106 version of Libgcrypt do not fulfill the requirements of the
1107 current compliance setting. The error code is often
1108 GPG_ERR_FORBIDDEN.
1109 - set_expire :: Changing the expiration time failed.
1110
1111 *** WARNING <location> <error code> [<text>]
1112 This is a generic warning status message, it might be followed by
1113 error location specific data. <location> and <error code> may not
1114 contain spaces. The <location> may be used to indicate a class of
1115 warnings. The error code is a either a string commencing with a
1116 letter or such a string prefixed with a numerical error code and
1117 an underscore; e.g.: "151011327_EOF".
1118 *** NOTE <location> <error code> [<text>]
1119 This is a generic info status message the same syntax as for
1120 WARNING messages is used.
1121 *** SUCCESS [<location>]
1122 Positive confirmation that an operation succeeded. It is used
1123 similar to ISO-C's EXIT_SUCCESS. <location> is optional but if
1124 given should not contain spaces. Used only with a few commands.
1125
1126 *** FAILURE <location> <error_code>
1127 This is the counterpart to SUCCESS and used to indicate a program
1128 failure. It is used similar to ISO-C's EXIT_FAILURE but allows
1129 conveying more information, in particular a gpg-error error code.
1130 That numerical error code may optionally have a suffix made of an
1131 underscore and a string with an error symbol like "151011327_EOF".
1132 A dash may be used instead of <location>.
1133
1134 *** BADARMOR
1135 The ASCII armor is corrupted. No arguments yet.
1136
1137 *** DELETE_PROBLEM <reason_code>
1138 Deleting a key failed. Reason codes are:
1139 - 1 :: No such key
1140 - 2 :: Must delete secret key first
1141 - 3 :: Ambiguous specification
1142 - 4 :: Key is stored on a smartcard.
1143
1144 *** PROGRESS <what> <char> <cur> <total> [<units>]
1145 Used by the primegen and public key functions to indicate
1146 progress. <char> is the character displayed with no --status-fd
1147 enabled, with the linefeed replaced by an 'X'. <cur> is the
1148 current amount done and <total> is amount to be done; a <total> of
1149 0 indicates that the total amount is not known. Both are
1150 non-negative integers. The condition
1151 : TOTAL && CUR == TOTAL
1152 may be used to detect the end of an operation.
1153
1154 Well known values for <what> are:
1155
1156 - pk_dsa :: DSA key generation
1157 - pk_elg :: Elgamal key generation
1158 - primegen :: Prime generation
1159 - need_entropy :: Waiting for new entropy in the RNG
1160 - tick :: Generic tick without any special meaning - useful
1161 for letting clients know that the server is still
1162 working.
1163 - starting_agent :: A gpg-agent was started because it is not
1164 running as a daemon.
1165 - learncard :: Send by the agent and gpgsm while learing
1166 the data of a smartcard.
1167 - card_busy :: A smartcard is still working
1168 - scd_locked :: Waiting for other clients to unlock the
1169 scdaemon
1170 - gpgtar :: Here <char> has a special meaning: 's'
1171 indicates total size and 'c' file count. A
1172 <total> of zero indicates that gpgtar is in the
1173 scanning phase. A positive <total> is used in
1174 the writing phase.
1175
1176 When <what> refers to a file path, it may be truncated.
1177
1178 <units> is sometimes used to describe the units for <current> and
1179 <total>. For example "B", "KiB", or "MiB".
1180
1181 *** BACKUP_KEY_CREATED <fingerprint> <fname>
1182 A backup of a key identified by <fingerprint> has been writte to
1183 the file <fname>; <fname> is percent-escaped.
1184
1185 *** MOUNTPOINT <name>
1186 <name> is a percent-plus escaped filename describing the
1187 mountpoint for the current operation (e.g. used by "g13 --mount").
1188 This may either be the specified mountpoint or one randomly
1189 chosen by g13.
1190
1191 *** PINENTRY_LAUNCHED <pid>[:<extra>]
1192 This status line is emitted by gpg to notify a client that a
1193 Pinentry has been launched. <pid> is the PID of the Pinentry. It
1194 may be used to display a hint to the user but can't be used to
1195 synchronize with Pinentry. Note that there is also an Assuan
1196 inquiry line with the same name used internally or, if enabled,
1197 send to the client instead of this status line. Such an inquiry
1198 may be used to sync with Pinentry
1199
1200 *** GPGTAR_EXTRACT <tot> <skp> <bad> <sus> <sym> <hrd> <oth>
1201 This status line is emitted after gpgtar has extracted files.
1202
1203 - tot :: Total number of files extracted and stored
1204 - skp :: Total number of files skipped during extraction
1205 - bad :: Number of files skipped due to a bad file name
1206 - sus :: Number of files skipped due to a suspicious file name
1207 - sym :: Number of symlinks not restored
1208 - hrd :: Number of hard links not restored
1209 - oth :: Number of files not extracted due to other reasons.
1210
1211 ** Obsolete status codes
1212 *** SIGEXPIRED
1213 Removed on 2011-02-04. This is deprecated in favor of KEYEXPIRED.
1214 *** RSA_OR_IDEA
1215 Obsolete. This status message used to be emitted for requests to
1216 use the IDEA or RSA algorithms. It has been dropped from GnuPG
1217 2.1 after the respective patents expired.
1218 *** SHM_INFO, SHM_GET, SHM_GET_BOOL, SHM_GET_HIDDEN
1219 These were used for the ancient shared memory based co-processing.
1220 *** BEGIN_STREAM, END_STREAM
1221 Used to issued by the experimental pipemode.
1222 *** GOODMDC
1223 This is not anymore needed. Checking the DECRYPTION_OKAY status is
1224 sufficient.
1225 *** BADMDC
1226 This is not anymore needed.
1227
1228 ** Inter-component codes
1229 Status codes are also used between the components of the GnuPG
1230 system via the Assuan S lines. Some of them are documented here:
1231
1232 *** PUBKEY_INFO <n> <ubid> <flags> <uidno> <pkno>
1233 The type of the public key in the following D-lines or
1234 communicated via a pipe. <n> is the value of =enum pubkey_types=
1235 and <ubid> the Unique Blob ID (UBID) which is the fingerprint of
1236 the primary key truncated to 20 octets and formatted in hex. Note
1237 that the keyboxd SEARCH command can be used to lookup the public
1238 key using the <ubid> prefixed with a caret (^).
1239
1240 <flags> is a string extra information about the blob. The first
1241 byte is either '-' for standard key or 'e' for an ephemeral key.
1242 The second byte is either '-' or 'r' for a known revoked key.
1243
1244 <uidno> and <pkno> are the ordinal numbers for the the user id or
1245 public key which matches the search criteria. A value of 0 means
1246 not known.
1247
1248 *** KEYPAIRINFO <grip> <keyref> [<usage>] [<keytime>] [<algostr>]
1249
1250 This status is emitted by scdaemon and gpg-agent to convey brief
1251 information about keypairs stored on tokens. <grip> is the
1252 hexified keygrip of the key or, if no key is stored, an "X".
1253 <keyref> is the ID of a card's key; for example "OPENPGP.2" for
1254 the second key slot of an OpenPGP card. <usage> is optional and
1255 returns technically possible key usages, this is a string of
1256 single letters describing the usage ('c' for certify, 'e' for
1257 encryption, 's' for signing, 'a' for authentication). A '-' can be
1258 used to tell that usage flags are not conveyed. <keytime> is used
1259 by OpenPGP cards for the stored key creation time. A '-' means no
1260 info available. The format is the usual ISO string or a number
1261 with the seconds since Epoch. <algostr> is the algorithm or curve
1262 this key uses (e.g. "rsa2048") or a "-" if not known.
1263
1264 *** CERTINFO <certtype> <certref> [<label>]
1265
1266 This status is emitted for X.509 certifcates.
1267 CERTTYPE is a number indicating the type of the certificate:
1268 0 := Unknown
1269 100 := Regular X.509 cert
1270 101 := Trusted X.509 cert
1271 102 := Useful X.509 cert
1272 110 := Root CA cert in a special format (e.g. DINSIG)
1273 111 := Root CA cert as standard X509 cert
1274
1275 CERTREF identifies the certificate uniquely on the card and may be
1276 used to match it with a key's KEYREF. LABEL is an optional human
1277 readable decription of the certificate; it won't have any space in
1278 it and is percent encoded.
1279
1280 *** MANUFACTURER <n> [<string>]
1281
1282 This status returns the Manufactorer ID as the unsigned number N.
1283 For OpenPGP this is well defined; for other cards this is 0. The
1284 name of the manufacturer is also given as <string>; spaces are not
1285 escaped. For PKCS#15 cards <string> is TokenInfo.manufactorerID;
1286 a string in brackets describing GnuPG's own card product name may
1287 be appended to <string>.
1288
1289 *** KEY-STATUS <keyref> <status>
1290 This is the response from scdaemon on GETATTR KEY-STATUS for
1291 OpenPGP cards. <keyref> is the usual keyref (e.g. OPENPGP.1 or
1292 OPENPGP.129) and <status> is an integer describing the status of
1293 the key: 0 = key is not present, 1 = key generated on card, 2 =
1294 key imported. See section 4.4.3.8 of the OpenPGP Smart Card
1295 Application V3.4.
1296
1297 *** KEY-ATTR-INFO <keyref> <string>
1298 This is the response from scdaemon on GETATTR KEY-ATTR-INFO for
1299 OpenPGP cards. <keyref> is the usual keyref (e.g. OPENPGP.1 or
1300 OPENPGP.129) and <string> is the algoritm or curve name, which
1301 is available for the key.
1302
1303 *** KEY-TIME <n> <timestamp>
1304 This is a response from scdaemon on GETATTR KEY-TIME. A keyref N
1305 of 1 gives the timestamp for the standard OpenPGP signing key, 2
1306 for the encryption key, and 3 for an authentication key. Note
1307 that a KEYPAIRINFO status lines carries the same information and
1308 should be preferred.
1309
1310 *** KEY-LABEL <keyref> <label>
1311 This returns the human readbable label for the keys given by
1312 KEYREF. LABEL won't have any space in it and is percent encoded.
1313 This info shall only be used for dispaly purposes.
1314
1315 * Format of the --attribute-fd output
1316
1317 When --attribute-fd is set, during key listings (--list-keys,
1318 --list-secret-keys) GnuPG dumps each attribute packet to the file
1319 descriptor specified. --attribute-fd is intended for use with
1320 --status-fd as part of the required information is carried on the
1321 ATTRIBUTE status tag (see above).
1322
1323 The contents of the attribute data is specified by RFC 4880. For
1324 convenience, here is the Photo ID format, as it is currently the
1325 only attribute defined:
1326
1327 - Byte 0-1 :: The length of the image header. Due to a historical
1328 accident (i.e. oops!) back in the NAI PGP days, this
1329 is a little-endian number. Currently 16 (0x10 0x00).
1330
1331 - Byte 2 :: The image header version. Currently 0x01.
1332
1333 - Byte 3 :: Encoding format. 0x01 == JPEG.
1334
1335 - Byte 4-15 :: Reserved, and currently unused.
1336
1337 All other data after this header is raw image (JPEG) data.
1338
1339
1340 * Layout of the TrustDB
1341
1342 The TrustDB is built from fixed length records, where the first byte
1343 describes the record type. All numeric values are stored in network
1344 byte order. The length of each record is 40 bytes. The first
1345 record of the DB is always of type 1 and this is the only record of
1346 this type.
1347
1348 The record types: directory(2), key(3), uid(4), pref(5), sigrec(6),
1349 and shadow directory(8) are not anymore used by version 2 of the
1350 TrustDB.
1351
1352 ** Record type 0
1353
1354 Unused record or deleted, can be reused for any purpose. Such
1355 records should in general not exist because deleted records are of
1356 type 254 and kept in a linked list.
1357
1358 ** Version info (RECTYPE_VER, 1)
1359
1360 Version information for this TrustDB. This is always the first
1361 record of the DB and the only one of this type.
1362
1363 - 1 u8 :: Record type (value: 1).
1364 - 3 byte :: Magic value ("gpg")
1365 - 1 u8 :: TrustDB version (value: 2).
1366 - 1 u8 :: =marginals=. How many marginal trusted keys are required.
1367 - 1 u8 :: =completes=. How many completely trusted keys are
1368 required.
1369 - 1 u8 :: =max_cert_depth=. How deep is the WoT evaluated. Along
1370 with =marginals= and =completes=, this value is used to
1371 check whether the cached validity value from a [FIXME
1372 dir] record can be used.
1373 - 1 u8 :: =trust_model=
1374 - 1 u8 :: =min_cert_level=
1375 - 2 byte :: Not used
1376 - 1 u32 :: =created=. Timestamp of trustdb creation.
1377 - 1 u32 :: =nextcheck=. Timestamp of last modification which may
1378 affect the validity of keys in the trustdb. This value
1379 is checked against the validity timestamp in the dir
1380 records.
1381 - 1 u32 :: =reserved=. Not used.
1382 - 1 u32 :: =reserved2=. Not used.
1383 - 1 u32 :: =firstfree=. Number of the record with the head record
1384 of the RECTYPE_FREE linked list.
1385 - 1 u32 :: =reserved3=. Not used.
1386 - 1 u32 :: =trusthashtbl=. Record number of the trusthashtable.
1387
1388
1389 ** Hash table (RECTYPE_HTBL, 10)
1390
1391 Due to the fact that we use fingerprints to lookup keys, we can
1392 implement quick access by some simple hash methods, and avoid the
1393 overhead of gdbm. A property of fingerprints is that they can be
1394 used directly as hash values. What we use is a dynamic multilevel
1395 architecture, which combines hash tables, record lists, and linked
1396 lists.
1397
1398 This record is a hash table of 256 entries with the property that
1399 all these records are stored consecutively to make one big
1400 table. The hash value is simple the 1st, 2nd, ... byte of the
1401 fingerprint (depending on the indirection level).
1402
1403 - 1 u8 :: Record type (value: 10).
1404 - 1 u8 :: Reserved
1405 - n u32 :: =recnum=. A table with the hash table items fitting into
1406 this record. =n= depends on the record length:
1407 $n=(reclen-2)/4$ which yields 9 for oure current record
1408 length of 40 bytes.
1409
1410 The total number of hash table records to form the table is:
1411 $m=(256+n-1)/n$. This is 29 for our record length of 40.
1412
1413 To look up a key we use the first byte of the fingerprint to get
1414 the recnum from this hash table and then look up the addressed
1415 record:
1416
1417 - If that record is another hash table, we use 2nd byte to index
1418 that hash table and so on;
1419 - if that record is a hash list, we walk all entries until we find
1420 a matching one; or
1421 - if that record is a key record, we compare the fingerprint to
1422 decide whether it is the requested key;
1423
1424
1425 ** Hash list (RECTYPE_HLST, 11)
1426
1427 See hash table above on how it is used. It may also be used for
1428 other purposes.
1429
1430 - 1 u8 :: Record type (value: 11).
1431 - 1 u8 :: Reserved.
1432 - 1 u32 :: =next=. Record number of the next hash list record or 0
1433 if none.
1434 - n u32 :: =rnum=. Array with record numbers to values. With
1435 $n=(reclen-5)/5$ and our record length of 40, n is 7.
1436
1437 ** Trust record (RECTYPE_TRUST, 12)
1438
1439 - 1 u8 :: Record type (value: 12).
1440 - 1 u8 :: Reserved.
1441 - 20 byte :: =fingerprint=.
1442 - 1 u8 :: =ownertrust=.
1443 - 1 u8 :: =depth=.
1444 - 1 u8 :: =min_ownertrust=.
1445 - 1 byte :: =flags=.
1446 - 1 u32 :: =validlist=.
1447 - 10 byte :: Not used.
1448
1449 ** Validity record (RECTYPE_VALID, 13)
1450
1451 - 1 u8 :: Record type (value: 13).
1452 - 1 u8 :: Reserved.
1453 - 20 byte :: =namehash=.
1454 - 1 u8 :: =validity=
1455 - 1 u32 :: =next=.
1456 - 1 u8 :: =full_count=.
1457 - 1 u8 :: =marginal_count=.
1458 - 11 byte :: Not used.
1459
1460 ** Free record (RECTYPE_FREE, 254)
1461
1462 All these records form a linked list of unused records in the TrustDB.
1463
1464 - 1 u8 :: Record type (value: 254)
1465 - 1 u8 :: Reserved.
1466 - 1 u32 :: =next=. Record number of the next rcord of this type.
1467 The record number to the head of this linked list is
1468 stored in the version info record.
1469
1470
1471 * Database scheme for the TOFU info
1472
1473 #+begin_src sql
1474 --
1475 -- The VERSION table holds the version of our TOFU data structures.
1476 --
1477 CREATE TABLE version (
1478 version integer -- As of now this is always 1
1479 );
1480
1481 --
1482 -- The BINDINGS table associates mail addresses with keys.
1483 --
1484 CREATE TABLE bindings (
1485 oid integer primary key autoincrement,
1486 fingerprint text, -- The key's fingerprint in hex
1487 email text, -- The normalized mail address destilled from user_id
1488 user_id text, -- The unmodified user id
1489 time integer, -- The time this binding was first observed.
1490 policy boolean check
1491 (policy in (1, 2, 3, 4, 5)), -- The trust policy with the values:
1492 -- 1 := Auto
1493 -- 2 := Good
1494 -- 3 := Unknown
1495 -- 4 := Bad
1496 -- 5 := Ask
1497 conflict string, -- NULL or a hex formatted fingerprint.
1498 unique (fingerprint, email)
1499 );
1500
1501 CREATE INDEX bindings_fingerprint_email on bindings (fingerprint, email);
1502 CREATE INDEX bindings_email on bindings (email);
1503
1504 --
1505 -- The SIGNATURES table records all data signatures we verified
1506 --
1507 CREATE TABLE signatures (
1508 binding integer not null, -- Link to bindings table,
1509 -- references bindings.oid.
1510 sig_digest text, -- The digest of the signed message.
1511 origin text, -- String describing who initially fed
1512 -- the signature to gpg (e.g. "email:claws").
1513 sig_time integer, -- Timestamp from the signature.
1514 time integer, -- Time this record was created.
1515 primary key (binding, sig_digest, origin)
1516 );
1517 #+end_src
1518
1519
1520 * GNU extensions to the S2K algorithm
1521
1522 1 octet - S2K Usage: either 254 or 255.
1523 1 octet - S2K Cipher Algo: 0
1524 1 octet - S2K Specifier: 101
1525 3 octets - "GNU"
1526 1 octet - GNU S2K Extension Number.
1527
1528 If such a GNU extension is used neither an IV nor any kind of
1529 checksum is used. The defined GNU S2K Extension Numbers are:
1530
1531 - 1 :: Do not store the secret part at all. No specific data
1532 follows.
1533
1534 - 2 :: A stub to access smartcards. This data follows:
1535 - One octet with the length of the following serial number.
1536 - The serial number. Regardless of what the length octet
1537 indicates no more than 16 octets are stored.
1538 - 3 :: The internal representation of a private key: For v4 keys we
1539 first write 4 octets big endian length of the following
1540 s-expression with the protected or unprotected private key;
1541 for v5 keys this is not necessarily because that length
1542 header is always there. The actual data are N octets of
1543 s-expression. Any protection (including the real S2K) is
1544 part of that data. Note that the public key aparemters are
1545 repeated in th s-expression.
1546
1547 Note that gpg stores the GNU S2K Extension Number internally as an
1548 S2K Specifier with an offset of 1000.
1549
1550
1551 * Format of the OpenPGP TRUST packet
1552
1553 According to RFC4880 (5.10), the trust packet (aka ring trust) is
1554 only used within keyrings and contains data that records the user's
1555 specifications of which key holds trusted introducers. The RFC also
1556 states that the format of this packet is implementation defined and
1557 SHOULD NOT be emitted to output streams or should be ignored on
1558 import. GnuPG uses this packet in several additional ways:
1559
1560 - 1 octet :: Trust-Value (only used by Subtype SIG)
1561 - 1 octet :: Signature-Cache (only used by Subtype SIG; value must
1562 be less than 128)
1563 - 3 octets :: Fixed value: "gpg"
1564 - 1 octet :: Subtype
1565 - 0 :: Signature cache (SIG)
1566 - 1 :: Key source on the primary key (KEY)
1567 - 2 :: Key source on a user id (UID)
1568 - 1 octet :: Key Source; i.e. the origin of the key:
1569 - 0 :: Unknown source.
1570 - 1 :: Public keyserver.
1571 - 2 :: Preferred keyserver.
1572 - 3 :: OpenPGP DANE.
1573 - 4 :: Web Key Directory.
1574 - 5 :: Import from a trusted URL.
1575 - 6 :: Import from a trusted file.
1576 - 7 :: Self generated.
1577 - 4 octets :: Time of last update. This is a four-octet scalar
1578 with the seconds since Epoch.
1579 - 1 octet :: Scalar with the length of the following field.
1580 - N octets :: String with the URL of the source. This may be a
1581 zero-length string.
1582
1583 If the packets contains only two octets a Subtype of 0 is assumed;
1584 this is the only format recognized by GnuPG versions < 2.1.18.
1585 Trust-Value and Signature-Cache must be zero for all subtypes other
1586 than SIG.
1587
1588
1589 * Keyserver helper message format
1590
1591 *This information is obsolete*
1592 (Keyserver helpers have been replaced by dirmngr)
1593
1594 The keyserver may be contacted by a Unix Domain socket or via TCP.
1595
1596 The format of a request is:
1597 #+begin_example
1598 command-tag
1599 "Content-length:" digits
1600 CRLF
1601 #+end_example
1602
1603 Where command-tag is
1604
1605 #+begin_example
1606 NOOP
1607 GET <user-name>
1608 PUT
1609 DELETE <user-name>
1610 #+end_example
1611
1612 The format of a response is:
1613
1614 #+begin_example
1615 "GNUPG/1.0" status-code status-text
1616 "Content-length:" digits
1617 CRLF
1618 #+end_example
1619 followed by <digits> bytes of data
1620
1621 Status codes are:
1622
1623 - 1xx :: Informational - Request received, continuing process
1624
1625 - 2xx :: Success - The action was successfully received, understood,
1626 and accepted
1627
1628 - 4xx :: Client Error - The request contains bad syntax or cannot be
1629 fulfilled
1630
1631 - 5xx :: Server Error - The server failed to fulfill an apparently
1632 valid request
1633
1634
1635 * Object identifiers
1636
1637 OIDs below the GnuPG arc:
1638
1639 #+begin_example
1640 1.3.6.1.4.1.11591.2 GnuPG
1641 1.3.6.1.4.1.11591.2.1 notation
1642 1.3.6.1.4.1.11591.2.1.1 pkaAddress
1643 1.3.6.1.4.1.11591.2.2 X.509 extensions
1644 1.3.6.1.4.1.11591.2.2.1 standaloneCertificate
1645 1.3.6.1.4.1.11591.2.2.2 wellKnownPrivateKey
1646 1.3.6.1.4.1.11591.2.2.10 OpenPGP KDF/KEK parameter
1647 1.3.6.1.4.1.11591.2.3 CMS contentType
1648 1.3.6.1.4.1.11591.2.3.1 OpenPGP keyblock (as octet string)
1649 1.3.6.1.4.1.11591.2.4 LDAP stuff
1650 1.3.6.1.4.1.11591.2.4.1 attributes
1651 1.3.6.1.4.1.11591.2.4.1.1 gpgFingerprint attribute
1652 1.3.6.1.4.1.11591.2.4.1.2 gpgSubFingerprint attribute
1653 1.3.6.1.4.1.11591.2.4.1.3 gpgMailbox attribute
1654 1.3.6.1.4.1.11591.2.4.1.4 gpgSubCertID attribute
1655 1.3.6.1.4.1.11591.2.5 LDAP URL extensions
1656 1.3.6.1.4.1.11591.2.5.1 gpgNtds=1 (auth. with current AD user)
1657 1.3.6.1.4.1.11591.2.6 GnuPG extended key usage
1658 1.3.6.1.4.1.11591.2.6.1 use for certification key
1659 1.3.6.1.4.1.11591.2.6.2 use for signing key
1660 1.3.6.1.4.1.11591.2.6.3 use for encryption key
1661 1.3.6.1.4.1.11591.2.6.4 use for authentication key
1662 1.3.6.1.4.1.11591.2.12242973 invalid encoded OID
1663 #+end_example
1664
1665 The OpenPGP KDF/KEK parameter extension is used to convey additional
1666 info for OpenPGP keys as an X.509 extensions.
1667
1668
1669 * Debug flags
1670
1671 This tables gives the flag values for the --debug option along with
1672 the alternative names used by the components.
1673
1674 | | gpg | gpgsm | agent | scd | dirmngr | g13 | wks |
1675 |-------+---------+---------+---------+---------+---------+---------+---------|
1676 | 1 | packet | x509 | | | x509 | mount | mime |
1677 | 2 | mpi | mpi | mpi | mpi | | | parser |
1678 | 4 | crypto | crypto | crypto | crypto | crypto | crypto | crypto |
1679 | 8 | filter | | | | | | |
1680 | 16 | iobuf | | | | dns | | |
1681 | 32 | memory | memory | memory | memory | memory | memory | memory |
1682 | 64 | cache | cache | cache | cache | cache | | |
1683 | 128 | memstat | memstat | memstat | memstat | memstat | memstat | memstat |
1684 | 256 | trust | | | | | | |
1685 | 512 | hashing | hashing | hashing | hashing | hashing | | |
1686 | 1024 | ipc | ipc | ipc | ipc | ipc | ipc | ipc |
1687 | 2048 | | | | cardio | network | | |
1688 | 4096 | clock | | | reader | | | |
1689 | 8192 | lookup | | | | lookup | | |
1690 | 16384 | extprog | | | | | | extprog |
1691
1692 Description of some debug flags:
1693
1694 - cardio :: Used by scdaemon to trace the APDUs exchange with the
1695 card.
1696 - clock :: Show execution times of certain functions.
1697 - crypto :: Trace crypto operations.
1698 - hashing :: Create files with the hashed data.
1699 - ipc :: Trace the Assuan commands.
1700 - mpi :: Show the values of the MPIs.
1701 - reader :: Used by scdaemon to trace card reader related code. For
1702 example: Open and close reader.
1703
1704
1705
1706 * Miscellaneous notes
1707 ** List of useful RFCs and I-D.
1708 - RFC-1423 :: PEM, Part III: Algorithms, Modes, and Identifiers
1709 - RFC-1750 :: Randomness Recommendations for Security
1710 - RFC-1991 :: PGP Message Exchange Formats (obsolete)
1711 - RFC-2144 :: The CAST-128 Encryption Algorithm
1712 - RFC-2253 :: UTF-8 String Representation of Distinguished Names.
1713 - RFC-2279 :: UTF-8, a transformation format of ISO 10646
1714 - RFC-2440 :: OpenPGP (obsolete).
1715 - RFC-3156 :: MIME Security with Pretty Good Privacy (PGP).
1716 - RFC-3447 :: PKCS #1: RSA Cryptography Specifications Version 2.1
1717 - RFC-4880 :: OpenPGP
1718 - RFC-5083 :: CMS - Authenticated-Enveloped-Data
1719 - RFC-5084 :: CMS - AES-GCM
1720 - RFC-5280 :: X.509 PKI Certificate and CRL Profile
1721 - RFC-5480 :: ECC Subject Public Key Information
1722 - RFC-5639 :: ECC Brainpool Standard Curves
1723 - RFC-5652 :: CMS (STD0070)
1724 - RFC-5753 :: ECC in CMS
1725 - RFC-5758 :: CMS - Additional Algorithms for DSA and ECDSA
1726 - RFC-6818 :: Updates to the X.509 PKI Certificate and CRL Profile
1727 - RFC-6960 :: Online Certificate Status Protocol - OCSP
1728 - RFC-8954 :: Online Certificate Status Protocol (OCSP) Nonce Extension
1729 - RFC-8398 :: Internationalized Email Addresses in X.509 Certificates
1730 - RFC-8399 :: Internationalization Updates to RFC 5280
1731 - RFC-8813 :: Clarifications for ECC Subject Public Key
1732 - RFC-5915 :: ECC Private Key Structure
1733 - RFC-5958 :: Asymmetric Key Packages
1734 - RFC-6337 :: ECC in OpenPGP
1735 - RFC-7748 :: Elliptic Curves for Security (X25519 and X448)
1736 - RFC-8410 :: Algorithm Identifiers for Ed25519, Ed448, X25519, and X448
1737 - RFC-7292 :: PKCS #12: Personal Information Exchange Syntax v1.1
1738 - RFC-8351 :: The PKCS #8 EncryptedPrivateKeyInfo Media Type
1739 - RFC-8550 :: S/MIME Version 4.0 Certificate Handling
1740 - RFC-8551 :: S/MIME Version 4.0 Message Specification
1741 - RFC-2634 :: Enhanced Security Services for S/MIME
1742 - RFC-5035 :: Enhanced Security Services (ESS) Update
1743 - RFC-7253 :: The OCB Authenticated-Encryption Algorithm
1744
1745 - draft-koch-openpgp-2015-rfc4880bis :: Updates to RFC-4880
1746
1747 - T6390 :: Notes on use of X25519 in GnuPG (https://dev.gnupg.org/T6390)
1748
1749
1750 ** v3 fingerprints
1751 For packet version 3 we calculate the keyids this way:
1752 - RSA :: Low 64 bits of n
1753 - ELGAMAL :: Build a v3 pubkey packet (with CTB 0x99) and
1754 calculate a RMD160 hash value from it. This is used
1755 as the fingerprint and the low 64 bits are the keyid.
1756
1757 ** gnupg.org notations
1758
1759 - [email protected] :: Used by Kleopatra to implement the tag feature.
1760 These tags are used to mark keys for easier
1761 searching and grouping.
1762
1763
1764 ** Simplified revocation certificates
1765 Revocation certificates consist only of the signature packet;
1766 "--import" knows how to handle this. The rationale behind it is to
1767 keep them small.
1768
1769 ** Documentation on HKP (the http keyserver protocol):
1770
1771 A minimalistic HTTP server on port 11371 recognizes a GET for
1772 /pks/lookup. The standard http URL encoded query parameters are
1773 this (always key=value):
1774
1775 - op=index (like pgp -kv), op=vindex (like pgp -kvv) and op=get (like
1776 pgp -kxa)
1777
1778 - search=<stringlist>. This is a list of words that must occur in the key.
1779 The words are delimited with space, points, @ and so on. The delimiters
1780 are not searched for and the order of the words doesn't matter (but see
1781 next option).
1782
1783 - exact=on. This switch tells the hkp server to only report exact matching
1784 keys back. In this case the order and the "delimiters" are important.
1785
1786 - fingerprint=on. Also reports the fingerprints when used with 'index' or
1787 'vindex'
1788
1789 The keyserver also recognizes http-POSTs to /pks/add. Use this to upload
1790 keys.
1791
1792
1793 A better way to do this would be a request like:
1794
1795 /pks/lookup/<gnupg_formatierte_user_id>?op=<operation>
1796
1797 This can be implemented using Hurd's translator mechanism.
1798 However, I think the whole keyserver stuff has to be re-thought;
1799 I have some ideas and probably create a white paper.
1800 ** Algorithm names for the "keygen.algo" prompt
1801
1802 When using a --command-fd controlled key generation or "addkey"
1803 there is way to know the number to enter on the "keygen.algo"
1804 prompt. The displayed numbers are for human reception and may
1805 change with releases. To provide a stable way to enter a desired
1806 algorithm choice the prompt also accepts predefined names for the
1807 algorithms, which will not change.
1808
1809 | Name | No | Description |
1810 |---------+----+---------------------------------|
1811 | rsa+rsa | 1 | RSA and RSA (default) |
1812 | dsa+elg | 2 | DSA and Elgamal |
1813 | dsa | 3 | DSA (sign only) |
1814 | rsa/s | 4 | RSA (sign only) |
1815 | elg | 5 | Elgamal (encrypt only) |
1816 | rsa/e | 6 | RSA (encrypt only) |
1817 | dsa/* | 7 | DSA (set your own capabilities) |
1818 | rsa/* | 8 | RSA (set your own capabilities) |
1819 | ecc+ecc | 9 | ECC and ECC |
1820 | ecc/s | 10 | ECC (sign only) |
1821 | ecc/* | 11 | ECC (set your own capabilities) |
1822 | ecc/e | 12 | ECC (encrypt only) |
1823 | keygrip | 13 | Existing key |
1824 | cardkey | 14 | Existing key from card |
1825
1826 If one of the "foo/*" names are used a "keygen.flags" prompt needs
1827 to be answered as well. Instead of toggling the predefined flags,
1828 it is also possible to set them direct: Use a "=" character
1829 directly followed by a combination of "a" (for authentication), "s"
1830 (for signing), or "c" (for certification).
1831
1832 ** extendedKeyUsage and keyUsage in gpgsm
1833
1834 This table describes how the extended KeyUsage masks the KeyUsage.
1835
1836 | ExtKeyUsage | Valid KeyUsages |
1837 |-----------------+------------------|
1838 | serverAuth | digitalSignature |
1839 | | keyEncipherment |
1840 | | keyAgreement |
1841 |-----------------+------------------|
1842 | clientAuth | digitalSignature |
1843 | | keyAgreement |
1844 |-----------------+------------------|
1845 | codeSigning | digitalSignature |
1846 |-----------------+------------------|
1847 | emailProtection | digitalSignature |
1848 | | nonRepudiation |
1849 | | keyEncipherment |
1850 | | keyAgreement |
1851 |-----------------+------------------|
1852 | timeStamping | digitalSignature |
1853 | | nonRepudiation |
1854 |-----------------+------------------|