1GPG(1)                       GNU Privacy Guard 2.2                      GPG(1)
2
3
4

NAME

6       gpg - OpenPGP encryption and signing tool
7

SYNOPSIS

9       gpg [--homedir dir] [--options file] [options] command [args]
10
11
12
13

DESCRIPTION

15       gpg  is the OpenPGP part of the GNU Privacy Guard (GnuPG). It is a tool
16       to provide digital encryption and signing services  using  the  OpenPGP
17       standard.  gpg  features  complete key management and all the bells and
18       whistles you would expect from a full OpenPGP implementation.
19
20       There are two main versions of GnuPG: GnuPG 1.x and GnuPG  2.x.   GnuPG
21       2.x  supports modern encryption algorithms and thus should be preferred
22       over GnuPG 1.x.  You only need  to  use  GnuPG  1.x  if  your  platform
23       doesn't  support  GnuPG 2.x, or you need support for some features that
24       GnuPG 2.x has deprecated, e.g.,  decrypting  data  created  with  PGP-2
25       keys.
26
27       If  you  are  looking for version 1 of GnuPG, you may find that version
28       installed under the name gpg1.
29
30
31
32
33
34
35

RETURN VALUE

37       The program returns 0 if everything was fine, 1 if at least a signature
38       was bad, and other error codes for fatal errors.
39
40

WARNINGS

42       Use  a *good* password for your user account and a *good* passphrase to
43       protect your secret key. This passphrase is the  weakest  part  of  the
44       whole  system. Programs to do dictionary attacks on your secret keyring
45       are very easy to write and  so  you  should  protect  your  "~/.gnupg/"
46       directory very well.
47
48       Keep  in mind that, if this program is used over a network (telnet), it
49       is *very* easy to spy out your passphrase!
50
51       If you are going to verify detached signatures, make sure that the pro‐
52       gram  knows about it; either give both filenames on the command line or
53       use '-' to specify STDIN.
54
55       For scripted or other unattended use  of  gpg  make  sure  to  use  the
56       machine-parseable  interface  and  not  the  default interface which is
57       intended for direct use by  humans.   The  machine-parseable  interface
58       provides  a stable and well documented API independent of the locale or
59       future changes of gpg.   To  enable  this  interface  use  the  options
60       --with-colons  and  --status-fd.   For  certain  operations  the option
61       --command-fd may come handy too.   See  this  man  page  and  the  file
62DETAILS’  for the specification of the interface.  Note that the GnuPG
63       ``info'' pages as well as the PDF version of the GnuPG manual  features
64       a  chapter  on  unattended use of GnuPG.  As an alternative the library
65       GPGME can be used as a high-level abstraction on top of that interface.
66
67

INTEROPERABILITY

69       GnuPG tries to be a very flexible implementation of the  OpenPGP  stan‐
70       dard. In particular, GnuPG implements many of the optional parts of the
71       standard, such as the SHA-512 hash, and the ZLIB and BZIP2  compression
72       algorithms.  It  is important to be aware that not all OpenPGP programs
73       implement these optional algorithms and that by forcing their  use  via
74       the  --cipher-algo,  --digest-algo,  --cert-digest-algo, or --compress-
75       algo options in GnuPG, it is  possible  to  create  a  perfectly  valid
76       OpenPGP message, but one that cannot be read by the intended recipient.
77
78       There  are dozens of variations of OpenPGP programs available, and each
79       supports a slightly different subset of these optional algorithms.  For
80       example,  until  recently,  no  (unhacked) version of PGP supported the
81       BLOWFISH cipher algorithm. A message using BLOWFISH simply could not be
82       read by a PGP user. By default, GnuPG uses the standard OpenPGP prefer‐
83       ences system that will always do the right thing  and  create  messages
84       that  are usable by all recipients, regardless of which OpenPGP program
85       they use. Only override this safe default if you really know  what  you
86       are doing.
87
88       If you absolutely must override the safe default, or if the preferences
89       on a given key are invalid for some reason,  you  are  far  better  off
90       using  the --pgp6, --pgp7, or --pgp8 options. These options are safe as
91       they do not force any particular algorithms in  violation  of  OpenPGP,
92       but rather reduce the available algorithms to a "PGP-safe" list.
93
94

COMMANDS

96       Commands  are  not  distinguished from options except for the fact that
97       only one command is allowed.  Generally  speaking,  irrelevant  options
98       are silently ignored, and may not be checked for correctness.
99
100       gpg may be run with no commands. In this case it will perform a reason‐
101       able action depending on the type of file it  is  given  as  input  (an
102       encrypted  message  is  decrypted, a signature is verified, a file con‐
103       taining keys is listed, etc.).
104
105
106
107
108
109
110   Commands not specific to the function
111
112
113
114       --version
115              Print the program version and licensing information.  Note  that
116              you cannot abbreviate this command.
117
118
119       --help
120       -h     Print  a  usage message summarizing the most useful command-line
121              options.  Note that you cannot arbitrarily abbreviate this  com‐
122              mand (though you can use its short form -h).
123
124
125       --warranty
126              Print warranty information.
127
128
129       --dump-options
130              Print  a  list of all available options and commands.  Note that
131              you cannot abbreviate this command.
132
133   Commands to select the type of operation
134
135
136
137
138
139       --sign
140       -s     Sign a message. This command may be combined with --encrypt  (to
141              sign  and encrypt a message), --symmetric (to sign and symmetri‐
142              cally encrypt a message), or both --encrypt and --symmetric  (to
143              sign  and encrypt a message that can be decrypted using a secret
144              key or a passphrase).  The signing key is chosen by  default  or
145              can  be  set explicitly using the --local-user and --default-key
146              options.
147
148
149       --clear-sign
150       --clearsign
151              Make a cleartext signature.  The content in a  cleartext  signa‐
152              ture  is readable without any special software. OpenPGP software
153              is only needed to verify the  signature.   cleartext  signatures
154              may  modify end-of-line whitespace for platform independence and
155              are not intended to be reversible.  The signing key is chosen by
156              default  or  can  be  set  explicitly using the --local-user and
157              --default-key options.
158
159
160
161       --detach-sign
162       -b     Make a detached signature.
163
164
165       --encrypt
166       -e     Encrypt data to one or more public keys.  This  command  may  be
167              combined  with --sign (to sign and encrypt a message), --symmet‐
168              ric (to encrypt a message that can decrypted using a secret  key
169              or  a  passphrase),  or  --sign  and --symmetric together (for a
170              signed message that can be decrypted using a  secret  key  or  a
171              passphrase).  --recipient and related options specify which pub‐
172              lic keys to use for encryption.
173
174
175       --symmetric
176       -c     Encrypt with a symmetric cipher using a passphrase. The  default
177              symmetric  cipher  used  is  AES-128, but may be chosen with the
178              --cipher-algo option. This command may be combined  with  --sign
179              (for  a  signed  and symmetrically encrypted message), --encrypt
180              (for a message that may be decrypted  via  a  secret  key  or  a
181              passphrase), or --sign and --encrypt together (for a signed mes‐
182              sage that may be decrypted via a secret key  or  a  passphrase).
183              gpg  caches the passphrase used for symmetric encryption so that
184              a decrypt operation may not require that the user needs to enter
185              the  passphrase.   The  option  --no-symkey-cache can be used to
186              disable this feature.
187
188
189       --store
190              Store only (make a simple literal data packet).
191
192
193       --decrypt
194       -d     Decrypt the file given on the command line (or STDIN if no  file
195              is specified) and write it to STDOUT (or the file specified with
196              --output). If the decrypted file is  signed,  the  signature  is
197              also  verified. This command differs from the default operation,
198              as it never writes to the filename which is included in the file
199              and it rejects files that don't begin with an encrypted message.
200
201
202       --verify
203              Assume  that  the  first argument is a signed file and verify it
204              without generating any output.  With no arguments, the signature
205              packet  is  read from STDIN.  If only one argument is given, the
206              specified file is expected to include a complete signature.
207
208              With more than one argument, the first argument should specify a
209              file  with  a  detached signature and the remaining files should
210              contain the signed data. To read the signed data from STDIN, use
211              '-'  as  the  second filename.  For security reasons, a detached
212              signature will not read the signed material from  STDIN  if  not
213              explicitly specified.
214
215              Note:  If  the option --batch is not used, gpg may assume that a
216              single argument is a file with a detached signature, and it will
217              try  to find a matching data file by stripping certain suffixes.
218              Using this historical feature to verify a detached signature  is
219              strongly  discouraged;  you  should always specify the data file
220              explicitly.
221
222              Note: When verifying a cleartext signature,  gpg  verifies  only
223              what  makes  up the cleartext signed data and not any extra data
224              outside of the cleartext signature or the header lines  directly
225              following the dash marker line.  The option --output may be used
226              to write out the actual signed data, but there  are  other  pit‐
227              falls with this format as well.  It is suggested to avoid clear‐
228              text signatures in favor of detached signatures.
229
230              Note: Sometimes the use of the gpgv tool is  easier  than  using
231              the full-fledged gpg with this option.  gpgv is designed to com‐
232              pare signed data against a list of trusted keys and returns with
233              success only for a good signature.  It has its own manual page.
234
235
236
237       --multifile
238              This  modifies  certain  other commands to accept multiple files
239              for processing on the command line or read from STDIN with  each
240              filename  on  a  separate line. This allows for many files to be
241              processed at once. --multifile may currently be used along  with
242              --verify, --encrypt, and --decrypt. Note that --multifile --ver‐
243              ify may not be used with detached signatures.
244
245
246       --verify-files
247              Identical to --multifile --verify.
248
249
250       --encrypt-files
251              Identical to --multifile --encrypt.
252
253
254       --decrypt-files
255              Identical to --multifile --decrypt.
256
257
258       --list-keys
259       -k
260       --list-public-keys
261              List the specified keys.  If no keys  are  specified,  then  all
262              keys from the configured public keyrings are listed.
263
264              Never  use  the  output of this command in scripts or other pro‐
265              grams.  The output is intended only for humans and its format is
266              likely  to change.  The --with-colons option emits the output in
267              a stable, machine-parseable format, which is intended for use by
268              scripts and other programs.
269
270
271       --list-secret-keys
272       -K     List  the specified secret keys.  If no keys are specified, then
273              all known secret keys are listed.  A # after  the  initial  tags
274              sec  or ssb means that the secret key or subkey is currently not
275              usable.  We also say that this key has been taken  offline  (for
276              example, a primary key can be taken offline by exporting the key
277              using the command --export-secret-subkeys).   A  >  after  these
278              tags  indicate  that the key is stored on a smartcard.  See also
279              --list-keys.
280
281
282       --check-signatures
283       --check-sigs
284              Same as --list-keys, but the key  signatures  are  verified  and
285              listed  too.   Note  that for performance reasons the revocation
286              status of a signing key is not shown.  This command has the same
287              effect as using --list-keys with --with-sig-check.
288
289              The  status  of the verification is indicated by a flag directly
290              following the "sig" tag (and thus  before  the  flags  described
291              below.  A "!" indicates that the signature has been successfully
292              verified, a "-" denotes a bad signature and a "%" is used if  an
293              error  occurred  while  checking  the signature (e.g. a non sup‐
294              ported algorithm).  Signatures  where  the  public  key  is  not
295              available  are  not  listed;  to  see  their  keyids the command
296              --list-sigs can be used.
297
298              For each signature listed, there are several  flags  in  between
299              the  signature  status  flag  and keyid.  These flags give addi‐
300              tional information about  each  key  signature.   From  left  to
301              right, they are the numbers 1-3 for certificate check level (see
302              --ask-cert-level), "L" for a local or  non-exportable  signature
303              (see  --lsign-key),  "R"  for  a nonRevocable signature (see the
304              --edit-key command "nrsign"), "P" for a signature that  contains
305              a  policy  URL (see --cert-policy-url), "N" for a signature that
306              contains a notation (see --cert-notation), "X"  for  an  eXpired
307              signature  (see  --ask-cert-expire),  and the numbers 1-9 or "T"
308              for 10 and above to indicate trust  signature  levels  (see  the
309              --edit-key command "tsign").
310
311
312
313       --locate-keys
314              Locate the keys given as arguments.  This command basically uses
315              the same algorithm as used when locating keys for encryption  or
316              signing and may thus be used to see what keys gpg might use.  In
317              particular external methods as defined by --auto-key-locate  may
318              be used to locate a key.  Only public keys are listed.
319
320
321       --show-keys
322              This commands takes OpenPGP keys as input and prints information
323              about them in the same way  the  command  --list-keys  does  for
324              locally stored key.  In addition the list options show-unusable-
325              uids, show-unusable-subkeys, show-notations and show-policy-urls
326              are  also enabled.  As usual for automated processing, this com‐
327              mand should be combined with the option --with-colons.
328
329
330       --fingerprint
331              List all keys (or the specified ones) along with  their  finger‐
332              prints.  This  is  the  same  output as --list-keys but with the
333              additional output of a line with the fingerprint.  May  also  be
334              combined  with  --check-signatures.   If  this  command is given
335              twice, the fingerprints of all secondary keys  are  listed  too.
336              This  command also forces pretty printing of fingerprints if the
337              keyid format has been set to "none".
338
339
340       --list-packets
341              List only the sequence of packets.  This command is only  useful
342              for  debugging.   When used with option --verbose the actual MPI
343              values are dumped and not only their  lengths.   Note  that  the
344              output of this command may change with new releases.
345
346
347
348       --edit-card
349       --card-edit
350              Present  a  menu to work with a smartcard. The subcommand "help"
351              provides an overview  on  available  commands.  For  a  detailed
352              description, please see the Card HOWTO at https://gnupg.org/doc
353              umentation/howtos.html#GnuPG-cardHOWTO .
354
355
356       --card-status
357              Show the content of the smart card.
358
359
360       --change-pin
361              Present a menu to allow changing the PIN of  a  smartcard.  This
362              functionality  is also available as the subcommand "passwd" with
363              the --edit-card command.
364
365
366       --delete-keys name
367              Remove key from the public keyring. In batch mode  either  --yes
368              is required or the key must be specified by fingerprint. This is
369              a safeguard against accidental deletion of multiple keys.
370
371
372       --delete-secret-keys name
373              Remove key from the secret keyring. In batch mode the  key  must
374              be  specified  by  fingerprint.  The option --yes can be used to
375              advice gpg-agent not to request a confirmation.  This extra pre-
376              caution  is  done  because gpg can't be sure that the secret key
377              (as controlled by gpg-agent) is only used for the given  OpenPGP
378              public key.
379
380
381
382       --delete-secret-and-public-key name
383              Same  as  --delete-key,  but  if a secret key exists, it will be
384              removed first. In batch mode the key must be specified  by  fin‐
385              gerprint.   The option --yes can be used to advice gpg-agent not
386              to request a confirmation.
387
388
389       --export
390              Either export all keys from all keyrings (default  keyrings  and
391              those  registered via option --keyring), or if at least one name
392              is given, those of the given name. The exported keys are written
393              to  STDOUT  or  to  the  file  given  with option --output.  Use
394              together with --armor to mail those keys.
395
396
397       --send-keys keyIDs
398              Similar to --export but sends the keys to a keyserver.   Finger‐
399              prints  may be used instead of key IDs.  Option --keyserver must
400              be used to give the name of this keyserver. Don't send your com‐
401              plete  keyring  to  a keyserver --- select only those keys which
402              are new or changed by you.  If no keyIDs  are  given,  gpg  does
403              nothing.
404
405
406       --export-secret-keys
407       --export-secret-subkeys
408              Same  as  --export,  but  exports  the secret keys instead.  The
409              exported keys are written to STDOUT or to the  file  given  with
410              option  --output.   This  command  is  often used along with the
411              option --armor to allow for easy printing of the key  for  paper
412              backup;  however the external tool paperkey does a better job of
413              creating backups on paper.  Note that exporting a secret key can
414              be  a  security risk if the exported keys are sent over an inse‐
415              cure channel.
416
417              The second form of the command has the special property to  ren‐
418              der  the  secret  part of the primary key useless; this is a GNU
419              extension to  OpenPGP  and  other  implementations  can  not  be
420              expected to successfully import such a key.  Its intended use is
421              in generating a full key with an additional signing subkey on  a
422              dedicated  machine.   This  command then exports the key without
423              the primary key to the main machine.
424
425              GnuPG may ask you to enter the passphrase for the key.  This  is
426              required,  because  the internal protection method of the secret
427              key is different from the one specified by the OpenPGP protocol.
428
429
430       --export-ssh-key
431              This command is used to export a key in the OpenSSH  public  key
432              format.   It  requires the specification of one key by the usual
433              means and exports the latest valid subkey which has an authenti‐
434              cation  capability  to  STDOUT  or to the file given with option
435              --output.  That output can directly be added  to  ssh's  ‘autho‐
436              rized_key’ file.
437
438              By  specifying the key to export using a key ID or a fingerprint
439              suffixed with an exclamation mark (!), a specific subkey or  the
440              primary  key  can  be exported.  This does not even require that
441              the key has the authentication capability flag set.
442
443
444       --import
445       --fast-import
446              Import/merge keys. This adds the given keys to the keyring.  The
447              fast version is currently just a synonym.
448
449              There  are  a  few  other options which control how this command
450              works.  Most notable here  is  the  --import-options  merge-only
451              option  which does not insert new keys but does only the merging
452              of new signatures, user-IDs and subkeys.
453
454
455       --receive-keys keyIDs
456       --recv-keys keyIDs
457              Import the keys with the given keyIDs from a  keyserver.  Option
458              --keyserver must be used to give the name of this keyserver.
459
460
461       --refresh-keys
462              Request  updates from a keyserver for keys that already exist on
463              the local keyring. This is useful for updating a  key  with  the
464              latest signatures, user IDs, etc. Calling this with no arguments
465              will refresh the entire keyring. Option --keyserver must be used
466              to  give the name of the keyserver for all keys that do not have
467              preferred keyservers  set  (see  --keyserver-options  honor-key‐
468              server-url).
469
470
471       --search-keys names
472              Search  the  keyserver for the given names. Multiple names given
473              here will be joined together to create the search string for the
474              keyserver.   Option --keyserver must be used to give the name of
475              this keyserver.  Keyservers that support different search  meth‐
476              ods  allow  using the syntax specified in "How to specify a user
477              ID" below. Note that different keyserver types support different
478              search methods. Currently only LDAP supports them all.
479
480
481       --fetch-keys URIs
482              Retrieve keys located at the specified URIs. Note that different
483              installations of GnuPG may support  different  protocols  (HTTP,
484              FTP,  LDAP,  etc.).   When  using HTTPS the system provided root
485              certificates are used by this command.
486
487
488       --update-trustdb
489              Do trust database maintenance. This command  iterates  over  all
490              keys and builds the Web of Trust. This is an interactive command
491              because it may have to ask for the "ownertrust" values for keys.
492              The  user  has  to  give an estimation of how far she trusts the
493              owner of the displayed key to  correctly  certify  (sign)  other
494              keys. GnuPG only asks for the ownertrust value if it has not yet
495              been assigned to a key. Using the --edit-key menu, the  assigned
496              value can be changed at any time.
497
498
499       --check-trustdb
500              Do  trust  database  maintenance  without user interaction. From
501              time to time the trust database must be updated so that  expired
502              keys or signatures and the resulting changes in the Web of Trust
503              can be tracked. Normally, GnuPG  will  calculate  when  this  is
504              required  and do it automatically unless --no-auto-check-trustdb
505              is set. This command can be used to force a trust database check
506              at  any  time.  The processing is identical to that of --update-
507              trustdb but it skips keys with a not yet defined "ownertrust".
508
509              For use with cron jobs, this command can be used  together  with
510              --batch in which case the trust database check is done only if a
511              check is needed. To force a run  even  in  batch  mode  add  the
512              option --yes.
513
514
515
516       --export-ownertrust
517              Send  the ownertrust values to STDOUT. This is useful for backup
518              purposes as these values are the only ones which  can't  be  re-
519              created from a corrupted trustdb.  Example:
520                  gpg --export-ownertrust > otrust.txt
521
522
523
524       --import-ownertrust
525              Update  the  trustdb  with the ownertrust values stored in files
526              (or STDIN if not given); existing values  will  be  overwritten.
527              In  case  of a severely damaged trustdb and if you have a recent
528              backup of the ownertrust values (e.g. in the file ‘otrust.txt’),
529              you may re-create the trustdb using these commands:
530                  cd ~/.gnupg
531                  rm trustdb.gpg
532                  gpg --import-ownertrust < otrust.txt
533
534
535
536       --rebuild-keydb-caches
537              When updating from version 1.0.6 to 1.0.7 this command should be
538              used to create signature caches in  the  keyring.  It  might  be
539              handy in other situations too.
540
541
542       --print-md algo
543       --print-mds
544              Print  message  digest  of algorithm algo for all given files or
545              STDIN.  With the second form (or  a  deprecated  "*"  for  algo)
546              digests for all available algorithms are printed.
547
548
549       --gen-random 0|1|2 count
550              Emit count random bytes of the given quality level 0, 1 or 2. If
551              count is not given or zero, an endless sequence of random  bytes
552              will be emitted.  If used with --armor the output will be base64
553              encoded.  PLEASE, don't use this command unless  you  know  what
554              you are doing; it may remove precious entropy from the system!
555
556
557       --gen-prime mode bits
558              Use the source, Luke :-). The output format is subject to change
559              with ant release.
560
561
562
563       --enarmor
564       --dearmor
565              Pack or unpack an arbitrary input  into/from  an  OpenPGP  ASCII
566              armor.   This is a GnuPG extension to OpenPGP and in general not
567              very useful.
568
569
570       --tofu-policy {auto|good|unknown|bad|ask} keys
571              Set the TOFU policy for all the  bindings  associated  with  the
572              specified  keys.   For more information about the meaning of the
573              policies, see: [trust-model-tofu].  The keys  may  be  specified
574              either by their fingerprint (preferred) or their keyid.
575
576
577
578   How to manage your keys
579
580
581       This section explains the main commands for key management.
582
583
584
585       --quick-generate-key user-id [algo [usage [expire]]]
586       --quick-gen-key
587              This  is  a  simple  command to generate a standard key with one
588              user id.  In contrast to --generate-key  the  key  is  generated
589              directly  without the need to answer a bunch of prompts.  Unless
590              the option --yes is given, the key creation will be canceled  if
591              the given user id already exists in the keyring.
592
593              If  invoked  directly on the console without any special options
594              an answer  to  a  ``Continue?''  style  confirmation  prompt  is
595              required.   In  case the user id already exists in the keyring a
596              second prompt to force the creation of the key will show up.
597
598              If algo or usage are given, only the primary key is created  and
599              no  prompts  are shown.  To specify an expiration date but still
600              create  a  primary  and  subkey  use  ``default''  or  ``future-
601              default'' for algo and ``default'' for usage.  For a description
602              of these optional arguments  see  the  command  --quick-add-key.
603              The  usage  accepts also the value ``cert'' which can be used to
604              create a certification only primary key; the  default  is  to  a
605              create certification and signing key.
606
607              The  expire  argument  can be used to specify an expiration date
608              for the key.  Several formats are supported;  commonly  the  ISO
609              formats ``YYYY-MM-DD'' or ``YYYYMMDDThhmmss'' are used.  To make
610              the key expire in N seconds, N days, N weeks,  N  months,  or  N
611              years  use  ``seconds=N'',  ``Nd'',  ``Nw'',  ``Nm'',  or ``Ny''
612              respectively.  Not specifying a value, or using ``-'' results in
613              a  key  expiring  in  a reasonable default interval.  The values
614              ``never'', ``none'' can be used for no expiration date.
615
616              If this command is used with --batch, --pinentry-mode  has  been
617              set   to   loopback,   and   one   of   the  passphrase  options
618              (--passphrase, --passphrase-fd, or passphrase-file) is used, the
619              supplied  passphrase  is used for the new key and the agent does
620              not ask  for  it.   To  create  a  key  without  any  protection
621              --passphrase '' may be used.
622
623              Note  that  it  is possible to create a primary key and a subkey
624              using non-default algorithms by using ``default''  and  changing
625              the default parameters using the option --default-new-key-algo.
626
627
628       --quick-set-expire fpr expire [*|subfprs]
629              With  two  arguments  given, directly set the expiration time of
630              the primary key identified by fpr  to  expire.   To  remove  the
631              expiration  time  0  can  be used.  With three arguments and the
632              third given as an asterisk, the  expiration  time  of  all  non-
633              revoked  and  not  yet  expired subkeys are set to expire.  With
634              more than two arguments and a list  of  fingerprints  given  for
635              subfprs, all non-revoked subkeys matching these fingerprints are
636              set to expire.
637
638
639
640       --quick-add-key fpr [algo [usage [expire]]]
641              Directly add a subkey to the key identified by  the  fingerprint
642              fpr.   Without  the  optional  arguments an encryption subkey is
643              added.  If any of the arguments are given a more specific subkey
644              is added.
645
646              algo may be any of the supported algorithms or curve names given
647              in the format as used by key listings.  To use the default algo‐
648              rithm  the  string  ``default'' or ``-'' can be used.  Supported
649              algorithms   are   ``rsa'',   ``dsa'',   ``elg'',   ``ed25519'',
650              ``cv25519'',  and  other  ECC  curves.   For  example the string
651              ``rsa'' adds an RSA key with the default key  length;  a  string
652              ``rsa4096''  requests  that  the  key  length is 4096 bits.  The
653              string ``future-default'' is an alias for  the  algorithm  which
654              will  likely  be used as default algorithm in future versions of
655              gpg.  To list the supported ECC curves the command  gpg  --with-
656              colons --list-config curve can be used.
657
658              Depending  on the given algo the subkey may either be an encryp‐
659              tion subkey or a signing subkey.  If an algorithm is capable  of
660              signing  and  encryption  and  such a subkey is desired, a usage
661              string must be given.  This  string  is  either  ``default''  or
662              ``-''  to  keep  the default or a comma delimited list (or space
663              delimited list) of keywords:  ``sign''  for  a  signing  subkey,
664              ``auth''  for  an  authentication  subkey,  and  ``encr'' for an
665              encryption  subkey  (``encrypt''  can  be  used  as  alias   for
666              ``encr'').  The valid combinations depend on the algorithm.
667
668              The  expire  argument  can be used to specify an expiration date
669              for the key.  Several formats are supported;  commonly  the  ISO
670              formats ``YYYY-MM-DD'' or ``YYYYMMDDThhmmss'' are used.  To make
671              the key expire in N seconds, N days, N weeks,  N  months,  or  N
672              years  use  ``seconds=N'',  ``Nd'',  ``Nw'',  ``Nm'',  or ``Ny''
673              respectively.  Not specifying a value, or using ``-'' results in
674              a  key  expiring  in  a reasonable default interval.  The values
675              ``never'', ``none'' can be used for no expiration date.
676
677
678       --generate-key
679       --gen-key
680              Generate a new key pair using the  current  default  parameters.
681              This  is  the standard command to create a new key.  In addition
682              to the key a revocation certificate is created and stored in the
683openpgp-revocs.d’ directory below the GnuPG home directory.
684
685
686       --full-generate-key
687       --full-gen-key
688              Generate  a  new key pair with dialogs for all options.  This is
689              an extended version of --generate-key.
690
691              There is also a feature which allows you to create keys in batch
692              mode.  See  the  manual section ``Unattended key generation'' on
693              how to use this.
694
695
696
697       --generate-revocation name
698       --gen-revoke name
699              Generate a revocation certificate for the complete key.  To only
700              revoke a subkey or a key signature, use the --edit command.
701
702              This  command  merely creates the revocation certificate so that
703              it can be used to revoke the key if that  is  ever  needed.   To
704              actually  revoke  a key the created revocation certificate needs
705              to be merged with the key to revoke.  This is done by  importing
706              the revocation certificate using the --import command.  Then the
707              revoked key needs to be published, which is best done by sending
708              the  key  to  a  keyserver (command --send-key) and by exporting
709              (--export) it to a file which is then send to frequent  communi‐
710              cation partners.
711
712
713
714       --generate-designated-revocation name
715       --desig-revoke name
716              Generate  a  designated  revocation  certificate for a key. This
717              allows a user (with the permission of the keyholder)  to  revoke
718              someone else's key.
719
720
721
722       --edit-key
723              Present  a  menu which enables you to do most of the key manage‐
724              ment related tasks.  It expects the specification of  a  key  on
725              the command line.
726
727
728
729              uid n  Toggle  selection of user ID or photographic user ID with
730                     index n.  Use * to select all and 0 to deselect all.
731
732
733              key n  Toggle selection of subkey with index n or key ID n.  Use
734                     * to select all and 0 to deselect all.
735
736
737              sign   Make  a  signature on key of user name. If the key is not
738                     yet signed by the default user (or the users  given  with
739                     -u),  the  program  displays  the  information of the key
740                     again, together with its fingerprint and asks whether  it
741                     should be signed. This question is repeated for all users
742                     specified with -u.
743
744
745              lsign  Same as "sign"  but  the  signature  is  marked  as  non-
746                     exportable  and  will  therefore never be used by others.
747                     This may be used to make keys valid  only  in  the  local
748                     environment.
749
750
751              nrsign Same as "sign" but the signature is marked as non-revoca‐
752                     ble and can therefore never be revoked.
753
754
755              tsign  Make a trust signature. This is a signature that combines
756                     the  notions of certification (like a regular signature),
757                     and trust (like the "trust"  command).  It  is  generally
758                     only  useful in distinct communities or groups.  For more
759                     information please read the sections ``Trust  Signature''
760                     and ``Regular Expression'' in RFC-4880.
761
762              Note  that "l" (for local / non-exportable), "nr" (for non-revo‐
763              cable, and "t" (for trust) may be freely mixed and  prefixed  to
764              "sign" to create a signature of any type desired.
765
766       If  the  option  --only-sign-text-ids  is  specified, then any non-text
767       based user ids (e.g., photo IDs) will not be selected for signing.
768
769
770
771              delsig Delete a signature. Note  that  it  is  not  possible  to
772                     retract  a signature, once it has been send to the public
773                     (i.e. to a keyserver).   In  that  case  you  better  use
774                     revsig.
775
776
777              revsig Revoke  a  signature.  For every signature which has been
778                     generated by one of the secret keys, GnuPG asks whether a
779                     revocation certificate should be generated.
780
781
782              check  Check  the signatures on all selected user IDs.  With the
783                     extra option selfsig only self-signatures are shown.
784
785
786              adduid Create an additional user ID.
787
788
789              addphoto
790                     Create a photographic user ID. This  will  prompt  for  a
791                     JPEG  file  that  will be embedded into the user ID. Note
792                     that a very large JPEG will make for a  very  large  key.
793                     Also  note  that  some  programs  will  display your JPEG
794                     unchanged (GnuPG), and some programs will scale it to fit
795                     in a dialog box (PGP).
796
797
798              showphoto
799                     Display the selected photographic user ID.
800
801
802              deluid Delete  a  user ID or photographic user ID.  Note that it
803                     is not possible to retract a user id, once  it  has  been
804                     send  to  the public (i.e. to a keyserver).  In that case
805                     you better use revuid.
806
807
808              revuid Revoke a user ID or photographic user ID.
809
810
811              primary
812                     Flag the current user id as the primary one, removes  the
813                     primary user id flag from all other user ids and sets the
814                     timestamp of  all  affected  self-signatures  one  second
815                     ahead. Note that setting a photo user ID as primary makes
816                     it primary over other photo user IDs, and setting a regu‐
817                     lar  user ID as primary makes it primary over other regu‐
818                     lar user IDs.
819
820
821              keyserver
822                     Set a preferred keyserver for the specified  user  ID(s).
823                     This allows other users to know where you prefer they get
824                     your key from. See  --keyserver-options  honor-keyserver-
825                     url  for  more  on  how  this  works.  Setting a value of
826                     "none" removes an existing preferred keyserver.
827
828
829              notation
830                     Set a name=value notation for the specified  user  ID(s).
831                     See --cert-notation for more on how this works. Setting a
832                     value of "none" removes all notations, setting a notation
833                     prefixed with a minus sign (-) removes that notation, and
834                     setting a notation name  (without  the  =value)  prefixed
835                     with a minus sign removes all notations with that name.
836
837
838              pref   List  preferences  from  the selected user ID. This shows
839                     the actual preferences,  without  including  any  implied
840                     preferences.
841
842
843              showpref
844                     More  verbose  preferences  listing for the selected user
845                     ID. This shows the preferences in effect by including the
846                     implied preferences of 3DES (cipher), SHA-1 (digest), and
847                     Uncompressed  (compression)  if  they  are  not   already
848                     included  in  the  preference list. In addition, the pre‐
849                     ferred keyserver and signature  notations  (if  any)  are
850                     shown.
851
852
853              setpref string
854                     Set the list of user ID preferences to string for all (or
855                     just the selected) user  IDs.  Calling  setpref  with  no
856                     arguments sets the preference list to the default (either
857                     built-in or set via --default-preference-list), and call‐
858                     ing  setpref  with  "none"  as the argument sets an empty
859                     preference list. Use gpg  --version  to  get  a  list  of
860                     available  algorithms. Note that while you can change the
861                     preferences on an attribute user  ID  (aka  "photo  ID"),
862                     GnuPG  does  not  select  keys  via attribute user IDs so
863                     these preferences will not be used by GnuPG.
864
865                     When setting preferences, you should list the  algorithms
866                     in the order which you'd like to see them used by someone
867                     else when encrypting a message to your key.  If you don't
868                     include  3DES, it will be automatically added at the end.
869                     Note that there are many factors that go into choosing an
870                     algorithm  (for  example,  your  key  may not be the only
871                     recipient), and so the remote OpenPGP  application  being
872                     used to send to you may or may not follow your exact cho‐
873                     sen order for a given message.  It  will,  however,  only
874                     choose  an  algorithm  that  is present on the preference
875                     list of every recipient key.  See also the INTEROPERABIL‐
876                     ITY WITH OTHER OPENPGP PROGRAMS section below.
877
878
879              addkey Add a subkey to this key.
880
881
882              addcardkey
883                     Generate a subkey on a card and add it to this key.
884
885
886              keytocard
887                     Transfer  the  selected secret subkey (or the primary key
888                     if no subkey has  been  selected)  to  a  smartcard.  The
889                     secret  key  in the keyring will be replaced by a stub if
890                     the key could be stored successfully on the card and  you
891                     use the save command later. Only certain key types may be
892                     transferred to the card. A sub menu allows you to  select
893                     on what card to store the key. Note that it is not possi‐
894                     ble to get that key back from the card - if the card gets
895                     broken  your  secret  key  will be lost unless you have a
896                     backup somewhere.
897
898
899              bkuptocard file
900                     Restore the given file to a card.  This  command  may  be
901                     used  to  restore  a backup key (as generated during card
902                     initialization) to a new card. In almost all  cases  this
903                     will  be  the encryption key. You should use this command
904                     only with the corresponding public key and make sure that
905                     the  file  given  as  argument  is  indeed  the backup to
906                     restore. You should then select 2 to restore  as  encryp‐
907                     tion   key.   You  will  first  be  asked  to  enter  the
908                     passphrase of the backup key and then for the  Admin  PIN
909                     of the card.
910
911
912              delkey Remove a subkey (secondary key). Note that it is not pos‐
913                     sible to retract a subkey, once it has been send  to  the
914                     public  (i.e.  to  a keyserver).  In that case you better
915                     use revkey.  Also note that this only deletes the  public
916                     part of a key.
917
918
919              revkey Revoke a subkey.
920
921
922              expire Change  the key or subkey expiration time. If a subkey is
923                     selected, the expiration time  of  this  subkey  will  be
924                     changed.  With  no  selection,  the key expiration of the
925                     primary key is changed.
926
927
928              trust  Change the owner trust value for the  key.  This  updates
929                     the trust-db immediately and no save is required.
930
931
932              disable
933              enable Disable  or  enable an entire key. A disabled key can not
934                     normally be used for encryption.
935
936
937              addrevoker
938                     Add a designated revoker  to  the  key.  This  takes  one
939                     optional  argument:  "sensitive". If a designated revoker
940                     is marked as  sensitive,  it  will  not  be  exported  by
941                     default (see export-options).
942
943
944              passwd Change the passphrase of the secret key.
945
946
947              toggle This is dummy command which exists only for backward com‐
948                     patibility.
949
950
951              clean  Compact (by removing all signatures except  the  selfsig)
952                     any  user  ID  that is no longer usable (e.g. revoked, or
953                     expired). Then, remove any signatures that are not usable
954                     by  the  trust  calculations.  Specifically, this removes
955                     any signature that does not validate, any signature  that
956                     is  superseded  by a later signature, revoked signatures,
957                     and signatures issued by keys that are not present on the
958                     keyring.
959
960
961              minimize
962                     Make  the key as small as possible. This removes all sig‐
963                     natures from each user ID  except  for  the  most  recent
964                     self-signature.
965
966
967              change-usage
968                     Change  the usage flags (capabilities) of the primary key
969                     or of subkeys.  These usage flags  (e.g.  Certify,  Sign,
970                     Authenticate,  Encrypt)  are  set  during  key  creation.
971                     Sometimes it is useful to have the opportunity to  change
972                     them  (for  example  to add Authenticate) after they have
973                     been created.  Please take  care  when  doing  this;  the
974                     allowed usage flags depend on the key algorithm.
975
976
977              cross-certify
978                     Add  cross-certification  signatures  to  signing subkeys
979                     that may not  currently  have  them.  Cross-certification
980                     signatures  protect against a subtle attack against sign‐
981                     ing subkeys. See --require-cross-certification.  All  new
982                     keys  generated  have  this signature by default, so this
983                     command is only useful to bring older keys up to date.
984
985
986              save   Save all changes to the keyrings and quit.
987
988
989              quit   Quit the program without updating the keyrings.
990
991              The listing shows you the key with its secondary  keys  and  all
992              user  IDs.   The  primary  user  ID  is  indicated by a dot, and
993              selected keys or user IDs are indicated  by  an  asterisk.   The
994              trust  value  is  displayed with the primary key: "trust" is the
995              assigned owner trust and "validity" is the  calculated  validity
996              of  the  key.   Validity  values are also displayed for all user
997              IDs.  For possible values of trust, see: [trust-values].
998
999
1000       --sign-key name
1001              Signs a public key with your secret key. This is a shortcut ver‐
1002              sion of the subcommand "sign" from --edit.
1003
1004
1005       --lsign-key name
1006              Signs  a  public  key  with your secret key but marks it as non-
1007              exportable. This is a shortcut version of the subcommand "lsign"
1008              from --edit-key.
1009
1010
1011       --quick-sign-key fpr [names]
1012       --quick-lsign-key fpr [names]
1013              Directly sign a key from the passphrase without any further user
1014              interaction.  The fpr must be the verified  primary  fingerprint
1015              of a key in the local keyring. If no names are given, all useful
1016              user ids are signed; with given [names]  only  useful  user  ids
1017              matching  one  of  theses names are signed.  By default, or if a
1018              name is prefixed with a '*', a case insensitive substring  match
1019              is  used.   If  a  name  is prefixed with a '=' a case sensitive
1020              exact match is done.
1021
1022              The command  --quick-lsign-key  marks  the  signatures  as  non-
1023              exportable.   If  such a non-exportable signature already exists
1024              the --quick-sign-key turns it into a exportable signature.
1025
1026              This command uses reasonable defaults and thus does not  provide
1027              the  full  flexibility of the "sign" subcommand from --edit-key.
1028              Its intended use is to help unattended key signing by  utilizing
1029              a list of verified fingerprints.
1030
1031
1032       --quick-add-uid user-id new-user-id
1033              This command adds a new user id to an existing key.  In contrast
1034              to the interactive sub-command adduid  of  --edit-key  the  new-
1035              user-id  is  added verbatim with only leading and trailing white
1036              space removed, it is expected to be UTF-8 encoded, and no checks
1037              on its form are applied.
1038
1039
1040       --quick-revoke-uid user-id user-id-to-revoke
1041              This command revokes a user ID on an existing key.  It cannot be
1042              used to revoke the last user ID on key (some non-revoked user ID
1043              must  remain),  with  revocation  reason  ``User ID is no longer
1044              valid''.  If you want to specify a different revocation  reason,
1045              or  to  supply supplementary revocation text, you should use the
1046              interactive sub-command revuid of --edit-key.
1047
1048
1049       --quick-set-primary-uid user-id primary-user-id
1050              This command sets or updates the primary  user  ID  flag  on  an
1051              existing key.  user-id specifies the key and primary-user-id the
1052              user ID which shall be flagged as the primary user ID.  The pri‐
1053              mary  user  ID  flag  is removed from all other user ids and the
1054              timestamp of all affected  self-signatures  is  set  one  second
1055              ahead.
1056
1057
1058
1059       --change-passphrase user-id
1060       --passwd user-id
1061              Change  the  passphrase  of the secret key belonging to the cer‐
1062              tificate specified as user-id.  This is a shortcut for the  sub-
1063              command  passwd  of the edit key menu.  When using together with
1064              the  option  --dry-run  this  will  not  actually   change   the
1065              passphrase but check that the current passphrase is correct.
1066
1067

OPTIONS

1069       gpg  features  a bunch of options to control the exact behaviour and to
1070       change the default configuration.
1071
1072
1073       Long   options   can   be   put   in   an   options    file    (default
1074       "~/.gnupg/gpg.conf").  Short  option names will not work - for example,
1075       "armor" is a valid option for the options file, while "a"  is  not.  Do
1076       not  write  the  2  dashes,  but  simply the name of the option and any
1077       required arguments. Lines with a hash ('#')  as  the  first  non-white-
1078       space  character are ignored. Commands may be put in this file too, but
1079       that is not generally useful as the command will execute  automatically
1080       with every execution of gpg.
1081
1082       Please  remember  that  option parsing stops as soon as a non-option is
1083       encountered, you can explicitly  stop  parsing  by  using  the  special
1084       option --.
1085
1086
1087
1088   How to change the configuration
1089
1090
1091       These  options  are  used  to  change the configuration and are usually
1092       found in the option file.
1093
1094
1095
1096       --default-key name
1097              Use name as the default key to sign with. If this option is  not
1098              used,  the  default  key  is  the  first key found in the secret
1099              keyring.  Note that -u or --local-user  overrides  this  option.
1100              This option may be given multiple times.  In this case, the last
1101              key for which a secret key is available is used.  If there is no
1102              secret key available for any of the specified values, GnuPG will
1103              not emit an error message but continue as if this option  wasn't
1104              given.
1105
1106
1107       --default-recipient name
1108              Use  name as default recipient if option --recipient is not used
1109              and don't ask if this is a valid one. name must be non-empty.
1110
1111
1112       --default-recipient-self
1113              Use the default key as default recipient if  option  --recipient
1114              is  not  used  and don't ask if this is a valid one. The default
1115              key is the first one from the secret keyring or the one set with
1116              --default-key.
1117
1118
1119       --no-default-recipient
1120              Reset --default-recipient and --default-recipient-self.
1121
1122
1123       -v, --verbose
1124              Give  more  information  during  processing.  If used twice, the
1125              input data is listed in detail.
1126
1127
1128       --no-verbose
1129              Reset verbose level to 0.
1130
1131
1132       -q, --quiet
1133              Try to be as quiet as possible.
1134
1135
1136       --batch
1137       --no-batch
1138              Use batch mode.  Never ask, do not allow  interactive  commands.
1139              --no-batch disables this option.  Note that even with a filename
1140              given on the command line, gpg might still  need  to  read  from
1141              STDIN (in particular if gpg figures that the input is a detached
1142              signature and no data file has been specified).  Thus if you  do
1143              not  want  to  feed  data via STDIN, you should connect STDIN to
1144              g‘/dev/null’.
1145
1146              It is highly recommended to  use  this  option  along  with  the
1147              options  --status-fd and --with-colons for any unattended use of
1148              gpg.
1149
1150
1151       --no-tty
1152              Make sure that the TTY (terminal) is never used for any  output.
1153              This  option  is  needed  in  some cases because GnuPG sometimes
1154              prints warnings to the TTY even if --batch is used.
1155
1156
1157       --yes  Assume "yes" on most questions.
1158
1159
1160       --no   Assume "no" on most questions.
1161
1162
1163
1164       --list-options parameters
1165              This is a space or comma delimited  string  that  gives  options
1166              used  when  listing  keys  and signatures (that is, --list-keys,
1167              --check-signatures, --list-public-keys, --list-secret-keys,  and
1168              the  --edit-key functions).  Options can be prepended with a no-
1169              (after the two  dashes)  to  give  the  opposite  meaning.   The
1170              options are:
1171
1172
1173
1174              show-photos
1175                     Causes  --list-keys,  --check-signatures,  --list-public-
1176                     keys, and --list-secret-keys to  display  any  photo  IDs
1177                     attached  to  the key.  Defaults to no. See also --photo-
1178                     viewer.   Does   not   work   with   --with-colons:   see
1179                     --attribute-fd  for the appropriate way to get photo data
1180                     for scripts and other frontends.
1181
1182
1183              show-usage
1184                     Show usage information for keys and subkeys in the  stan‐
1185                     dard  key  listing.  This is a list of letters indicating
1186                     the allowed usage for  a  key  (E=encryption,  S=signing,
1187                     C=certification, A=authentication).  Defaults to yes.
1188
1189
1190              show-policy-urls
1191                     Show  policy  URLs  in  the  --check-signatures listings.
1192                     Defaults to no.
1193
1194
1195              show-notations
1196              show-std-notations
1197              show-user-notations
1198                     Show all, IETF standard, or user-defined signature  nota‐
1199                     tions in the --check-signatures listings. Defaults to no.
1200
1201
1202              show-keyserver-urls
1203                     Show  any  preferred  keyserver URL in the --check-signa‐
1204                     tures listings. Defaults to no.
1205
1206
1207              show-uid-validity
1208                     Display the calculated validity of user  IDs  during  key
1209                     listings.  Defaults to yes.
1210
1211
1212              show-unusable-uids
1213                     Show  revoked  and  expired  user  IDs  in  key listings.
1214                     Defaults to no.
1215
1216
1217              show-unusable-subkeys
1218                     Show  revoked  and  expired  subkeys  in  key   listings.
1219                     Defaults to no.
1220
1221
1222              show-keyring
1223                     Display  the  keyring name at the head of key listings to
1224                     show which keyring a given key resides  on.  Defaults  to
1225                     no.
1226
1227
1228              show-sig-expire
1229                     Show  signature expiration dates (if any) during --check-
1230                     signatures listings. Defaults to no.
1231
1232
1233              show-sig-subpackets
1234                     Include signature subpackets in  the  key  listing.  This
1235                     option can take an optional argument list of the subpack‐
1236                     ets to list. If no argument is passed, list all  subpack‐
1237                     ets.  Defaults to no. This option is only meaningful when
1238                     using --with-colons along with --check-signatures.
1239
1240
1241              show-only-fpr-mbox
1242                     For each valid  user-id  which  also  has  a  valid  mail
1243                     address print only the fingerprint and the mail address.
1244
1245
1246       --verify-options parameters
1247              This  is  a  space  or comma delimited string that gives options
1248              used when verifying signatures. Options can be prepended with  a
1249              `no-' to give the opposite meaning. The options are:
1250
1251
1252
1253              show-photos
1254                     Display  any photo IDs present on the key that issued the
1255                     signature.  Defaults to no. See also --photo-viewer.
1256
1257
1258              show-policy-urls
1259                     Show  policy  URLs  in  the  signature  being   verified.
1260                     Defaults to yes.
1261
1262
1263              show-notations
1264              show-std-notations
1265              show-user-notations
1266                     Show  all, IETF standard, or user-defined signature nota‐
1267                     tions in the signature being verified. Defaults  to  IETF
1268                     standard.
1269
1270
1271              show-keyserver-urls
1272                     Show  any  preferred keyserver URL in the signature being
1273                     verified.  Defaults to yes.
1274
1275
1276              show-uid-validity
1277                     Display the calculated validity of the user  IDs  on  the
1278                     key that issued the signature. Defaults to yes.
1279
1280
1281              show-unusable-uids
1282                     Show  revoked and expired user IDs during signature veri‐
1283                     fication.  Defaults to no.
1284
1285
1286              show-primary-uid-only
1287                     Show only the primary user ID during signature  verifica‐
1288                     tion.  That is all the AKA lines as well as photo Ids are
1289                     not shown with the signature verification status.
1290
1291
1292              pka-lookups
1293                     Enable PKA lookups to verify sender addresses. Note  that
1294                     PKA is based on DNS, and so enabling this option may dis‐
1295                     close information on when and what signatures  are  veri‐
1296                     fied or to whom data is encrypted. This is similar to the
1297                     "web bug" described for the --auto-key-retrieve option.
1298
1299
1300              pka-trust-increase
1301                     Raise the trust in a signature to full if  the  signature
1302                     passes  PKA validation. This option is only meaningful if
1303                     pka-lookups is set.
1304
1305
1306       --enable-large-rsa
1307       --disable-large-rsa
1308              With --generate-key and --batch,  enable  the  creation  of  RSA
1309              secret  keys  as large as 8192 bit.  Note: 8192 bit is more than
1310              is generally recommended.  These large keys don't  significantly
1311              improve  security, but they are more expensive to use, and their
1312              signatures and certifications are larger.  This option  is  only
1313              available if the binary was build with large-secmem support.
1314
1315
1316       --enable-dsa2
1317       --disable-dsa2
1318              Enable hash truncation for all DSA keys even for old DSA Keys up
1319              to 1024 bit.  This is also the  default  with  --openpgp.   Note
1320              that  older  versions  of GnuPG also required this flag to allow
1321              the generation of DSA larger than 1024 bit.
1322
1323
1324       --photo-viewer string
1325              This is the command line that should be run to view a photo  ID.
1326              "%i"  will  be expanded to a filename containing the photo. "%I"
1327              does the same, except the file will  not  be  deleted  once  the
1328              viewer exits.  Other flags are "%k" for the key ID, "%K" for the
1329              long key ID, "%f" for the key fingerprint, "%t" for  the  exten‐
1330              sion  of  the image type (e.g. "jpg"), "%T" for the MIME type of
1331              the image (e.g. "image/jpeg"),  "%v"  for  the  single-character
1332              calculated  validity  of the image being viewed (e.g. "f"), "%V"
1333              for the calculated validity as a string (e.g.  "full"), "%U" for
1334              a  base32  encoded  hash  of the user ID, and "%%" for an actual
1335              percent sign. If neither %i or %I are present,  then  the  photo
1336              will be supplied to the viewer on standard input.
1337
1338              The  default  viewer  is  "xloadimage -fork -quiet -title 'KeyID
1339              0x%k' STDIN". Note that if your  image  viewer  program  is  not
1340              secure, then executing it from GnuPG does not make it secure.
1341
1342
1343       --exec-path string
1344              Sets  a list of directories to search for photo viewers and key‐
1345              server helpers. If not provided, keyserver helpers use the  com‐
1346              piled-in default directory, and photo viewers use the PATH envi‐
1347              ronment variable.  Note,  that  on  W32  system  this  value  is
1348              ignored when searching for keyserver helpers.
1349
1350
1351       --keyring file
1352              Add  file to the current list of keyrings. If file begins with a
1353              tilde and a slash, these are replaced by the $HOME directory. If
1354              the  filename  does  not contain a slash, it is assumed to be in
1355              the GnuPG home directory ("~/.gnupg" if --homedir or  $GNUPGHOME
1356              is not used).
1357
1358              Note that this adds a keyring to the current list. If the intent
1359              is to use the specified keyring alone, use --keyring along  with
1360              --no-default-keyring.
1361
1362              If  the  option  --no-keyring  has been used no keyrings will be
1363              used at all.
1364
1365
1366
1367       --secret-keyring file
1368              This is an obsolete option and ignored.   All  secret  keys  are
1369              stored in the ‘private-keys-v1.d’ directory below the GnuPG home
1370              directory.
1371
1372
1373       --primary-keyring file
1374              Designate file as the primary public keyring.  This  means  that
1375              newly imported keys (via --import or keyserver --recv-from) will
1376              go to this keyring.
1377
1378
1379       --trustdb-name file
1380              Use file instead of the default trustdb. If file begins  with  a
1381              tilde and a slash, these are replaced by the $HOME directory. If
1382              the filename does not contain a slash, it is assumed  to  be  in
1383              the  GnuPG home directory (‘~/.gnupg’ if --homedir or $GNUPGHOME
1384              is not used).
1385
1386
1387       --homedir dir
1388              Set the name of the home directory to dir. If this option is not
1389              used,  the  home  directory  defaults to ‘~/.gnupg’.  It is only
1390              recognized when given on the command line.   It  also  overrides
1391              any  home  directory  stated  through  the  environment variable
1392GNUPGHOME’ or (on Windows systems) by  means  of  the  Registry
1393              entry HKCU\Software\GNU\GnuPG:HomeDir.
1394
1395              On Windows systems it is possible to install GnuPG as a portable
1396              application.  In this case only this command line option is con‐
1397              sidered, all other ways to set a home directory are ignored.
1398
1399              To install GnuPG as a portable application under Windows, create
1400              an empty file named ‘gpgconf.ctl’ in the same directory  as  the
1401              tool  ‘gpgconf.exe’.   The root of the installation is then that
1402              directory; or, if  ‘gpgconf.exe’  has  been  installed  directly
1403              below  a  directory named ‘bin’, its parent directory.  You also
1404              need to make sure that the following directories exist  and  are
1405              writable:     ‘ROOT/home’     for    the    GnuPG    home    and
1406ROOT/var/cache/gnupg’ for internal cache files.
1407
1408
1409
1410       --display-charset name
1411              Set the name of the native character set. This is used  to  con‐
1412              vert  some  informational  strings  like  user IDs to the proper
1413              UTF-8 encoding.  Note that this has nothing to do with the char‐
1414              acter  set  of  data  to  be encrypted or signed; GnuPG does not
1415              recode user-supplied data. If  this  option  is  not  used,  the
1416              default  character  set is determined from the current locale. A
1417              verbosity level of 3 shows the chosen  set.   Valid  values  for
1418              name are:
1419
1420
1421
1422              iso-8859-1
1423                     This is the Latin 1 set.
1424
1425
1426              iso-8859-2
1427                     The Latin 2 set.
1428
1429
1430              iso-8859-15
1431                     This is currently an alias for the Latin 1 set.
1432
1433
1434              koi8-r The usual Russian set (RFC-1489).
1435
1436
1437              utf-8  Bypass  all  translations  and  assume  that  the OS uses
1438                     native UTF-8 encoding.
1439
1440
1441       --utf8-strings
1442       --no-utf8-strings
1443              Assume that command line arguments are given as  UTF-8  strings.
1444              The  default (--no-utf8-strings) is to assume that arguments are
1445              encoded in the character set as specified by  --display-charset.
1446              These  options  affect all following arguments. Both options may
1447              be used multiple times.
1448
1449
1450
1451       --options file
1452              Read options from file and do not try  to  read  them  from  the
1453              default options file in the homedir (see --homedir). This option
1454              is ignored if used in an options file.
1455
1456
1457       --no-options
1458              Shortcut for --options /dev/null. This option is detected before
1459              an  attempt to open an option file.  Using this option will also
1460              prevent the creation of a ‘~/.gnupg’ homedir.
1461
1462
1463       -z n
1464       --compress-level n
1465       --bzip2-compress-level n
1466              Set compression level to n for  the  ZIP  and  ZLIB  compression
1467              algorithms.  The default is to use the default compression level
1468              of zlib (normally 6). --bzip2-compress-level sets  the  compres‐
1469              sion  level for the BZIP2 compression algorithm (defaulting to 6
1470              as well). This is a different option from --compress-level since
1471              BZIP2  uses  a  significant amount of memory for each additional
1472              compression level.  -z sets both. A value of 0  for  n  disables
1473              compression.
1474
1475
1476       --bzip2-decompress-lowmem
1477              Use a different decompression method for BZIP2 compressed files.
1478              This alternate method uses a bit more than half the memory,  but
1479              also  runs  at  half the speed. This is useful under extreme low
1480              memory circumstances when the file was originally compressed  at
1481              a high --bzip2-compress-level.
1482
1483
1484
1485       --mangle-dos-filenames
1486       --no-mangle-dos-filenames
1487              Older  version of Windows cannot handle filenames with more than
1488              one dot. --mangle-dos-filenames causes GnuPG to replace  (rather
1489              than  add  to) the extension of an output filename to avoid this
1490              problem. This option is off by default and has no effect on non-
1491              Windows platforms.
1492
1493
1494       --ask-cert-level
1495       --no-ask-cert-level
1496              When  making  a key signature, prompt for a certification level.
1497              If this option is not specified, the certification level used is
1498              set   via  --default-cert-level.  See  --default-cert-level  for
1499              information on the specific levels and how they are used.  --no-
1500              ask-cert-level disables this option. This option defaults to no.
1501
1502
1503       --default-cert-level n
1504              The default to use for the check level when signing a key.
1505
1506              0  means  you  make  no particular claim as to how carefully you
1507              verified the key.
1508
1509              1 means you believe the key is owned by the person who claims to
1510              own it but you could not, or did not verify the key at all. This
1511              is useful for a "persona" verification, where you sign  the  key
1512              of a pseudonymous user.
1513
1514              2  means  you  did  casual verification of the key. For example,
1515              this could mean  that  you  verified  the  key  fingerprint  and
1516              checked the user ID on the key against a photo ID.
1517
1518              3  means you did extensive verification of the key. For example,
1519              this could mean that you verified the key fingerprint  with  the
1520              owner  of the key in person, and that you checked, by means of a
1521              hard to forge document with a photo ID (such as a passport) that
1522              the name of the key owner matches the name in the user ID on the
1523              key, and finally that you verified (by exchange of  email)  that
1524              the email address on the key belongs to the key owner.
1525
1526              Note  that  the examples given above for levels 2 and 3 are just
1527              that: examples. In the end, it is up to you to decide just  what
1528              "casual" and "extensive" mean to you.
1529
1530              This option defaults to 0 (no particular claim).
1531
1532
1533       --min-cert-level
1534              When  building  the  trust database, treat any signatures with a
1535              certification level below this as invalid. Defaults to 2,  which
1536              disregards  level 1 signatures. Note that level 0 "no particular
1537              claim" signatures are always accepted.
1538
1539
1540       --trusted-key long key ID
1541              Assume that the specified key (which must be given as a  full  8
1542              byte  key  ID) is as trustworthy as one of your own secret keys.
1543              This option is useful if you don't want to keep your secret keys
1544              (or  one  of them) online but still want to be able to check the
1545              validity of a given recipient's or signator's key.
1546
1547
1548       --trust-model {pgp|classic|tofu|tofu+pgp|direct|always|auto}
1549              Set what trust model GnuPG should follow. The models are:
1550
1551
1552
1553              pgp    This is the Web of Trust combined with  trust  signatures
1554                     as  used  in PGP 5.x and later. This is the default trust
1555                     model when creating a new trust database.
1556
1557
1558              classic
1559                     This is the standard Web of Trust as introduced by PGP 2.
1560
1561
1562              tofu
1563
1564                     TOFU stands for Trust On First Use.  In this trust model,
1565                     the  first time a key is seen, it is memorized.  If later
1566                     another key with a user id with the same email address is
1567                     seen, both keys are marked as suspect.  In that case, the
1568                     next time either is used, a warning is displayed describ‐
1569                     ing  the conflict, why it might have occurred (either the
1570                     user generated a new key and failed to cross sign the old
1571                     and  new keys, the key is forgery, or a man-in-the-middle
1572                     attack is being attempted), and the user is  prompted  to
1573                     manually confirm the validity of the key in question.
1574
1575                     Because a potential attacker is able to control the email
1576                     address and thereby  circumvent  the  conflict  detection
1577                     algorithm  by  using  an email address that is similar in
1578                     appearance to a trusted email address, whenever a message
1579                     is  verified,  statistics  about  the  number of messages
1580                     signed with the key are shown.  In this way, a  user  can
1581                     easily  identify attacks using fake keys for regular cor‐
1582                     respondents.
1583
1584                     When compared with the Web of Trust, TOFU offers signifi‐
1585                     cantly  weaker  security guarantees.  In particular, TOFU
1586                     only helps ensure consistency (that is, that the  binding
1587                     between a key and email address doesn't change).  A major
1588                     advantage of TOFU is that it requires little  maintenance
1589                     to  use correctly.  To use the web of trust properly, you
1590                     need to actively sign keys  and  mark  users  as  trusted
1591                     introducers.   This is a time-consuming process and anec‐
1592                     dotal  evidence  suggests  that  even  security-conscious
1593                     users  rarely  take  the  time  to do this thoroughly and
1594                     instead rely on an ad-hoc TOFU process.
1595
1596                     In the TOFU model, policies are associated with  bindings
1597                     between  keys  and  email  addresses (which are extracted
1598                     from user ids and normalized).  There are five  policies,
1599                     which can be set manually using the --tofu-policy option.
1600                     The default policy can be set using  the  --tofu-default-
1601                     policy option.
1602
1603                     The  TOFU policies are: auto, good, unknown, bad and ask.
1604                     The auto policy is used by default (unless overridden  by
1605                     --tofu-default-policy)  and marks a binding as marginally
1606                     trusted.  The good, unknown and bad policies mark a bind‐
1607                     ing  as fully trusted, as having unknown trust or as hav‐
1608                     ing trust never, respectively.   The  unknown  policy  is
1609                     useful  for  just  using TOFU to detect conflicts, but to
1610                     never assign positive trust to a binding.  The final pol‐
1611                     icy,  ask  prompts  the  user  to  indicate the binding's
1612                     trust.  If batch mode is enabled (or input is inappropri‐
1613                     ate  in  the  context), then the user is not prompted and
1614                     the undefined trust level is returned.
1615
1616
1617              tofu+pgp
1618                     This trust model combines TOFU with  the  Web  of  Trust.
1619                     This  is done by computing the trust level for each model
1620                     and then taking the maximum trust level where  the  trust
1621                     levels are ordered as follows: unknown < undefined < mar‐
1622                     ginal < fully < ultimate < expired < never.
1623
1624                     By setting --tofu-default-policy=unknown, this model  can
1625                     be  used  to  implement the web of trust with TOFU's con‐
1626                     flict detection algorithm, but without its assignment  of
1627                     positive  trust  values,  which  some  security-conscious
1628                     users don't like.
1629
1630
1631              direct Key validity is set directly by the user and  not  calcu‐
1632                     lated  via  the Web of Trust.  This model is solely based
1633                     on the key and does not distinguish user IDs.  Note  that
1634                     when  changing  to  another  trust model the trust values
1635                     assigned to a key are transformed into ownertrust values,
1636                     which also indicate how you trust the owner of the key to
1637                     sign other keys.
1638
1639
1640              always Skip key validation and assume that used keys are  always
1641                     fully  valid. You generally won't use this unless you are
1642                     using some external validation scheme. This  option  also
1643                     suppresses  the  "[uncertain]" tag printed with signature
1644                     checks when there is no evidence  that  the  user  ID  is
1645                     bound  to the key.  Note that this trust model still does
1646                     not allow the use of expired, revoked, or disabled keys.
1647
1648
1649              auto   Select the trust model depending on whatever the internal
1650                     trust  database says. This is the default model if such a
1651                     database already exists.  Note that a tofu trust model is
1652                     not considered here and must be enabled explicitly.
1653
1654
1655       --auto-key-locate mechanisms
1656       --no-auto-key-locate
1657              GnuPG can automatically locate and retrieve keys as needed using
1658              this option.  This happens when encrypting to an  email  address
1659              (in  the  "user@example.com" form), and there are no "user@exam‐
1660              ple.com" keys on the local keyring.  This option takes any  num‐
1661              ber  of the mechanisms listed below, in the order they are to be
1662              tried.  Instead of listing the  mechanisms  as  comma  delimited
1663              arguments,  the  option  may  also be given several times to add
1664              more mechanism.  The option --no-auto-key-locate or  the  mecha‐
1665              nism "clear" resets the list.  The default is "local,wkd".
1666
1667
1668
1669              cert   Locate a key using DNS CERT, as specified in RFC-4398.
1670
1671
1672              pka    Locate a key using DNS PKA.
1673
1674
1675              dane   Locate a key using DANE, as specified in draft-ietf-dane-
1676                     openpgpkey-05.txt.
1677
1678
1679              wkd    Locate a key using the Web Key Directory protocol.
1680
1681
1682              ldap   Using DNS Service Discovery, check the domain in question
1683                     for  any  LDAP keyservers to use.  If this fails, attempt
1684                     to locate the key  using  the  PGP  Universal  method  of
1685                     checking 'ldap://keys.(thedomain)'.
1686
1687
1688              keyserver
1689                     Locate  a  key  using whatever keyserver is defined using
1690                     the --keyserver option.
1691
1692
1693              keyserver-URL
1694                     In addition, a keyserver URL as used in  the  --keyserver
1695                     option  may  be  used  here to query that particular key‐
1696                     server.
1697
1698
1699              local  Locate the key using the local keyrings.  This  mechanism
1700                     allows the user to select the order a local key lookup is
1701                     done.  Thus using '--auto-key-locate local' is  identical
1702                     to --no-auto-key-locate.
1703
1704
1705              nodefault
1706                     This  flag  disables  the standard local key lookup, done
1707                     before any of the mechanisms defined by  the  --auto-key-
1708                     locate  are tried.  The position of this mechanism in the
1709                     list does not matter.  It is not  required  if  local  is
1710                     also used.
1711
1712
1713              clear  Clear all defined mechanisms.  This is useful to override
1714                     mechanisms given in a config file.  Note that a nodefault
1715                     in  mechanisms  will  also  be cleared unless it is given
1716                     after the clear.
1717
1718
1719
1720
1721       --auto-key-retrieve
1722       --no-auto-key-retrieve
1723              These options enable or disable the automatic retrieving of keys
1724              from a keyserver when verifying signatures made by keys that are
1725              not  on  the  local  keyring.   The  default  is  --no-auto-key-
1726              retrieve.
1727
1728              If  the method "wkd" is included in the list of methods given to
1729              auto-key-locate, the signer's user ID is part of the  signature,
1730              and  the  option  --disable-signer-uid  is  not  used, the "wkd"
1731              method may also be used to retrieve a key.
1732
1733              Note that this option makes a "web bug" like behavior  possible.
1734              Keyserver  or Web Key Directory operators can see which keys you
1735              request, so by sending you a message signed by a brand  new  key
1736              (which  you  naturally will not have on your local keyring), the
1737              operator can tell both your IP address and  the  time  when  you
1738              verified the signature.
1739
1740
1741       --keyid-format {none|short|0xshort|long|0xlong}
1742              Select  how to display key IDs.  "none" does not show the key ID
1743              at all but shows the fingerprint in a separate line.  "short" is
1744              the traditional 8-character key ID.  "long" is the more accurate
1745              (but less convenient) 16-character  key  ID.   Add  an  "0x"  to
1746              either  to include an "0x" at the beginning of the key ID, as in
1747              0x99242560.  Note that this option  is  ignored  if  the  option
1748              --with-colons is used.
1749
1750
1751       --keyserver name
1752              This option is deprecated - please use the --keyserver in ‘dirm‐
1753              ngr.conf’ instead.
1754
1755              Use name as your keyserver. This is the server  that  --receive-
1756              keys,  --send-keys,  and  --search-keys will communicate with to
1757              receive keys from, send keys to, and search  for  keys  on.  The
1758              format  of  the name is a URI: `scheme:[//]keyservername[:port]'
1759              The scheme is the type of keyserver: "hkp" for the HTTP (or com‐
1760              patible) keyservers, "ldap" for the LDAP keyservers, or "mailto"
1761              for the Graff email keyserver. Note that your particular instal‐
1762              lation  of  GnuPG  may  have  other keyserver types available as
1763              well. Keyserver schemes are  case-insensitive.  After  the  key‐
1764              server  name,  optional  keyserver  configuration options may be
1765              provided. These are the same as the  global  --keyserver-options
1766              from below, but apply only to this particular keyserver.
1767
1768              Most  keyservers synchronize with each other, so there is gener‐
1769              ally no need to send keys to more than one server. The keyserver
1770              hkp://keys.gnupg.net  uses  round  robin DNS to give a different
1771              keyserver each time you use it.
1772
1773
1774       --keyserver-options {name=value}
1775              This is a space or comma delimited string that gives options for
1776              the  keyserver. Options can be prefixed with a `no-' to give the
1777              opposite meaning. Valid import-options or export-options may  be
1778              used  here as well to apply to importing (--recv-key) or export‐
1779              ing (--send-key) a key from a keyserver. While not  all  options
1780              are available for all keyserver types, some common options are:
1781
1782
1783
1784              include-revoked
1785                     When searching for a key with --search-keys, include keys
1786                     that are marked on the keyserver as  revoked.  Note  that
1787                     not  all  keyservers  differentiate  between  revoked and
1788                     unrevoked keys, and for such keyservers  this  option  is
1789                     meaningless.  Note  also that most keyservers do not have
1790                     cryptographic verification of  key  revocations,  and  so
1791                     turning  this option off may result in skipping keys that
1792                     are incorrectly marked as revoked.
1793
1794
1795              include-disabled
1796                     When searching for a key with --search-keys, include keys
1797                     that  are  marked on the keyserver as disabled. Note that
1798                     this option is not used with HKP keyservers.
1799
1800
1801              auto-key-retrieve
1802                     This is  an  obsolete  alias  for  the  option  auto-key-
1803                     retrieve.   Please  do  not use it; it will be removed in
1804                     future versions..
1805
1806
1807              honor-keyserver-url
1808                     When using --refresh-keys, if the key in question  has  a
1809                     preferred  keyserver  URL,  then  use that preferred key‐
1810                     server to refresh the key from. In addition, if auto-key-
1811                     retrieve  is  set, and the signature being verified has a
1812                     preferred keyserver URL, then  use  that  preferred  key‐
1813                     server  to  fetch  the  key  from.  Note that this option
1814                     introduces a "web bug": The creator of the  key  can  see
1815                     when  the  keys  is  refreshed.   Thus this option is not
1816                     enabled by default.
1817
1818
1819              honor-pka-record
1820                     If --auto-key-retrieve is used, and the  signature  being
1821                     verified  has  a PKA record, then use the PKA information
1822                     to fetch the key. Defaults to "yes".
1823
1824
1825              include-subkeys
1826                     When receiving a key, include subkeys as  potential  tar‐
1827                     gets.  Note  that  this  option is not used with HKP key‐
1828                     servers, as they do not support retrieving keys by subkey
1829                     id.
1830
1831
1832              timeout
1833              http-proxy=value
1834              verbose
1835              debug
1836              check-cert
1837
1838              ca-cert-file
1839                     These options have no more function since GnuPG 2.1.  Use
1840                     the dirmngr configuration options instead.
1841
1842
1843
1844       --completes-needed n
1845              Number of completely trusted users to introduce a new key signer
1846              (defaults to 1).
1847
1848
1849       --marginals-needed n
1850              Number of marginally trusted users to introduce a new key signer
1851              (defaults to 3)
1852
1853
1854       --tofu-default-policy {auto|good|unknown|bad|ask}
1855              The default TOFU policy (defaults to auto).  For  more  informa‐
1856              tion about the meaning of this option, see: [trust-model-tofu].
1857
1858
1859       --max-cert-depth n
1860              Maximum depth of a certification chain (default is 5).
1861
1862
1863       --no-sig-cache
1864              Do not cache the verification status of key signatures.  Caching
1865              gives a much better performance in key listings. However, if you
1866              suspect that your public keyring is not safe against write modi‐
1867              fications, you can use this option to disable  the  caching.  It
1868              probably  does  not make sense to disable it because all kind of
1869              damage can be done if someone else has write access to your pub‐
1870              lic keyring.
1871
1872
1873       --auto-check-trustdb
1874       --no-auto-check-trustdb
1875              If  GnuPG  feels that its information about the Web of Trust has
1876              to be updated, it automatically runs the --check-trustdb command
1877              internally.   This  may  be a time consuming process. --no-auto-
1878              check-trustdb disables this option.
1879
1880
1881       --use-agent
1882       --no-use-agent
1883              This is dummy option. gpg always requires the agent.
1884
1885
1886       --gpg-agent-info
1887              This is dummy option. It has no effect when used with gpg.
1888
1889
1890
1891       --agent-program file
1892              Specify an agent program to be used for secret  key  operations.
1893              The  default  value  is  determined  by running gpgconf with the
1894              option --list-dirs.  Note that the pipe symbol (|) is used for a
1895              regression  test suite hack and may thus not be used in the file
1896              name.
1897
1898
1899       --dirmngr-program file
1900              Specify a dirmngr program to be used for keyserver access.   The
1901              default value is ‘/usr/bin/dirmngr’.
1902
1903
1904       --disable-dirmngr
1905              Entirely disable the use of the Dirmngr.
1906
1907
1908       --no-autostart
1909              Do not start the gpg-agent or the dirmngr if it has not yet been
1910              started and its service is required.  This option is mostly use‐
1911              ful on machines where the connection to gpg-agent has been redi‐
1912              rected to another machines.   If  dirmngr  is  required  on  the
1913              remote  machine,  it  may  be  started  manually  using  gpgconf
1914              --launch dirmngr.
1915
1916
1917       --lock-once
1918              Lock the databases the first time a lock is requested and do not
1919              release the lock until the process terminates.
1920
1921
1922       --lock-multiple
1923              Release  the  locks  every  time a lock is no longer needed. Use
1924              this to override a previous --lock-once from a config file.
1925
1926
1927       --lock-never
1928              Disable locking entirely. This option should  be  used  only  in
1929              very special environments, where it can be assured that only one
1930              process is accessing those  files.  A  bootable  floppy  with  a
1931              stand-alone  encryption  system will probably use this. Improper
1932              usage of this option may lead to data and key corruption.
1933
1934
1935       --exit-on-status-write-error
1936              This option will cause write errors on the status FD to  immedi‐
1937              ately  terminate the process. That should in fact be the default
1938              but it never worked this way and  thus  we  need  an  option  to
1939              enable  this,  so that the change won't break applications which
1940              close their end of a status fd connected pipe too  early.  Using
1941              this  option  along with --enable-progress-filter may be used to
1942              cleanly cancel long running gpg operations.
1943
1944
1945       --limit-card-insert-tries n
1946              With n greater than 0 the number of prompts asking to  insert  a
1947              smartcard  gets limited to N-1. Thus with a value of 1 gpg won't
1948              at all ask to insert  a  card  if  none  has  been  inserted  at
1949              startup. This option is useful in the configuration file in case
1950              an application does not know about  the  smartcard  support  and
1951              waits ad infinitum for an inserted card.
1952
1953
1954       --no-random-seed-file
1955              GnuPG uses a file to store its internal random pool over invoca‐
1956              tions.  This makes random generation faster;  however  sometimes
1957              write  operations  are  not  desired. This option can be used to
1958              achieve that with the cost of slower random generation.
1959
1960
1961       --no-greeting
1962              Suppress the initial copyright message.
1963
1964
1965       --no-secmem-warning
1966              Suppress the warning about "using insecure memory".
1967
1968
1969       --no-permission-warning
1970              Suppress the  warning  about  unsafe  file  and  home  directory
1971              (--homedir)  permissions.  Note  that the permission checks that
1972              GnuPG performs are not intended to be authoritative, but  rather
1973              they  simply  warn  about certain common permission problems. Do
1974              not assume that the lack of a warning means that your system  is
1975              secure.
1976
1977              Note that the warning for unsafe --homedir permissions cannot be
1978              suppressed in the gpg.conf file, as this would allow an attacker
1979              to  place an unsafe gpg.conf file in place, and use this file to
1980              suppress warnings about itself. The --homedir permissions  warn‐
1981              ing may only be suppressed on the command line.
1982
1983
1984       --require-secmem
1985       --no-require-secmem
1986              Refuse  to run if GnuPG cannot get secure memory. Defaults to no
1987              (i.e. run, but give a warning).
1988
1989
1990
1991       --require-cross-certification
1992       --no-require-cross-certification
1993              When verifying a signature made from a subkey, ensure  that  the
1994              cross  certification  "back  signature" on the subkey is present
1995              and valid.  This protects against a subtle attack  against  sub‐
1996              keys  that  can sign.  Defaults to --require-cross-certification
1997              for gpg.
1998
1999
2000       --expert
2001       --no-expert
2002              Allow the user to do certain nonsensical or "silly" things  like
2003              signing an expired or revoked key, or certain potentially incom‐
2004              patible things like generating unusual key types. This also dis‐
2005              ables  certain  warning  messages about potentially incompatible
2006              actions. As the name implies, this option is for  experts  only.
2007              If you don't fully understand the implications of what it allows
2008              you to do, leave this off. --no-expert disables this option.
2009
2010
2011   Key related options
2012
2013
2014
2015
2016       --recipient name
2017       -r     Encrypt for user id name. If this option  or  --hidden-recipient
2018              is  not  specified, GnuPG asks for the user-id unless --default-
2019              recipient is given.
2020
2021
2022       --hidden-recipient name
2023       -R     Encrypt for user ID name, but hide the key  ID  of  this  user's
2024              key.  This  option helps to hide the receiver of the message and
2025              is a limited countermeasure against traffic  analysis.  If  this
2026              option  or --recipient is not specified, GnuPG asks for the user
2027              ID unless --default-recipient is given.
2028
2029
2030       --recipient-file file
2031       -f     This option is similar to --recipient except that it encrypts to
2032              a key stored in the given file.  file must be the name of a file
2033              containing exactly one key.  gpg assumes that the  key  in  this
2034              file is fully valid.
2035
2036
2037       --hidden-recipient-file file
2038       -F     This  option  is  similar  to  --hidden-recipient except that it
2039              encrypts to a key stored in the given file.  file  must  be  the
2040              name of a file containing exactly one key.  gpg assumes that the
2041              key in this file is fully valid.
2042
2043
2044       --encrypt-to name
2045              Same as --recipient but this one is  intended  for  use  in  the
2046              options  file  and  may  be  used  with  your  own user-id as an
2047              "encrypt-to-self". These keys are only used when there are other
2048              recipients  given  either  by use of --recipient or by the asked
2049              user id.  No trust checking is performed for these user ids  and
2050              even disabled keys can be used.
2051
2052
2053       --hidden-encrypt-to name
2054              Same  as  --hidden-recipient but this one is intended for use in
2055              the options file and may be used with your own user-id as a hid‐
2056              den  "encrypt-to-self".  These keys are only used when there are
2057              other recipients given either by use of --recipient  or  by  the
2058              asked  user  id.   No trust checking is performed for these user
2059              ids and even disabled keys can be used.
2060
2061
2062       --no-encrypt-to
2063              Disable the use  of  all  --encrypt-to  and  --hidden-encrypt-to
2064              keys.
2065
2066
2067       --group {name=value}
2068              Sets up a named group, which is similar to aliases in email pro‐
2069              grams.  Any time the group name is a recipient (-r or  --recipi‐
2070              ent),  it  will  be  expanded  to the values specified. Multiple
2071              groups with the same name are automatically merged into a single
2072              group.
2073
2074              The  values are key IDs or fingerprints, but any key description
2075              is accepted. Note that a value with spaces in it will be treated
2076              as  two  different  values. Note also there is only one level of
2077              expansion --- you cannot make an group that  points  to  another
2078              group.  When  used from the command line, it may be necessary to
2079              quote the argument to this option  to  prevent  the  shell  from
2080              treating it as multiple arguments.
2081
2082
2083       --ungroup name
2084              Remove a given entry from the --group list.
2085
2086
2087       --no-groups
2088              Remove all entries from the --group list.
2089
2090
2091       --local-user name
2092       -u     Use  name  as  the key to sign with. Note that this option over‐
2093              rides --default-key.
2094
2095
2096       --sender mbox
2097              This option has two purposes.  mbox must either  be  a  complete
2098              user id with a proper mail address or just a mail address.  When
2099              creating a signature this option tells gpg the user id of a  key
2100              used  to  make a signature if the key was not directly specified
2101              by a user id.  When verifying a signature the mbox  is  used  to
2102              restrict  the  information  printed by the TOFU code to matching
2103              user ids.
2104
2105
2106       --try-secret-key name
2107              For hidden recipients GPG needs to know  the  keys  to  use  for
2108              trial  decryption.   The  key  set  with --default-key is always
2109              tried first, but this is  often  not  sufficient.   This  option
2110              allows  setting  more  keys  to  be  used  for trial decryption.
2111              Although any valid user-id specification may be used for name it
2112              makes sense to use at least the long keyid to avoid ambiguities.
2113              Note that gpg-agent might pop up a pinentry for a lot keys to do
2114              the  trial  decryption.   If  you want to stop all further trial
2115              decryption you may use close-window button instead of the cancel
2116              button.
2117
2118
2119       --try-all-secrets
2120              Don't  look  at  the key ID as stored in the message but try all
2121              secret keys in turn to  find  the  right  decryption  key.  This
2122              option  forces  the  behaviour  as  used by anonymous recipients
2123              (created by  using  --throw-keyids  or  --hidden-recipient)  and
2124              might  come  handy in case where an encrypted message contains a
2125              bogus key ID.
2126
2127
2128       --skip-hidden-recipients
2129       --no-skip-hidden-recipients
2130              During decryption skip all anonymous  recipients.   This  option
2131              helps  in the case that people use the hidden recipients feature
2132              to hide their own encrypt-to key from others.  If one  has  many
2133              secret  keys this may lead to a major annoyance because all keys
2134              are tried in turn to decrypt  something  which  was  not  really
2135              intended for it.  The drawback of this option is that it is cur‐
2136              rently not possible to decrypt a  message  which  includes  real
2137              anonymous recipients.
2138
2139
2140
2141   Input and Output
2142
2143
2144
2145
2146       --armor
2147       -a     Create  ASCII  armored  output.   The  default  is to create the
2148              binary OpenPGP format.
2149
2150
2151       --no-armor
2152              Assume the input data is not in ASCII armored format.
2153
2154
2155       --output file
2156       -o file
2157              Write output to file.  To write to stdout use - as the filename.
2158
2159
2160       --max-output n
2161              This option sets a limit on the number of  bytes  that  will  be
2162              generated when processing a file. Since OpenPGP supports various
2163              levels of compression, it is possible that the  plaintext  of  a
2164              given  message  may  be  significantly  larger than the original
2165              OpenPGP message. While GnuPG works properly with such  messages,
2166              there  is often a desire to set a maximum file size that will be
2167              generated before processing is forced to stop by the OS  limits.
2168              Defaults to 0, which means "no limit".
2169
2170
2171       --input-size-hint n
2172              This  option  can be used to tell GPG the size of the input data
2173              in bytes.  n must be a positive base-10 number.  This option  is
2174              only  useful if the input is not taken from a file.  GPG may use
2175              this hint to optimize its buffer  allocation  strategy.   It  is
2176              also  used  by  the  --status-fd  line ``PROGRESS'' to provide a
2177              value for ``total'' if that is not available by other means.
2178
2179
2180       --key-origin string[,url]
2181              gpg can track the origin of a key. Certain origins  are  implic‐
2182              itly  known  (e.g. keyserver, web key directory) and set.  For a
2183              standard import the origin of the keys imported can be set  with
2184              this option.  To list the possible values use "help" for string.
2185              Some origins can store an optional url argument.  That  URL  can
2186              appended to string after a comma.
2187
2188
2189       --import-options parameters
2190              This is a space or comma delimited string that gives options for
2191              importing keys. Options can be prepended with a  `no-'  to  give
2192              the opposite meaning. The options are:
2193
2194
2195
2196              import-local-sigs
2197                     Allow importing key signatures marked as "local". This is
2198                     not generally useful unless a shared  keyring  scheme  is
2199                     being used.  Defaults to no.
2200
2201
2202              keep-ownertrust
2203                     Normally  possible  still existing ownertrust values of a
2204                     key are cleared if a key is imported.  This is in general
2205                     desirable  so  that a formerly deleted key does not auto‐
2206                     matically gain an ownertrust values merely due to import.
2207                     On  the other hand it is sometimes necessary to re-import
2208                     a trusted set of keys again but keeping already  assigned
2209                     ownertrust  values.   This  can be achieved by using this
2210                     option.
2211
2212
2213              repair-pks-subkey-bug
2214                     During import, attempt to repair the damage caused by the
2215                     PKS  keyserver  bug (pre version 0.9.6) that mangles keys
2216                     with multiple subkeys. Note that this  cannot  completely
2217                     repair the damaged key as some crucial data is removed by
2218                     the keyserver, but it does at least  give  you  back  one
2219                     subkey.  Defaults  to  no for regular --import and to yes
2220                     for keyserver --receive-keys.
2221
2222
2223              import-show
2224              show-only
2225                     Show a listing of the key as imported right before it  is
2226                     stored.   This  can be combined with the option --dry-run
2227                     to only look at keys; the option show-only is a  shortcut
2228                     for this combination.  The command --show-keys is another
2229                     shortcut for this.  Note that suffixes like '#' for "sec"
2230                     and "sbb" lines may or may not be printed.
2231
2232
2233              import-export
2234                     Run the entire import code but instead of storing the key
2235                     to the local keyring write it to the output.  The  export
2236                     options  export-pka  and  export-dane  affect the output.
2237                     This option can be used to remove all invalid parts  from
2238                     a key without the need to store it.
2239
2240
2241              merge-only
2242                     During import, allow key updates to existing keys, but do
2243                     not allow any new keys to be imported. Defaults to no.
2244
2245
2246              import-clean
2247                     After import, compact (remove all signatures  except  the
2248                     self-signature)  any  user  IDs from the new key that are
2249                     not usable.  Then, remove any signatures from the new key
2250                     that  are not usable.  This includes signatures that were
2251                     issued by keys that are not present on the keyring.  This
2252                     option  is  the  same  as  running the --edit-key command
2253                     "clean" after import. Defaults to no.
2254
2255
2256              repair-keys. After import, fix various problems with the
2257                     keys.  For example, this reorders signatures, and  strips
2258                     duplicate signatures.  Defaults to yes.
2259
2260
2261              import-minimal
2262                     Import the smallest key possible. This removes all signa‐
2263                     tures except the most recent self-signature on each  user
2264                     ID.  This  option  is  the same as running the --edit-key
2265                     command "minimize" after import.  Defaults to no.
2266
2267
2268              restore
2269              import-restore
2270                     Import in key restore mode.  This imports all data  which
2271                     is  usually  skipped  during  import; including all GnuPG
2272                     specific data.  All other contradicting options are over‐
2273                     ridden.
2274
2275
2276       --import-filter {name=expr}
2277       --export-filter {name=expr}
2278              These  options  define an import/export filter which are applied
2279              to the  imported/exported  keyblock  right  before  it  will  be
2280              stored/written.   name  defines  the type of filter to use, expr
2281              the expression to evaluate.  The  option  can  be  used  several
2282              times which then appends more expression to the same name.
2283
2284
2285              The available filter types are:
2286
2287
2288
2289              keep-uid
2290                     This  filter will keep a user id packet and its dependent
2291                     packets in the keyblock if the  expression  evaluates  to
2292                     true.
2293
2294
2295              drop-subkey
2296                     This  filter  drops the selected subkeys.  Currently only
2297                     implemented for --export-filter.
2298
2299
2300              drop-sig
2301                     This filter drops the selected  key  signatures  on  user
2302                     ids.  Self-signatures are not considered.  Currently only
2303                     implemented for --import-filter.
2304
2305
2306       For the syntax of the expression see the chapter "FILTER  EXPRESSIONS".
2307       The property names for the expressions depend on the actual filter type
2308       and are indicated in the following table.
2309
2310       The available properties are:
2311
2312
2313
2314              uid    A string with the user id.  (keep-uid)
2315
2316
2317              mbox   The addr-spec part of a user id with mailbox or the empty
2318                     string.  (keep-uid)
2319
2320
2321              key_algo
2322                     A number with the public key algorithm of a key or subkey
2323                     packet.  (drop-subkey)
2324
2325
2326              key_created
2327              key_created_d
2328                     The first is the timestamp a public key or subkey  packet
2329                     was  created.  The second is the same but given as an ISO
2330                     string, e.g. "2016-08-17". (drop-subkey)
2331
2332
2333              primary
2334                     Boolean indicating whether the user  id  is  the  primary
2335                     one.  (keep-uid)
2336
2337
2338              expired
2339                     Boolean  indicating  whether  a user id (keep-uid), a key
2340                     (drop-subkey), or a signature (drop-sig) expired.
2341
2342
2343              revoked
2344                     Boolean indicating whether a user id (keep-uid) or a  key
2345                     (drop-subkey) has been revoked.
2346
2347
2348              disabled
2349                     Boolean  indicating  whether  a  primary key is disabled.
2350                     (not used)
2351
2352
2353              secret Boolean indicating whether a key or subkey  is  a  secret
2354                     one.  (drop-subkey)
2355
2356
2357              usage  A  string indicating the usage flags for the subkey, from
2358                     the sequence ``ecsa?''.  For example, a subkey capable of
2359                     just  signing  and authentication would be an exact match
2360                     for ``sa''. (drop-subkey)
2361
2362
2363              sig_created
2364              sig_created_d
2365                     The first is the timestamp a signature  packet  was  cre‐
2366                     ated.   The  second  is the same but given as an ISO date
2367                     string, e.g. "2016-08-17". (drop-sig)
2368
2369
2370              sig_algo
2371                     A number with the public key  algorithm  of  a  signature
2372                     packet. (drop-sig)
2373
2374
2375              sig_digest_algo
2376                     A number with the digest algorithm of a signature packet.
2377                     (drop-sig)
2378
2379
2380
2381       --export-options parameters
2382              This is a space or comma delimited string that gives options for
2383              exporting  keys.   Options can be prepended with a `no-' to give
2384              the opposite meaning.  The options are:
2385
2386
2387
2388              export-local-sigs
2389                     Allow exporting key signatures marked as "local". This is
2390                     not  generally  useful  unless a shared keyring scheme is
2391                     being used.  Defaults to no.
2392
2393
2394              export-attributes
2395                     Include attribute user IDs (photo IDs)  while  exporting.
2396                     Not including attribute user IDs is useful to export keys
2397                     that are going to be used by an OpenPGP program that does
2398                     not accept attribute user IDs.  Defaults to yes.
2399
2400
2401              export-sensitive-revkeys
2402                     Include designated revoker information that was marked as
2403                     "sensitive". Defaults to no.
2404
2405
2406
2407              backup
2408              export-backup
2409                     Export for use as a backup.  The exported  data  includes
2410                     all data which is needed to restore the key or keys later
2411                     with GnuPG.  The format is basically the  OpenPGP  format
2412                     but enhanced with GnuPG specific data.  All other contra‐
2413                     dicting options are overridden.
2414
2415
2416              export-clean
2417                     Compact (remove all signatures from) user IDs on the  key
2418                     being  exported  if the user IDs are not usable. Also, do
2419                     not export any  signatures  that  are  not  usable.  This
2420                     includes signatures that were issued by keys that are not
2421                     present on the keyring. This option is the same  as  run‐
2422                     ning  the --edit-key command "clean" before export except
2423                     that the local copy of the key is not modified.  Defaults
2424                     to no.
2425
2426
2427              export-minimal
2428                     Export the smallest key possible. This removes all signa‐
2429                     tures except the most recent self-signature on each  user
2430                     ID.  This  option  is  the same as running the --edit-key
2431                     command "minimize" before export except  that  the  local
2432                     copy of the key is not modified. Defaults to no.
2433
2434
2435              export-pka
2436                     Instead of outputting the key material output PKA records
2437                     suitable to put into DNS zone files.  An ORIGIN  line  is
2438                     printed before each record to allow diverting the records
2439                     to the corresponding zone file.
2440
2441
2442              export-dane
2443                     Instead of outputting the  key  material  output  OpenPGP
2444                     DANE  records  suitable  to  put into DNS zone files.  An
2445                     ORIGIN line  is  printed  before  each  record  to  allow
2446                     diverting the records to the corresponding zone file.
2447
2448
2449
2450       --with-colons
2451              Print  key  listings  delimited  by colons. Note that the output
2452              will be encoded in UTF-8  regardless  of  any  --display-charset
2453              setting. This format is useful when GnuPG is called from scripts
2454              and other programs as it is easily machine parsed.  The  details
2455              of  this  format are documented in the file ‘doc/DETAILS’, which
2456              is included in the GnuPG source distribution.
2457
2458
2459       --fixed-list-mode
2460              Do not merge primary user ID and  primary  key  in  --with-colon
2461              listing   mode   and  print  all  timestamps  as  seconds  since
2462              1970-01-01.  Since GnuPG 2.0.10, this mode is  always  used  and
2463              thus this option is obsolete; it does not harm to use it though.
2464
2465
2466       --legacy-list-mode
2467              Revert  to  the pre-2.1 public key list mode.  This only affects
2468              the human readable output and not the  machine  interface  (i.e.
2469              --with-colons).   Note  that  the  legacy format does not convey
2470              suitable information for elliptic curves.
2471
2472
2473       --with-fingerprint
2474              Same as the command --fingerprint but changes only the format of
2475              the output and may be used together with another command.
2476
2477
2478       --with-subkey-fingerprint
2479              If  a  fingerprint  is  printed for the primary key, this option
2480              forces printing of the fingerprint for all subkeys.  This  could
2481              also  be  achieved  by using the --with-fingerprint twice but by
2482              using this option along with keyid-format "none" a compact  fin‐
2483              gerprint is printed.
2484
2485
2486       --with-icao-spelling
2487              Print  the  ICAO  spelling of the fingerprint in addition to the
2488              hex digits.
2489
2490
2491       --with-keygrip
2492              Include the keygrip in the key listings.  In --with-colons  mode
2493              this is implicitly enable for secret keys.
2494
2495
2496       --with-key-origin
2497              Include  the  locally  held  information  on the origin and last
2498              update of a key in a key listing.  In --with-colons mode this is
2499              always  printed.   This data is currently experimental and shall
2500              not be considered part of the stable API.
2501
2502
2503       --with-wkd-hash
2504              Print a Web Key Directory identifier along with each user ID  in
2505              key listings.  This is an experimental feature and semantics may
2506              change.
2507
2508
2509       --with-secret
2510              Include info about the presence of a secret key  in  public  key
2511              listings done with --with-colons.
2512
2513
2514   OpenPGP protocol specific options
2515
2516
2517
2518
2519       -t, --textmode
2520       --no-textmode
2521              Treat  input files as text and store them in the OpenPGP canoni‐
2522              cal text form with standard "CRLF" line endings. This also  sets
2523              the  necessary  flags to inform the recipient that the encrypted
2524              or signed data is text and may need its line  endings  converted
2525              back  to  whatever  the local system uses. This option is useful
2526              when communicating between two  platforms  that  have  different
2527              line ending conventions (UNIX-like to Mac, Mac to Windows, etc).
2528              --no-textmode disables this option, and is the default.
2529
2530
2531       --force-v3-sigs
2532       --no-force-v3-sigs
2533
2534       --force-v4-certs
2535       --no-force-v4-certs
2536              These options are obsolete and have no effect since GnuPG 2.1.
2537
2538
2539       --force-mdc
2540       --disable-mdc
2541              These options are obsolete and have no effect since GnuPG 2.2.8.
2542              The  MDC  is always used.  But note: If the creation of a legacy
2543              non-MDC message is exceptionally required, the option  --rfc2440
2544              allows for this.
2545
2546
2547       --disable-signer-uid
2548              By  default  the  user  ID of the signing key is embedded in the
2549              data signature.  As of now this is only done if the signing  key
2550              has  been  specified with local-user using a mail address.  This
2551              information can be helpful for verifier to locate the  key;  see
2552              option --auto-key-retrieve.
2553
2554
2555       --personal-cipher-preferences string
2556              Set  the list of personal cipher preferences to string.  Use gpg
2557              --version to get a list of available algorithms, and use none to
2558              set  no preference at all.  This allows the user to safely over‐
2559              ride the algorithm chosen by the recipient key  preferences,  as
2560              GPG  will only select an algorithm that is usable by all recipi‐
2561              ents.  The most highly ranked cipher in this list is  also  used
2562              for the --symmetric encryption command.
2563
2564
2565       --personal-digest-preferences string
2566              Set  the list of personal digest preferences to string.  Use gpg
2567              --version to get a list of available algorithms, and use none to
2568              set  no preference at all.  This allows the user to safely over‐
2569              ride the algorithm chosen by the recipient key  preferences,  as
2570              GPG  will only select an algorithm that is usable by all recipi‐
2571              ents.  The most highly ranked digest algorithm in this  list  is
2572              also  used when signing without encryption (e.g. --clear-sign or
2573              --sign).
2574
2575
2576       --personal-compress-preferences string
2577              Set the list of personal compression preferences to string.  Use
2578              gpg  --version  to  get  a list of available algorithms, and use
2579              none to set no preference at  all.   This  allows  the  user  to
2580              safely  override the algorithm chosen by the recipient key pref‐
2581              erences, as GPG will only select an algorithm that is usable  by
2582              all recipients.  The most highly ranked compression algorithm in
2583              this list is also used when there are no recipient keys to  con‐
2584              sider (e.g. --symmetric).
2585
2586
2587       --s2k-cipher-algo name
2588              Use name as the cipher algorithm for symmetric encryption with a
2589              passphrase if  --personal-cipher-preferences  and  --cipher-algo
2590              are not given.  The default is AES-128.
2591
2592
2593       --s2k-digest-algo name
2594              Use  name as the digest algorithm used to mangle the passphrases
2595              for symmetric encryption.  The default is SHA-1.
2596
2597
2598       --s2k-mode n
2599              Selects how passphrases for symmetric encryption are mangled. If
2600              n  is 0 a plain passphrase (which is in general not recommended)
2601              will be used, a 1 adds a salt (which should not be used) to  the
2602              passphrase  and  a  3 (the default) iterates the whole process a
2603              number of times (see --s2k-count).
2604
2605
2606       --s2k-count n
2607              Specify how many times the passphrases  mangling  for  symmetric
2608              encryption  is  repeated.  This value may range between 1024 and
2609              65011712 inclusive.  The default  is  inquired  from  gpg-agent.
2610              Note  that  not  all values in the 1024-65011712 range are legal
2611              and if an illegal value is selected, GnuPG will round up to  the
2612              nearest  legal  value.  This option is only meaningful if --s2k-
2613              mode is set to the default of 3.
2614
2615
2616
2617   Compliance options
2618
2619
2620       These options control what GnuPG is compliant to.  Only  one  of  these
2621       options  may be active at a time. Note that the default setting of this
2622       is nearly always the correct one. See the INTEROPERABILITY  WITH  OTHER
2623       OPENPGP PROGRAMS section below before using one of these options.
2624
2625
2626
2627       --gnupg
2628              Use  standard GnuPG behavior. This is essentially OpenPGP behav‐
2629              ior (see --openpgp), but with some  additional  workarounds  for
2630              common compatibility problems in different versions of PGP. This
2631              is the default option, so it is not generally needed, but it may
2632              be  useful  to  override  a  different  compliance option in the
2633              gpg.conf file.
2634
2635
2636       --openpgp
2637              Reset all packet, cipher and digest options  to  strict  OpenPGP
2638              behavior.  Use  this  option  to reset all previous options like
2639              --s2k-*, --cipher-algo,  --digest-algo  and  --compress-algo  to
2640              OpenPGP compliant values. All PGP workarounds are disabled.
2641
2642
2643       --rfc4880
2644              Reset  all  packet, cipher and digest options to strict RFC-4880
2645              behavior.  Note  that  this  is  currently  the  same  thing  as
2646              --openpgp.
2647
2648
2649       --rfc4880bis
2650              Enable  experimental features from proposed updates to RFC-4880.
2651              This option can be used in  addition  to  the  other  compliance
2652              options.   Warning:  The  behavior  may  change  with  any GnuPG
2653              release and created keys or data may not be usable  with  future
2654              GnuPG versions.
2655
2656
2657       --rfc2440
2658              Reset  all  packet, cipher and digest options to strict RFC-2440
2659              behavior.  Note that by using this option encryption packets are
2660              created  in  a legacy mode without MDC protection.  This is dan‐
2661              gerous and should thus only be used for experiments.   See  also
2662              option --ignore-mdc-error.
2663
2664
2665       --pgp6 Set  up  all  options to be as PGP 6 compliant as possible. This
2666              restricts you to  the  ciphers  IDEA  (if  the  IDEA  plugin  is
2667              installed), 3DES, and CAST5, the hashes MD5, SHA1 and RIPEMD160,
2668              and the compression algorithms none and ZIP. This also  disables
2669              --throw-keyids,  and  making  signatures with signing subkeys as
2670              PGP 6 does not understand signatures made by signing subkeys.
2671
2672              This option implies --escape-from-lines.
2673
2674
2675       --pgp7 Set up all options to be as PGP 7 compliant as possible. This is
2676              identical  to  --pgp6 except that MDCs are not disabled, and the
2677              list of allowable ciphers is expanded  to  add  AES128,  AES192,
2678              AES256, and TWOFISH.
2679
2680
2681       --pgp8 Set  up  all options to be as PGP 8 compliant as possible. PGP 8
2682              is a lot closer to the OpenPGP standard than  previous  versions
2683              of  PGP,  so  all  this  does  is disable --throw-keyids and set
2684              --escape-from-lines.  All algorithms are allowed except for  the
2685              SHA224, SHA384, and SHA512 digests.
2686
2687
2688       --compliance string
2689              This  option  can  be  used instead of one of the options above.
2690              Valid values for string are the above option names (without  the
2691              double  dash) and possibly others as shown when using "help" for
2692              value.
2693
2694
2695   Doing things one usually doesn't want to do
2696
2697
2698
2699
2700       -n
2701       --dry-run
2702              Don't make any changes (this is not completely implemented).
2703
2704
2705       --list-only
2706              Changes the behaviour of some commands. This is  like  --dry-run
2707              but  different in some cases. The semantic of this option may be
2708              extended in the future.  Currently  it  only  skips  the  actual
2709              decryption  pass  and  therefore  enables  a fast listing of the
2710              encryption keys.
2711
2712
2713       -i
2714       --interactive
2715              Prompt before overwriting any files.
2716
2717
2718       --debug-level level
2719              Select the debug level for investigating problems. level may  be
2720              a numeric value or by a keyword:
2721
2722
2723              none   No  debugging at all.  A value of less than 1 may be used
2724                     instead of the keyword.
2725
2726              basic  Some basic debug messages.  A value between 1 and  2  may
2727                     be used instead of the keyword.
2728
2729              advanced
2730                     More verbose debug messages.  A value between 3 and 5 may
2731                     be used instead of the keyword.
2732
2733              expert Even more detailed messages.  A value between 6 and 8 may
2734                     be used instead of the keyword.
2735
2736              guru   All  of  the  debug messages you can get. A value greater
2737                     than 8 may be used instead of the keyword.  The  creation
2738                     of  hash  tracing files is only enabled if the keyword is
2739                     used.
2740
2741       How these messages are mapped to the  actual  debugging  flags  is  not
2742       specified  and may change with newer releases of this program. They are
2743       however carefully selected to best aid in debugging.
2744
2745
2746       --debug flags
2747              Set debugging flags. All flags are or-ed and flags may be  given
2748              in  C  syntax (e.g. 0x0042) or as a comma separated list of flag
2749              names.  To get a list of all supported  flags  the  single  word
2750              "help" can be used.
2751
2752
2753       --debug-all
2754              Set all useful debugging flags.
2755
2756
2757       --debug-iolbf
2758              Set stdout into line buffered mode.  This option is only honored
2759              when given on the command line.
2760
2761
2762       --faked-system-time epoch
2763              This option is only useful for testing; it sets the system  time
2764              back  or  forth  to epoch which is the number of seconds elapsed
2765              since the year 1970.  Alternatively epoch may be given as a full
2766              ISO time string (e.g. "20070924T154812").
2767
2768              If  you  suffix  epoch  with an exclamation mark (!), the system
2769              time will appear to be frozen at the specified time.
2770
2771
2772       --enable-progress-filter
2773              Enable certain PROGRESS status outputs. This option allows fron‐
2774              tends  to  display  a progress indicator while gpg is processing
2775              larger files.  There is a slight performance overhead using it.
2776
2777
2778       --status-fd n
2779              Write special status strings to the file descriptor n.  See  the
2780              file DETAILS in the documentation for a listing of them.
2781
2782
2783       --status-file file
2784              Same  as  --status-fd, except the status data is written to file
2785              file.
2786
2787
2788       --logger-fd n
2789              Write log output to file descriptor n and not to STDERR.
2790
2791
2792       --log-file file
2793       --logger-file file
2794              Same as --logger-fd, except the logger data is written  to  file
2795              file.  Use ‘socket://’ to log to s socket.
2796
2797
2798       --attribute-fd n
2799              Write  attribute  subpackets  to  the file descriptor n. This is
2800              most useful for use with --status-fd, since the status  messages
2801              are  needed  to  separate  out  the  various subpackets from the
2802              stream delivered to the file descriptor.
2803
2804
2805       --attribute-file file
2806              Same as --attribute-fd, except the attribute data is written  to
2807              file file.
2808
2809
2810       --comment string
2811       --no-comments
2812              Use string as a comment string in cleartext signatures and ASCII
2813              armored messages or keys (see --armor). The default behavior  is
2814              not  to use a comment string. --comment may be repeated multiple
2815              times to get multiple comment strings. --no-comments removes all
2816              comments.  It is a good idea to keep the length of a single com‐
2817              ment below 60 characters to avoid problems  with  mail  programs
2818              wrapping  such  lines.   Note that comment lines, like all other
2819              header lines, are not protected by the signature.
2820
2821
2822       --emit-version
2823       --no-emit-version
2824              Force inclusion of the version string in ASCII  armored  output.
2825              If  given once only the name of the program and the major number
2826              is emitted, given twice the minor is also emitted, given  thrice
2827              the  micro  is  added,  and given four times an operating system
2828              identification is  also  emitted.   --no-emit-version  (default)
2829              disables the version line.
2830
2831
2832       --sig-notation {name=value}
2833       --cert-notation {name=value}
2834       -N, --set-notation {name=value}
2835              Put  the  name  value  pair into the signature as notation data.
2836              name must consist only of printable characters  or  spaces,  and
2837              must  contain  a  '@' character in the form keyname@domain.exam‐
2838              ple.com (substituting the appropriate keyname and  domain  name,
2839              of  course).   This  is  to  help  prevent pollution of the IETF
2840              reserved notation namespace. The --expert flag overrides the '@'
2841              check.  value may be any printable string; it will be encoded in
2842              UTF-8, so you should check that your  --display-charset  is  set
2843              correctly.  If you prefix name with an exclamation mark (!), the
2844              notation data will be flagged  as  critical  (rfc4880:5.2.3.16).
2845              --sig-notation sets a notation for data signatures. --cert-nota‐
2846              tion sets a notation for key signatures (certifications). --set-
2847              notation sets both.
2848
2849              There are special codes that may be used in notation names. "%k"
2850              will be expanded into the key ID of the key being  signed,  "%K"
2851              into the long key ID of the key being signed, "%f" into the fin‐
2852              gerprint of the key being signed, "%s" into the key  ID  of  the
2853              key  making  the signature, "%S" into the long key ID of the key
2854              making the signature, "%g" into the fingerprint of the key  mak‐
2855              ing  the signature (which might be a subkey), "%p" into the fin‐
2856              gerprint of the primary key of the  key  making  the  signature,
2857              "%c"  into  the  signature count from the OpenPGP smartcard, and
2858              "%%" results in a single "%". %k, %K, and %f are only meaningful
2859              when  making  a  key  signature  (certification), and %c is only
2860              meaningful when using the OpenPGP smartcard.
2861
2862
2863       --known-notation name
2864              Adds name to a list of known critical signature notations.   The
2865              effect  of  this  is  that  gpg will not mark a signature with a
2866              critical signature notation of that name as bad.  Note that  gpg
2867              already  knows  by default about a few critical signatures nota‐
2868              tion names.
2869
2870
2871       --sig-policy-url string
2872       --cert-policy-url string
2873       --set-policy-url string
2874              Use string as a Policy URL  for  signatures  (rfc4880:5.2.3.20).
2875              If  you  prefix  it with an exclamation mark (!), the policy URL
2876              packet will be flagged as critical. --sig-policy-url sets a pol‐
2877              icy url for data signatures. --cert-policy-url sets a policy url
2878              for key signatures (certifications). --set-policy-url sets both.
2879
2880              The same %-expandos used for notation data are available here as
2881              well.
2882
2883
2884       --sig-keyserver-url string
2885              Use  string as a preferred keyserver URL for data signatures. If
2886              you prefix it with an exclamation mark (!),  the  keyserver  URL
2887              packet will be flagged as critical.
2888
2889              The same %-expandos used for notation data are available here as
2890              well.
2891
2892
2893       --set-filename string
2894              Use string as the filename  which  is  stored  inside  messages.
2895              This  overrides the default, which is to use the actual filename
2896              of the file being encrypted.  Using the empty string for  string
2897              effectively removes the filename from the output.
2898
2899
2900       --for-your-eyes-only
2901       --no-for-your-eyes-only
2902              Set  the  `for  your eyes only' flag in the message. This causes
2903              GnuPG to refuse to save the file unless the --output  option  is
2904              given,  and PGP to use a "secure viewer" with a claimed Tempest-
2905              resistant font to display the  message.  This  option  overrides
2906              --set-filename.  --no-for-your-eyes-only disables this option.
2907
2908
2909       --use-embedded-filename
2910       --no-use-embedded-filename
2911              Try  to  create a file with a name as embedded in the data. This
2912              can be a dangerous  option  as  it  enables  overwriting  files.
2913              Defaults to no.
2914
2915
2916       --cipher-algo name
2917              Use  name as cipher algorithm. Running the program with the com‐
2918              mand --version yields a list of supported algorithms. If this is
2919              not  used  the cipher algorithm is selected from the preferences
2920              stored with the key. In general, you do not  want  to  use  this
2921              option as it allows you to violate the OpenPGP standard.  --per‐
2922              sonal-cipher-preferences is the safe way to accomplish the  same
2923              thing.
2924
2925
2926       --digest-algo name
2927              Use  name  as  the message digest algorithm. Running the program
2928              with the command --version yields  a  list  of  supported  algo‐
2929              rithms.  In  general,  you  do not want to use this option as it
2930              allows you to violate the OpenPGP  standard.  --personal-digest-
2931              preferences is the safe way to accomplish the same thing.
2932
2933
2934       --compress-algo name
2935              Use compression algorithm name. "zlib" is RFC-1950 ZLIB compres‐
2936              sion. "zip" is RFC-1951 ZIP compression which is  used  by  PGP.
2937              "bzip2"  is  a  more modern compression scheme that can compress
2938              some things better than zip or zlib, but at  the  cost  of  more
2939              memory used during compression and decompression. "uncompressed"
2940              or "none" disables compression. If this option is not used,  the
2941              default  behavior is to examine the recipient key preferences to
2942              see which algorithms the recipient supports. If all else  fails,
2943              ZIP is used for maximum compatibility.
2944
2945              ZLIB  may  give better compression results than ZIP, as the com‐
2946              pression window size is not limited to 8k. BZIP2 may  give  even
2947              better  compression  results  than that, but will use a signifi‐
2948              cantly larger amount of memory while compressing and decompress‐
2949              ing.  This  may  be  significant in low memory situations. Note,
2950              however, that PGP (all versions) only supports ZIP  compression.
2951              Using  any algorithm other than ZIP or "none" will make the mes‐
2952              sage unreadable with PGP. In general, you do  not  want  to  use
2953              this  option  as  it allows you to violate the OpenPGP standard.
2954              --personal-compress-preferences is the safe  way  to  accomplish
2955              the same thing.
2956
2957
2958       --cert-digest-algo name
2959              Use  name  as  the  message digest algorithm used when signing a
2960              key. Running the program with the  command  --version  yields  a
2961              list  of  supported  algorithms.  Be aware that if you choose an
2962              algorithm that GnuPG supports but other OpenPGP  implementations
2963              do  not,  then some users will not be able to use the key signa‐
2964              tures you make, or quite possibly your entire key.
2965
2966
2967       --disable-cipher-algo name
2968              Never allow the use of name as cipher algorithm.  The given name
2969              will  not be checked so that a later loaded algorithm will still
2970              get disabled.
2971
2972
2973       --disable-pubkey-algo name
2974              Never allow the use of name as public key algorithm.  The  given
2975              name  will  not be checked so that a later loaded algorithm will
2976              still get disabled.
2977
2978
2979       --throw-keyids
2980       --no-throw-keyids
2981              Do not put the recipient key IDs into encrypted  messages.  This
2982              helps  to  hide  the  receivers  of the message and is a limited
2983              countermeasure against traffic analysis. ([Using a little social
2984              engineering  anyone who is able to decrypt the message can check
2985              whether one of the other recipients is the  one  he  suspects.])
2986              On  the  receiving side, it may slow down the decryption process
2987              because all available secret keys must  be  tried.   --no-throw-
2988              keyids disables this option. This option is essentially the same
2989              as using --hidden-recipient for all recipients.
2990
2991
2992       --not-dash-escaped
2993              This option changes the behavior of cleartext signatures so that
2994              they  can  be  used for patch files. You should not send such an
2995              armored file via email because all spaces and line  endings  are
2996              hashed  too.  You  can  not use this option for data which has 5
2997              dashes at the beginning of a line, patch files don't have  this.
2998              A  special  armor  header  line tells GnuPG about this cleartext
2999              signature option.
3000
3001
3002       --escape-from-lines
3003       --no-escape-from-lines
3004              Because some mailers change  lines  starting  with  "From  "  to
3005              ">From  "  it is good to handle such lines in a special way when
3006              creating cleartext signatures to prevent the  mail  system  from
3007              breaking  the  signature. Note that all other PGP versions do it
3008              this way too.  Enabled by default.  --no-escape-from-lines  dis‐
3009              ables this option.
3010
3011
3012       --passphrase-repeat n
3013              Specify  how  many  times  gpg  will request a new passphrase be
3014              repeated.  This is useful for  helping  memorize  a  passphrase.
3015              Defaults to 1 repetition.
3016
3017
3018       --passphrase-fd n
3019              Read  the passphrase from file descriptor n. Only the first line
3020              will be read from file descriptor n. If you use  0  for  n,  the
3021              passphrase  will  be  read  from STDIN. This can only be used if
3022              only one passphrase is supplied.
3023
3024              Note that since Version 2.0 this passphrase is only used if  the
3025              option  --batch  has  also  been  given.  Since  Version 2.1 the
3026              --pinentry-mode also needs to be set to loopback.
3027
3028
3029       --passphrase-file file
3030              Read the passphrase from file file. Only the first line will  be
3031              read  from  file  file.  This  can  only  be  used  if  only one
3032              passphrase is supplied. Obviously, a passphrase stored in a file
3033              is  of  questionable security if other users can read this file.
3034              Don't use this option if you can avoid it.
3035
3036              Note that since Version 2.0 this passphrase is only used if  the
3037              option  --batch  has  also  been  given.  Since  Version 2.1 the
3038              --pinentry-mode also needs to be set to loopback.
3039
3040
3041       --passphrase string
3042              Use string as the passphrase. This can only be used if only  one
3043              passphrase  is supplied. Obviously, this is of very questionable
3044              security on a multi-user system. Don't use this  option  if  you
3045              can avoid it.
3046
3047              Note  that since Version 2.0 this passphrase is only used if the
3048              option --batch has  also  been  given.  Since  Version  2.1  the
3049              --pinentry-mode also needs to be set to loopback.
3050
3051
3052       --pinentry-mode mode
3053              Set the pinentry mode to mode.  Allowed values for mode are:
3054
3055              default
3056                     Use the default of the agent, which is ask.
3057
3058              ask    Force the use of the Pinentry.
3059
3060              cancel Emulate use of Pinentry's cancel button.
3061
3062              error  Return a Pinentry error (``No Pinentry'').
3063
3064              loopback
3065                     Redirect  Pinentry  queries  to the caller.  Note that in
3066                     contrast to Pinentry the user is not prompted again if he
3067                     enters a bad password.
3068
3069
3070       --no-symkey-cache
3071              Disable  the  passphrase  cache  used  for  symmetrical  en- and
3072              decryption.  This cache is based on the  message  specific  salt
3073              value (cf. --s2k-mode).
3074
3075
3076       --request-origin origin
3077              Tell  gpg  to assume that the operation ultimately originated at
3078              origin.   Depending  on  the  origin  certain  restrictions  are
3079              applied  and  the Pinentry may include an extra note on the ori‐
3080              gin.  Supported values  for  origin  are:  local  which  is  the
3081              default,  remote  to  indicate a remote origin or browser for an
3082              operation requested by a web browser.
3083
3084
3085       --command-fd n
3086              This is a replacement for the deprecated shared-memory IPC mode.
3087              If  this  option  is  enabled,  user  input  on questions is not
3088              expected from the TTY but from the  given  file  descriptor.  It
3089              should   be   used  together  with  --status-fd.  See  the  file
3090              doc/DETAILS in the source distribution for details on how to use
3091              it.
3092
3093
3094       --command-file file
3095              Same  as  --command-fd, except the commands are read out of file
3096              file
3097
3098
3099       --allow-non-selfsigned-uid
3100       --no-allow-non-selfsigned-uid
3101              Allow the import and use of keys with user  IDs  which  are  not
3102              self-signed.  This is not recommended, as a non self-signed user
3103              ID is trivial to forge. --no-allow-non-selfsigned-uid disables.
3104
3105
3106       --allow-freeform-uid
3107              Disable all checks on the form of the user ID while generating a
3108              new  one.  This option should only be used in very special envi‐
3109              ronments as it does not ensure the de-facto standard  format  of
3110              user IDs.
3111
3112
3113       --ignore-time-conflict
3114              GnuPG  normally  checks that the timestamps associated with keys
3115              and signatures have plausible values. However, sometimes a  sig‐
3116              nature  seems  to  be  older than the key due to clock problems.
3117              This  option  makes  these  checks  just  a  warning.  See  also
3118              --ignore-valid-from for timestamp issues on subkeys.
3119
3120
3121       --ignore-valid-from
3122              GnuPG  normally  does  not select and use subkeys created in the
3123              future.  This option allows  the  use  of  such  keys  and  thus
3124              exhibits the pre-1.0.7 behaviour. You should not use this option
3125              unless there is some clock problem. See also  --ignore-time-con‐
3126              flict for timestamp issues with signatures.
3127
3128
3129       --ignore-crc-error
3130              The  ASCII  armor used by OpenPGP is protected by a CRC checksum
3131              against transmission errors. Occasionally the CRC  gets  mangled
3132              somewhere  on  the  transmission  channel but the actual content
3133              (which is protected by the OpenPGP  protocol  anyway)  is  still
3134              okay. This option allows GnuPG to ignore CRC errors.
3135
3136
3137       --ignore-mdc-error
3138              This  option  changes  a MDC integrity protection failure into a
3139              warning.  It is required to decrypt old messages which  did  not
3140              use  an  MDC.   It  may also be useful if a message is partially
3141              garbled, but it is necessary to get as much data as possible out
3142              of  that garbled message.  Be aware that a missing or failed MDC
3143              can be an indication of an attack.  Use with great caution;  see
3144              also option --rfc2440.
3145
3146
3147       --allow-weak-digest-algos
3148              Signatures  made  with known-weak digest algorithms are normally
3149              rejected with an ``invalid  digest  algorithm''  message.   This
3150              option allows the verification of signatures made with such weak
3151              algorithms.  MD5 is the only digest algorithm considered weak by
3152              default.   See  also  --weak-digest to reject other digest algo‐
3153              rithms.
3154
3155
3156       --weak-digest name
3157              Treat the specified digest algorithm as weak.   Signatures  made
3158              over  weak digests algorithms are normally rejected. This option
3159              can be supplied multiple times if multiple algorithms should  be
3160              considered  weak.  See also --allow-weak-digest-algos to disable
3161              rejection of weak digests.  MD5 is always considered  weak,  and
3162              does not need to be listed explicitly.
3163
3164
3165       --no-default-keyring
3166              Do  not  add  the default keyrings to the list of keyrings. Note
3167              that GnuPG will not operate without any keyrings, so if you  use
3168              this  option and do not provide alternate keyrings via --keyring
3169              or --secret-keyring, then GnuPG will still use the default  pub‐
3170              lic or secret keyrings.
3171
3172
3173       --no-keyring
3174              Do not add use any keyrings even if specified as options.
3175
3176
3177       --skip-verify
3178              Skip  the  signature verification step. This may be used to make
3179              the decryption faster  if  the  signature  verification  is  not
3180              needed.
3181
3182
3183       --with-key-data
3184              Print  key listings delimited by colons (like --with-colons) and
3185              print the public key data.
3186
3187
3188       --list-signatures
3189       --list-sigs
3190              Same as --list-keys, but the signatures are  listed  too.   This
3191              command  has  the  same effect as using --list-keys with --with-
3192              sig-list.  Note that in contrast to --check-signatures  the  key
3193              signatures are not verified.  This command can be used to create
3194              a list of signing keys missing in the lcoal keyring;  for  exam‐
3195              ple:
3196
3197               gpg --list-sigs --with-colons USERID | \
3198                 awk -F: '$1=="sig" && $2=="?" {if($13){print $13}else{print $5}}'
3199
3200
3201       --fast-list-mode
3202              Changes  the output of the list commands to work faster; this is
3203              achieved by leaving some parts empty.  Some  applications  don't
3204              need  the  user  ID and the trust information given in the list‐
3205              ings. By using this options they can get a faster  listing.  The
3206              exact  behaviour  of  this option may change in future versions.
3207              If you are missing some information, don't use this option.
3208
3209
3210       --no-literal
3211              This is not for normal use. Use the source to see  for  what  it
3212              might be useful.
3213
3214
3215       --set-filesize
3216              This  is  not  for normal use. Use the source to see for what it
3217              might be useful.
3218
3219
3220       --show-session-key
3221              Display the session key used for one  message.  See  --override-
3222              session-key for the counterpart of this option.
3223
3224              We think that Key Escrow is a Bad Thing; however the user should
3225              have the freedom to decide whether to go to prison or to  reveal
3226              the  content  of  one  specific message without compromising all
3227              messages ever encrypted for one secret key.
3228
3229              You can also use this option if you receive an encrypted message
3230              which is abusive or offensive, to prove to the administrators of
3231              the messaging system that the ciphertext transmitted corresponds
3232              to  an  inappropriate  plaintext so they can take action against
3233              the offending user.
3234
3235
3236       --override-session-key string
3237       --override-session-key-fd fd
3238              Don't use the public key but the session key  string  respective
3239              the  session  key  taken  from  the  first  line  read from file
3240              descriptor fd.  The format of this string is the same as the one
3241              printed  by --show-session-key. This option is normally not used
3242              but comes handy in case someone forces you to reveal the content
3243              of an encrypted message; using this option you can do this with‐
3244              out handing out the secret key.  Note that using --override-ses‐
3245              sion-key  may  reveal the session key to all local users via the
3246              global process table.  Often it is useful to combine this option
3247              with --no-keyring.
3248
3249
3250       --ask-sig-expire
3251       --no-ask-sig-expire
3252              When  making a data signature, prompt for an expiration time. If
3253              this option is  not  specified,  the  expiration  time  set  via
3254              --default-sig-expire  is used. --no-ask-sig-expire disables this
3255              option.
3256
3257
3258       --default-sig-expire
3259              The default expiration time to  use  for  signature  expiration.
3260              Valid values are "0" for no expiration, a number followed by the
3261              letter d (for days), w (for weeks), m (for months),  or  y  (for
3262              years)  (for  example  "2m"  for  two  months,  or "5y" for five
3263              years), or an absolute date in the form YYYY-MM-DD. Defaults  to
3264              "0".
3265
3266
3267       --ask-cert-expire
3268       --no-ask-cert-expire
3269              When  making  a key signature, prompt for an expiration time. If
3270              this option is  not  specified,  the  expiration  time  set  via
3271              --default-cert-expire  is  used.  --no-ask-cert-expire  disables
3272              this option.
3273
3274
3275       --default-cert-expire
3276              The default expiration time to use for key signature expiration.
3277              Valid values are "0" for no expiration, a number followed by the
3278              letter d (for days), w (for weeks), m (for months),  or  y  (for
3279              years)  (for  example  "2m"  for  two  months,  or "5y" for five
3280              years), or an absolute date in the form YYYY-MM-DD. Defaults  to
3281              "0".
3282
3283
3284       --default-new-key-algo string
3285              This option can be used to change the default algorithms for key
3286              generation. The string is similar to the arguments required  for
3287              the command --quick-add-key but slightly different.  For example
3288              the  current  default  of  "rsa2048/cert,sign+rsa2048/encr"  (or
3289              "rsa3072") can be changed to the value of what we currently call
3290              future default, which is "ed25519/cert,sign+cv25519/encr".   You
3291              need to consult the source code to learn the details.  Note that
3292              the advanced key generation commands can always be used to spec‐
3293              ify a key algorithm directly.
3294
3295
3296       --allow-secret-key-import
3297              This is an obsolete option and is not used anywhere.
3298
3299
3300       --allow-multiple-messages
3301
3302       --no-allow-multiple-messages
3303              Allow  processing  of  multiple  OpenPGP messages contained in a
3304              single file or stream.  Some programs that call GPG are not pre‐
3305              pared  to  deal with multiple messages being processed together,
3306              so this option defaults to no.  Note that versions of GPG  prior
3307              to 1.4.7 always allowed multiple messages.
3308
3309              Warning:  Do  not use this option unless you need it as a tempo‐
3310              rary workaround!
3311
3312
3313
3314       --enable-special-filenames
3315              This option enables a mode in which filenames of the form ‘-&n’,
3316              where  n  is  a  non-negative  decimal number, refer to the file
3317              descriptor n and not to a file with that name.
3318
3319
3320       --no-expensive-trust-checks
3321              Experimental use only.
3322
3323
3324       --preserve-permissions
3325              Don't change the permissions of a secret keyring  back  to  user
3326              read/write  only.  Use  this option only if you really know what
3327              you are doing.
3328
3329
3330       --default-preference-list string
3331              Set the list of default preferences to string.  This  preference
3332              list  is used for new keys and becomes the default for "setpref"
3333              in the edit menu.
3334
3335
3336       --default-keyserver-url name
3337              Set the default keyserver URL to name. This  keyserver  will  be
3338              used as the keyserver URL when writing a new self-signature on a
3339              key, which includes key generation and changing preferences.
3340
3341
3342       --list-config
3343              Display various internal configuration parameters of GnuPG. This
3344              option is intended for external programs that call GnuPG to per‐
3345              form tasks, and is thus  not  generally  useful.  See  the  file
3346doc/DETAILS’  in  the  source  distribution  for the details of
3347              which configuration items may be listed. --list-config  is  only
3348              usable with --with-colons set.
3349
3350
3351       --list-gcrypt-config
3352              Display various internal configuration parameters of Libgcrypt.
3353
3354
3355       --gpgconf-list
3356              This  command  is  similar  to --list-config but in general only
3357              internally used by the gpgconf tool.
3358
3359
3360       --gpgconf-test
3361              This is more or less dummy action.  However it parses  the  con‐
3362              figuration  file  and  returns with failure if the configuration
3363              file would prevent gpg from startup.  Thus it may be used to run
3364              a syntax check on the configuration file.
3365
3366
3367   Deprecated options
3368
3369
3370
3371
3372       --show-photos
3373       --no-show-photos
3374              Causes   --list-keys,   --list-signatures,   --list-public-keys,
3375              --list-secret-keys, and verifying a signature  to  also  display
3376              the  photo  ID  attached  to  the key, if any. See also --photo-
3377              viewer.  These  options  are  deprecated.   Use   --list-options
3378              [no-]show-photos    and/or   --verify-options   [no-]show-photos
3379              instead.
3380
3381
3382       --show-keyring
3383              Display the keyring name at the head of  key  listings  to  show
3384              which keyring a given key resides on. This option is deprecated:
3385              use --list-options [no-]show-keyring instead.
3386
3387
3388       --always-trust
3389              Identical to --trust-model always. This option is deprecated.
3390
3391
3392       --show-notation
3393       --no-show-notation
3394              Show signature notations in the  --list-signatures  or  --check-
3395              signatures listings as well as when verifying a signature with a
3396              notation in it. These options are deprecated. Use --list-options
3397              [no-]show-notation  and/or  --verify-options  [no-]show-notation
3398              instead.
3399
3400
3401       --show-policy-url
3402       --no-show-policy-url
3403              Show policy URLs in the --list-signatures or  --check-signatures
3404              listings as well as when verifying a signature with a policy URL
3405              in  it.  These  options  are  deprecated.   Use   --list-options
3406              [no-]show-policy-url  and/or  --verify-options [no-]show-policy-
3407              url instead.
3408
3409
3410

EXAMPLES

3412       gpg -se -r Bob file
3413              sign and encrypt for user Bob
3414
3415
3416       gpg --clear-sign file
3417              make a cleartext signature
3418
3419
3420       gpg -sb file
3421              make a detached signature
3422
3423
3424       gpg -u 0x12345678 -sb file
3425              make a detached signature with the key 0x12345678
3426
3427
3428       gpg --list-keys user_ID
3429              show keys
3430
3431
3432       gpg --fingerprint user_ID
3433              show fingerprint
3434
3435
3436       gpg --verify pgpfile
3437       gpg --verify sigfile [datafile]
3438              Verify the signature of the file but  do  not  output  the  data
3439              unless  requested.   The second form is used for detached signa‐
3440              tures, where sigfile is the  detached  signature  (either  ASCII
3441              armored  or binary) and datafile are the signed data; if this is
3442              not given, the name of the file holding the signed data is  con‐
3443              structed by cutting off the extension (".asc" or ".sig") of sig‐
3444              file or by asking the user for  the  filename.   If  the  option
3445              --output  is  also  used  the signed data is written to the file
3446              specified by that option; use - to write the signed data to std‐
3447              out.
3448

HOW TO SPECIFY A USER ID

3450       There  are  different ways to specify a user ID to GnuPG.  Some of them
3451       are only valid for gpg others are only good for  gpgsm.   Here  is  the
3452       entire list of ways to specify a key:
3453
3454
3455
3456       By key Id.
3457              This  format  is  deduced  from the length of the string and its
3458              content or 0x prefix. The key Id of an X.509 certificate are the
3459              low  64  bits  of  its SHA-1 fingerprint.  The use of key Ids is
3460              just a shortcut, for all automated  processing  the  fingerprint
3461              should be used.
3462
3463              When  using gpg an exclamation mark (!) may be appended to force
3464              using the specified primary or secondary key and not to try  and
3465              calculate which primary or secondary key to use.
3466
3467              The last four lines of the example give the key ID in their long
3468              form as internally used by the OpenPGP protocol. You can see the
3469              long key ID using the option --with-colons.
3470
3471         234567C4
3472         0F34E556E
3473         01347A56A
3474         0xAB123456
3475
3476         234AABBCC34567C4
3477         0F323456784E56EAB
3478         01AB3FED1347A5612
3479         0x234AABBCC34567C4
3480
3481
3482
3483
3484       By fingerprint.
3485              This  format  is  deduced  from the length of the string and its
3486              content or the 0x prefix.  Note, that only the 20  byte  version
3487              fingerprint  is available with gpgsm (i.e. the SHA-1 hash of the
3488              certificate).
3489
3490              When using gpg an exclamation mark (!) may be appended to  force
3491              using  the specified primary or secondary key and not to try and
3492              calculate which primary or secondary key to use.
3493
3494              The best way to specify a key Id is by  using  the  fingerprint.
3495              This  avoids  any  ambiguities in case that there are duplicated
3496              key IDs.
3497
3498         1234343434343434C434343434343434
3499         123434343434343C3434343434343734349A3434
3500         0E12343434343434343434EAB3484343434343434
3501         0xE12343434343434343434EAB3484343434343434
3502
3503
3504       gpgsm also accepts colons  between  each  pair  of  hexadecimal  digits
3505       because  this  is the de-facto standard on how to present X.509 finger‐
3506       prints.  gpg also allows the use of the space separated  SHA-1  finger‐
3507       print as printed by the key listing commands.
3508
3509
3510       By exact match on OpenPGP user ID.
3511              This  is denoted by a leading equal sign. It does not make sense
3512              for X.509 certificates.
3513
3514         =Heinrich Heine <heinrichh@uni-duesseldorf.de>
3515
3516
3517       By exact match on an email address.
3518              This is indicated by enclosing the email address  in  the  usual
3519              way with left and right angles.
3520
3521         <heinrichh@uni-duesseldorf.de>
3522
3523
3524
3525       By partial match on an email address.
3526              This  is  indicated  by  prefixing  the search string with an @.
3527              This uses a substring search but considers only the mail address
3528              (i.e. inside the angle brackets).
3529
3530         @heinrichh
3531
3532
3533       By exact match on the subject's DN.
3534              This  is  indicated by a leading slash, directly followed by the
3535              RFC-2253 encoded DN of the subject.  Note that you can't use the
3536              string  printed  by  gpgsm --list-keys because that one has been
3537              reordered and modified for better readability; use --with-colons
3538              to print the raw (but standard escaped) RFC-2253 string.
3539
3540         /CN=Heinrich Heine,O=Poets,L=Paris,C=FR
3541
3542
3543       By exact match on the issuer's DN.
3544              This is indicated by a leading hash mark, directly followed by a
3545              slash and then directly followed by the RFC-2253 encoded  DN  of
3546              the  issuer.   This  should  return the Root cert of the issuer.
3547              See note above.
3548
3549         #/CN=Root Cert,O=Poets,L=Paris,C=FR
3550
3551
3552
3553       By exact match on serial number and issuer's DN.
3554              This is indicated by a hash mark, followed  by  the  hexadecimal
3555              representation  of  the  serial number, then followed by a slash
3556              and the RFC-2253 encoded DN of the issuer. See note above.
3557
3558         #4F03/CN=Root Cert,O=Poets,L=Paris,C=FR
3559
3560
3561       By keygrip.
3562              This is indicated by an ampersand followed by the 40 hex  digits
3563              of  a  keygrip.  gpgsm prints the keygrip when using the command
3564              --dump-cert.
3565
3566         &D75F22C3F86E355877348498CDC92BD21010A480
3567
3568
3569
3570       By substring match.
3571              This is the default mode but applications may want to explicitly
3572              indicate  this  by  putting the asterisk in front.  Match is not
3573              case sensitive.
3574
3575         Heine
3576         *Heine
3577
3578
3579       . and + prefixes
3580              These prefixes are reserved for looking up mails anchored at the
3581              end  and  for  a word search mode.  They are not yet implemented
3582              and using them is undefined.
3583
3584
3585              Please note that we have reused the hash mark  identifier  which
3586              was  used in old GnuPG versions to indicate the so called local-
3587              id.  It is not anymore used and there should be no conflict when
3588              used with X.509 stuff.
3589
3590              Using the RFC-2253 format of DNs has the drawback that it is not
3591              possible to map them back to the original encoding,  however  we
3592              don't  have  to  do  this  because  our key database stores this
3593              encoding as meta data.
3594
3595

FILTER EXPRESSIONS

3597       The options --import-filter and --export-filter  use  expressions  with
3598       this syntax (square brackets indicate an optional part and curly braces
3599       a repetition, white space between the elements are allowed):
3600
3601                  [lc] {[{flag}] PROPNAME op VALUE [lc]}
3602
3603       The name of a property (PROPNAME) may only consist of  letters,  digits
3604       and  underscores.   The description for the filter type describes which
3605       properties are defined.  If an undefined property is used it  evaluates
3606       to  the empty string.  Unless otherwise noted, the VALUE must always be
3607       given and may not be the empty string.  No quoting is defined  for  the
3608       value,  thus  the value may not contain the strings && or ||, which are
3609       used as logical connection operators.  The  flag  --  can  be  used  to
3610       remove this restriction.
3611
3612       Numerical values are computed as long int; standard C notation applies.
3613       lc is the logical connection operator; either && for a  conjunction  or
3614       ||  for  a  disjunction.   A  conjunction is assumed at the begin of an
3615       expression.  Conjunctions have higher precedence than disjunctions.  If
3616       VALUE  starts  with  one of the characters used in any op a space after
3617       the op is required.
3618
3619
3620       The supported operators (op) are:
3621
3622
3623
3624       =~     Substring must match.
3625
3626
3627       !~     Substring must not match.
3628
3629
3630       =      The full string must match.
3631
3632
3633       <>     The full string must not match.
3634
3635
3636       ==     The numerical value must match.
3637
3638
3639       !=     The numerical value must not match.
3640
3641
3642       <=     The numerical value of the field must be LE than the value.
3643
3644
3645       <      The numerical value of the field must be LT than the value.
3646
3647
3648       >      The numerical value of the field must be GT than the value.
3649
3650
3651       >=     The numerical value of the field must be GE than the value.
3652
3653
3654       -le    The string value of the field must be less  or  equal  than  the
3655              value.
3656
3657
3658       -lt    The string value of the field must be less than the value.
3659
3660
3661       -gt    The string value of the field must be greater than the value.
3662
3663
3664       -ge    The  string value of the field must be greater or equal than the
3665              value.
3666
3667
3668       -n     True if value is not empty (no value allowed).
3669
3670
3671       -z     True if value is empty (no value allowed).
3672
3673
3674       -t     Alias for "PROPNAME != 0" (no value allowed).
3675
3676
3677       -f     Alias for "PROPNAME == 0" (no value allowed).
3678
3679
3680       Values for flag must be space separated.  The supported flags are:
3681
3682
3683       --     VALUE spans to the end of the expression.
3684
3685       -c     The string match in this part is done case-sensitive.
3686
3687       The filter options concatenate several specifications for a  filter  of
3688       the same type.  For example the four options in this example:
3689
3690                 --import-option keep-uid="uid =~ Alfa"
3691                 --import-option keep-uid="&& uid !~ Test"
3692                 --import-option keep-uid="|| uid =~ Alpha"
3693                 --import-option keep-uid="uid !~ Test"
3694
3695
3696       which is equivalent to
3697
3698                 --import-option \
3699                  keep-uid="uid =~ Alfa" && uid !~ Test" || uid =~ Alpha" && "uid !~ Test"
3700
3701       imports  only  the  user  ids of a key containing the strings "Alfa" or
3702       "Alpha" but not the string "test".
3703
3704

TRUST VALUES

3706       Trust values are used to indicate ownertrust and validity of  keys  and
3707       user IDs.  They are displayed with letters or strings:
3708
3709
3710
3711       -
3712       unknown
3713              No ownertrust assigned / not yet calculated.
3714
3715
3716       e
3717       expired
3718
3719              Trust calculation has failed; probably due to an expired key.
3720
3721
3722       q
3723       undefined, undef
3724              Not enough information for calculation.
3725
3726
3727       n
3728       never  Never trust this key.
3729
3730
3731       m
3732       marginal
3733              Marginally trusted.
3734
3735
3736       f
3737       full   Fully trusted.
3738
3739
3740       u
3741       ultimate
3742              Ultimately trusted.
3743
3744
3745       r
3746       revoked
3747              For validity only: the key or the user ID has been revoked.
3748
3749
3750       ?
3751       err    The program encountered an unknown trust value.
3752
3753

FILES

3755       There are a few configuration files to control certain aspects of gpg's
3756       operation. Unless noted, they are expected in the current  home  direc‐
3757       tory (see: [option --homedir]).
3758
3759
3760
3761       gpg.conf
3762              This  is the standard configuration file read by gpg on startup.
3763              It may contain any valid long option; the leading two dashes may
3764              not  be  entered  and  the  option may not be abbreviated.  This
3765              default name may be changed on  the  command  line  (see:  [gpg-
3766              option --options]).  You should backup this file.
3767
3768
3769       Note that on larger installations, it is useful to put predefined files
3770       into the directory ‘/etc/skel/.gnupg’ so that newly created users start
3771       up  with  a  working  configuration.  For existing users a small helper
3772       script is provided to create these files (see: [addgnupghome]).
3773
3774       For internal purposes gpg creates and maintains a few other files; They
3775       all live in the current home directory (see: [option --homedir]).  Only
3776       the gpg program may modify these files.
3777
3778
3779
3780       ~/.gnupg
3781              This is the default home directory which is used if neither  the
3782              environment  variable  GNUPGHOME  nor  the  option  --homedir is
3783              given.
3784
3785
3786       ~/.gnupg/pubring.gpg
3787              The public keyring.  You should backup this file.
3788
3789
3790       ~/.gnupg/pubring.gpg.lock
3791              The lock file for the public keyring.
3792
3793
3794       ~/.gnupg/pubring.kbx
3795              The public keyring using  a  different  format.   This  file  is
3796              shared with gpgsm.  You should backup this file.
3797
3798
3799       ~/.gnupg/pubring.kbx.lock
3800              The lock file for ‘pubring.kbx’.
3801
3802
3803       ~/.gnupg/secring.gpg
3804              A  secret  keyring  as used by GnuPG versions before 2.1.  It is
3805              not used by GnuPG 2.1 and later.
3806
3807
3808       ~/.gnupg/secring.gpg.lock
3809              The lock file for the secret keyring.
3810
3811
3812       ~/.gnupg/.gpg-v21-migrated
3813              File indicating that a migration to GnuPG 2.1 has been done.
3814
3815
3816       ~/.gnupg/trustdb.gpg
3817              The trust database.  There is no need to backup this file; it is
3818              better  to  backup the ownertrust values (see: [option --export-
3819              ownertrust]).
3820
3821
3822       ~/.gnupg/trustdb.gpg.lock
3823              The lock file for the trust database.
3824
3825
3826       ~/.gnupg/random_seed
3827              A file used to preserve the state of the internal random pool.
3828
3829
3830       ~/.gnupg/openpgp-revocs.d/
3831              This is the directory where gpg stores pre-generated  revocation
3832              certificates.   The file name corresponds to the OpenPGP finger‐
3833              print of the respective key.  It is suggested  to  backup  those
3834              certificates and if the primary private key is not stored on the
3835              disk to move them to an external storage device.  Anyone who can
3836              access  theses  files  is  able to revoke the corresponding key.
3837              You may want to print them out.  You should backup all files  in
3838              this directory and take care to keep this backup closed away.
3839
3840
3841       Operation is further controlled by a few environment variables:
3842
3843
3844
3845       HOME   Used to locate the default home directory.
3846
3847
3848       GNUPGHOME
3849              If set directory used instead of "~/.gnupg".
3850
3851
3852       GPG_AGENT_INFO
3853              This  variable is obsolete; it was used by GnuPG versions before
3854              2.1.
3855
3856
3857       PINENTRY_USER_DATA
3858              This value is passed via gpg-agent to pinentry.  It is useful to
3859              convey extra information to a custom pinentry.
3860
3861
3862       COLUMNS
3863       LINES  Used to size some displays to the full size of the screen.
3864
3865
3866       LANGUAGE
3867              Apart  from  its  use  by  GNU, it is used in the W32 version to
3868              override the language selection done through the  Registry.   If
3869              used  and  set  to a valid and available language name (langid),
3870              the   file    with    the    translation    is    loaded    from
3871              gpgdir/gnupg.nls/langid.mo.  Here gpgdir is the directory out of
3872              which the gpg binary has been loaded.  If it can't be loaded the
3873              Registry  is  tried and as last resort the native Windows locale
3874              system is used.
3875
3876
3877       When calling the gpg-agent component gpg sends  a  set  of  environment
3878       variables  to  gpg-agent.   The  names of these variables can be listed
3879       using the command:
3880
3881           gpg-connect-agent 'getinfo std_env_names' /bye | awk '$1=="D" {print $2}'
3882
3883
3884
3885
3886

BUGS

3888       On older systems this program should be installed as setuid(root). This
3889       is  necessary  to  lock memory pages. Locking memory pages prevents the
3890       operating  system  from  writing  memory  pages  (which   may   contain
3891       passphrases or other sensitive material) to disk. If you get no warning
3892       message about insecure memory your operating  system  supports  locking
3893       without being root. The program drops root privileges as soon as locked
3894       memory is allocated.
3895
3896       Note also that some systems (especially laptops) have  the  ability  to
3897       ``suspend  to  disk''  (also known as ``safe sleep'' or ``hibernate'').
3898       This writes all memory to disk before going into a low  power  or  even
3899       powered off mode.  Unless measures are taken in the operating system to
3900       protect the saved memory, passphrases or other sensitive  material  may
3901       be recoverable from it later.
3902
3903       Before  you  report  a bug you should first search the mailing list ar‐
3904       chives for similar problems and second check whether  such  a  bug  has
3905       already been reported to our bug tracker at https://bugs.gnupg.org.
3906
3907
3908

SEE ALSO

3910       gpgv(1), gpgsm(1), gpg-agent(1)
3911
3912       The full documentation for this tool is maintained as a Texinfo manual.
3913       If GnuPG and the info program are properly installed at your site,  the
3914       command
3915
3916         info gnupg
3917
3918       should  give  you access to the complete manual including a menu struc‐
3919       ture and an index.
3920
3921
3922
3923GnuPG 2.2.13                      2019-02-11                            GPG(1)
Impressum