GPGV(1)

๐Ÿ’… GPGV(1) โ€” bestie, it's the gpgv manual โœจ

okay so real talk: this is the gpgv page from the GNU Privacy Guard 2.6 manual set, and I'm gonna walk you through it like we're texting at 2am ๐Ÿซถ

๐ŸŒธ NAME ๐ŸŒธ

gpgv โ€” verify OpenPGP signatures. that's it. that's the whole job. iconic honestly ๐Ÿ‘‘

๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

gpgv [options] sigfile [datafiles]

โœจ DESCRIPTION โœจ

so gpgv is an OpenPGP signature verification tool. it checks signatures. it does not do vibes. it does not do keys generation. it checks. signatures. periodt.

here's the tea โ˜• โ€” this program is actually a stripped-down version of gpg that is only able to check signatures. like, imagine gpg but it went to the gym and dropped everything except the one thing it's obsessed with. it's 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.

and the best part? there are no configuration files and only a few options are implemented. no config files. none. lowkey a dream ๐Ÿ˜ญ

โš ๏ธ important caveat bestie: gpgv assumes that all keys in the keyring are trustworthy. which also means it does not check for expired or revoked keys. so likeโ€ฆ trust your keyring, okay? ๐Ÿซถ

now, about which keyring it uses โ€” if no --keyring option is given, gpgv looks for a "default" keyring named trustedkeys.kbx (preferred, obviously, she's the main character) or trustedkeys.gpg in the home directory of GnuPG. and which home directory is that? either the default home directory, or the one set by the --homedir option, or the GNUPGHOME environment variable. pick your fighter ๐Ÿ’…

if any --keyring option is used, gpgv will not look for the default keyring. and like, you can use --keyring multiple times and all specified keyrings will be used together. friendship bracelets energy fr fr ๐ŸŽ€

๐Ÿ”ฅ RETURN VALUE ๐Ÿ”ฅ

  • returns 0 if everything is fine โœจ slay
  • returns 1 if at least one signature was bad ๐Ÿ’€
  • other error codes for fatal errors ๐Ÿ˜ญ

๐Ÿ’œ OPTIONS ๐Ÿ’œ

gpgv recognizes these options, and we're going through all of them, no skips, no skimming:

  • --verbose, -v โ€” gives more information during processing. if used twice, the input data is listed in detail. double it and give it to the next person ๐Ÿ—ฃ๏ธ
  • --quiet, -q โ€” try to be as quiet as possible. shhh ๐Ÿคซ
  • --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 assumed to be in the home-directory ("~/.gnupg" if --homedir is not used).
  • --output file, -o file โ€” 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 signatures, but in that case this option is in general not useful. > note that an existing file will be overwritten. bestie. it will be overwritten. back it up first ๐Ÿ˜ญ
  • --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. yes that's the real syntax, go off ๐Ÿงš
  • --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. (clock problems = the group chat's collective nemesis ๐Ÿ•ฐ๏ธ)
  • --homedir dir โ€” set the name of the home directory to dir. if this option is not used, the home directory 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\Software\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 directory are ignored. Windows said "my way or the highway" ๐Ÿ’€

  • --weak-digest name โ€” treat the specified digest algorithm as weak. signatures made over weak digest algorithms 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. MD5 catching strays and honestly? deserved ๐Ÿšฉ
  • --enable-special-filenames โ€” this option enables a mode in which filenames of the form -&n, where n is a non-negative decimal number, refer to the file descriptor n and not to a file with that name. iykyk โœจ
  • --assert-pubkey-algo algolist โ€” this option works in the same way as described for gpg. (go read that page bestie, it's giving crossover episode ๐Ÿฆ‹)

๐ŸŽ€ 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. it justโ€ฆ snips it off. self-care โœ‚๏ธ

๐Ÿ’– FILES ๐Ÿ’–

default keyring file is expected in the GnuPG home directory (see: [option --homedir], GNUPGHOME).

  • ~/.gnupg/trustedkeys.kbx โ€” the default keyring with the allowed keys, using the new keybox format. she's new, she's fresh, she's the preferred one ๐Ÿ‘‘
  • ~/.gnupg/trustedkeys.gpg โ€” when trustedkeys.kbx is not available, the default keyring with the allowed keys, using a legacy format. the backup queen ๐ŸŒˆ

๐ŸŒŸ ENVIRONMENT ๐ŸŒŸ

  • HOME โ€” used to locate the default home directory.
  • GNUPGHOME โ€” if set, directory used instead of "~/.gnupg".

๐Ÿฆ„ SEE ALSO ๐Ÿฆ„

gpg(1) โ€” the big sister ๐Ÿ’…

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. go read it, it's giving library ๐Ÿ“š


and that's the page bestie! this was GnuPG 2.5.5, dated 2025-02-19, page GPGV(1) โ€” go verify some signatures and stay slay ๐Ÿ’–โœจ๐ŸŽ€

๐Ÿ“ฆ where this page comes from