# GPGV - Verify OpenPGP signatures - man(1) - [phpMan]

> **TLDR:** Verify OpenPGP signatures.
>
- Verify a clearsigned or inline-signed file (the signature is embedded in the file itself):
  `gpgv {{path/to/file.asc}}`
- Verify a detached signature (`.asc` or `.sig`) against its corresponding data file:
  `gpgv {{path/to/signature.asc}} {{path/to/data_file}}`
- Verify a detached signature using a specific public keyring or exported public key file (`.gpg` or `.kbx`):
  `gpgv --keyring {{path/to/pubkey_or_keyring.gpg}} {{path/to/signature.asc}} {{path/to/data_file}}`
- Verify a detached signature using a specific public key file in plain text format (`.txt`):
  `gpg --dearmor {{-o|--output}} {{path/to/pubkey.gpg}} {{path/to/pubkey.txt}} && gpgv --keyring {{path/to/pubkey.gpg}} {{path/to/signature.asc}} {{path/to/data_file}}`

*Source: tldr-pages*

---

[_GPGV_(1)](https://www.chedong.com/phpMan.php/man/GPGV/1/markdown)                                 GNU Privacy Guard 2.4                                [_GPGV_(1)](https://www.chedong.com/phpMan.php/man/GPGV/1/markdown)

## NAME
       **gpgv **- Verify OpenPGP signatures

## SYNOPSIS
       **gpgv **[_options_] _signed_files_



## DESCRIPTION
       **gpgv **is an OpenPGP signature verification tool.

       This  program  is  actually a stripped-down version of **gpg **which is only able to check signa‐
       tures. It is somewhat smaller than the fully-blown **gpg **and uses a different (and simpler) way
       to check that the public keys used to make the signature are valid. There are  no  configura‐
       tion files and only a few options are implemented.

       **gpgv  **assumes that all keys in the keyring are trustworthy.  That does also mean that it does
       not check for expired or revoked keys.

       If no **--keyring **option is given, **gpgv **looks for a ``default'' keyring named ‘_trustedkeys.kbx_’
       (preferred) or ‘_trustedkeys.gpg_’ in the home directory of GnuPG, either the default home  di‐
       rectory or the one set by the **--homedir **option or the **GNUPGHOME **environment variable.  If any
       **--keyring  **option  is  used, **gpgv **will not look for the default keyring. The **--keyring **option
       may be used multiple times and all specified keyrings will be used together.



## RETURN VALUE
       The program returns 0 if everything is fine, 1 if at least one signature was bad,  and  other
       error codes for fatal errors.


## OPTIONS
       **gpgv **recognizes these options:



### --verbose
### -v     
              detail.


### --quiet
### -q     


       **--keyring _**file_
              Add _file_ to the list of keyrings.  If _file_ begins with a tilde and a slash, these  are
              replaced  by  the  HOME directory. If the filename does not contain a slash, it is as‐
              sumed to be in the home-directory ("~/.gnupg" if --homedir is not used).


       **--output _**file_
### -o _
              Write output to _file_; to write to stdout use **-**.  This option can be used  to  get  the
              signed  text  from  a cleartext or binary signature; it also works for detached signa‐
              tures, but in that case this option is in general not useful.  Note that  an  existing
              file will be overwritten.



       **--status-fd _**n_
              Write  special  status  strings to the file descriptor _n_.  See the file DETAILS in the
              documentation for a listing of them.


### --logger-fd n
              Write log output to file descriptor **n **and not to stderr.


### --log-file file
              Same as **--logger-fd**, except the logger data is written to file **file**.  Use  ‘_socket://_’
              to log to socket.


### --ignore-time-conflict
              GnuPG  normally  checks  that  the timestamps associated with keys and signatures have
              plausible values. However, sometimes a signature seems to be older than the key due to
              clock problems. This option turns these checks into warnings.


       **--homedir _**dir_
              Set the name of the home directory to _dir_. If this option is not used, the home direc‐
              tory defaults to ‘_~/.gnupg_’.  It is only recognized when given on  the  command  line.
              It  also  overrides  any  home  directory  stated  through  the  environment  variable
              ‘_GNUPGHOME_’ or (on  Windows  systems)  by  means  of  the  Registry  entry  _HKCU\Soft‐_
              _ware\GNU\GnuPG:HomeDir_.

              On Windows systems it is possible to install GnuPG as a portable application.  In this
              case  only this command line option is considered, all other ways to set a home direc‐
              tory are ignored.


### --weak-digest name
              Treat the specified digest algorithm as weak.  Signatures made over weak digests algo‐
              rithms are normally rejected. This option can be supplied multiple times  if  multiple
              algorithms  should  be  considered  weak.  MD5 is always considered weak, and does not
              need to be listed explicitly.


### --enable-special-filenames
              This option enables a mode in which filenames of the form ‘_-&n_’, where n is a non-neg‐
              ative decimal number, refer to the file descriptor n and not to a file with that name.


       **--assert-pubkey-algo _**algolist_
              This option works in the same way as described for **gpg**.


## EXAMPLES
### gpgv pgpfile
       **gpgv sigfile **[**datafile**]
              Verify the signature of the file. The second form is  used  for  detached  signatures,
              where  **sigfile **is the detached signature (either ASCII-armored or binary) and **datafile**
              contains the signed data; if **datafile **is "-" the signed data is expected on **stdin**;  if
              **datafile  **is  not given the name of the file holding the signed data is constructed by
              cutting off the extension (".asc", ".sig" or ".sign") from **sigfile**.


## FILES
### ~/.gnupg/trustedkeys.gpg
              The default keyring with the allowed keys.


## ENVIRONMENT
       **HOME   **Used to locate the default home directory.


       **GNUPGHOME**
              If set directory used instead of "~/.gnupg".


## SEE ALSO
       [**gpg**(1)](https://www.chedong.com/phpMan.php/man/gpg/1/markdown)

       The full documentation for this tool is maintained as a Texinfo manual.   If  GnuPG  and  the
       info program are properly installed at your site, the command

         info gnupg

       should give you access to the complete manual including a menu structure and an index.




GnuPG 2.4.4                                  2024-01-25                                      [_GPGV_(1)](https://www.chedong.com/phpMan.php/man/GPGV/1/markdown)
