.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "PGPVERIFY 1" .TH PGPVERIFY 1 2024-04-01 "INN 2.7.2" "InterNetNews Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME pgpverify \- Cryptographically verify Usenet control messages .SH SYNOPSIS .IX Header "SYNOPSIS" \&\fBpgpverify\fR [\fB\-\-findid\fR=\fIstring\fR] [\fB\-\-test\fR] < \fImessage\fR .SH DESCRIPTION .IX Header "DESCRIPTION" The \fBpgpverify\fR program reads (on standard input) a Usenet control message that has been cryptographically signed using the \fBsigncontrol\fR program (or some other program that produces a compatible format). \&\fBpgpverify\fR then uses a PGP implementation to determine who signed the control message. If the control message has a valid signature, \&\fBpgpverify\fR prints (to stdout) the user ID of the key that signed the message. Otherwise, it exits with a non-zero exit status. .PP If \fBpgpverify\fR is installed as part of INN, it uses INN's configuration to determine what signature verification program to use, how to log errors, what temporary directory to use, and what keyring to use. Otherwise, all of those parameters can be set by editing the beginning of this script. .PP By default, when running as part of INN, \fBpgpverify\fR expects the PGP key ring to be found in \fIpathetc\fR/pgp (as either \fIpubring.pgp\fR or \&\fIpubring.gpg\fR depending on whether PGP or GnuPG is used to verify signatures). If that directory doesn't exist, it will fall back on using the default key ring, which is in a \fI.pgp\fR or \fI.gnupg\fR subdirectory of the running user's home directory. .PP INN, when using GnuPG, configures \fBpgpverify\fR to use \fBgpg\fR or \fBgpgv\fR, which by default expects keys to be in a keyring named \fItrustedkeys.gpg\fR, since it doesn't implement trust checking directly. \fBpgpverify\fR uses that file if present but falls back to \fIpubring.gpg\fR if it's not found. This bypasses the trust model for checking keys, but is compatible with the way that \&\fBpgpverify\fR used to behave. Of course, if a keyring is found in \&\fIpathetc\fR/pgp or configured at the top of the script, that overrides all of this behavior. .PP Note that a few Usenet hierarchies still send control articles signed with old PGP keys using a weak hash algorithm (MD5). Modern versions of GnuPG (2.1.0+) no longer validate such signatures, so you should use GnuPG\ 1.x or 2.0.x if you need verifying such control articles. .SH OPTIONS .IX Header "OPTIONS" .IP \fB\-\-findid\fR=\fIstring\fR 4 .IX Item "--findid=string" The \fB\-\-findid\fR flag causes \fBpgpverify\fR to explicitly search for \&\fIstring\fR in the output from PGP's analysis of the message. This option is useful when several UIDs are defined on a single PGP key, and the caller to \fBpgpverify\fR needs checking whether a given one is defined on this key. In case the signature is valid but does not contain \fIstring\fR, \&\fBpgpverify\fR exits with exit status 4. .IP \fB\-\-test\fR 4 .IX Item "--test" The \fB\-\-test\fR flag causes \fBpgpverify\fR to print out the input that it is passing to PGP (which is a reconstructed version of the input that supposedly created the control message) as well as the output from PGP's analysis of the message. .SH "EXIT STATUS" .IX Header "EXIT STATUS" \&\fBpgpverify\fR may exit with the following statuses: .IP 0 4 The control message had a good PGP signature. .IP 1 4 .IX Item "1" The control message had no PGP signature. .IP 2 4 .IX Item "2" The control message had an unknown PGP signature. .IP 3 4 .IX Item "3" The control message had a bad PGP signature. .IP 4 4 .IX Item "4" The control message had a good PGP signature but the argument given to the \fB\-\-findid\fR flag had non been found in the output from PGP's analysis of the message. .IP 255 4 .IX Item "255" A problem occurred not directly related to PGP analysis of signature. .SH ENVIRONMENT .IX Header "ENVIRONMENT" \&\fBpgpverify\fR does not modify or otherwise alter the environment before invoking the \fBpgp\fR, \fBgpgv\fR or \fBgpg\fR program. It is the responsibility of the person who installs \fBpgpverify\fR to ensure that when \fBpgp\fR, \fBgpgv\fR or \&\fBgpg\fR runs, it has the ability to locate and read a PGP key file that contains the PGP public keys for the appropriate Usenet hierarchy administrators. \fBpgpverify\fR can be pointed to an appropriate key ring by editing variables at the beginning of this script. .SH NOTES .IX Header "NOTES" Historically, Usenet news server administrators have configured their news servers to automatically honor Usenet control messages based on the originator of the control messages and the hierarchies for which the control messages applied. For example, in the past, David Lawrence always issued control messages for the "Big\ 8" hierarchies (comp, humanities, misc, news, rec, sci, soc, talk). Usenet news administrators would configure their news server software to automatically honor newgroup and rmgroup control messages that originated from David Lawrence and applied to any of the Big\ 8 hierarchies. .PP Unfortunately, Usenet news articles (including control messages) are notoriously easy to forge. Soon, malicious users realized they could create or remove (at least temporarily) any Big\ 8 newsgroup they wanted by simply forging an appropriate control message in David Lawrence's name. As Usenet became more widely used, forgeries became more common. .PP The \fBpgpverify\fR program was designed to allow Usenet news administrators to configure their servers to cryptographically verify control messages before automatically acting on them. Under the \fBpgpverify\fR system, a Usenet hierarchy maintainer creates a PGP public/private key pair and disseminates the public key. Whenever the hierarchy maintainer issues a control message, he uses the \fBsigncontrol\fR program to sign the control message with the PGP private key. Usenet news administrators configure their news servers to run the \fBpgpverify\fR program on the appropriate control messages, and take action based on the PGP key User ID that signed the control message, not the name and address that appear in the control message's From: or Sender: headers. .PP Thus, appropriate use of the \fBsigncontrol\fR and \fBpgpverify\fR programs essentially eliminates the possibility of malicious users forging Usenet control messages that sites will act upon, as such users would have to obtain the PGP private key in order to forge a control message that would pass the cryptographic verification step. If the hierarchy administrators properly protect their PGP private keys, the only way a malicious user could forge a validly-signed control message would be by breaking the public key encryption algorithm, which (at least at this time) is believed to be prohibitively difficult for PGP keys of a sufficient bit length. .SH HISTORY .IX Header "HISTORY" \&\fBpgpverify\fR was written by David C Lawrence . Manual page provided by James Ralston. It is currently maintained by Russ Allbery . .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" David Lawrence wrote: "Our lawyer told me to include the following. The upshot of it is that you can use the software for free as much as you like." .PP Copyright (c) 1996 UUNET Technologies, Inc. All rights reserved. .PP Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: .IP 1. 4 Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. .IP 2. 4 Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. .IP 3. 4 All advertising materials mentioning features or use of this software must display the following acknowledgement: .Sp .Vb 1 \& This product includes software developed by UUNET Technologies, Inc. .Ve .IP 4. 4 The name of UUNET Technologies ("UUNET") may not be used to endorse or promote products derived from this software without specific prior written permission. .PP THIS SOFTWARE IS PROVIDED BY UUNET "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL UUNET BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .SH "SEE ALSO" .IX Header "SEE ALSO" gpg(1), gpgv(1), pgp(1). .PP is where the most recent versions of \&\fBsigncontrol\fR and \fBpgpverify\fR live, along with PGP public keys used for hierarchy administration.