[BACK]Return to signify.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / signify

Annotation of src/usr.bin/signify/signify.1, Revision 1.44

1.44    ! deraadt     1: .\" $OpenBSD: signify.1,v 1.43 2018/02/28 14:56:46 deraadt Exp $
1.1       tedu        2: .\"
                      3: .\"Copyright (c) 2013 Marc Espie <espie@openbsd.org>
                      4: .\"Copyright (c) 2013 Ted Unangst <tedu@openbsd.org>
                      5: .\"
                      6: .\"Permission to use, copy, modify, and distribute this software for any
                      7: .\"purpose with or without fee is hereby granted, provided that the above
                      8: .\"copyright notice and this permission notice appear in all copies.
                      9: .\"
                     10: .\"THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
                     11: .\"WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
                     12: .\"MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
                     13: .\"ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
                     14: .\"WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
                     15: .\"ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
                     16: .\"OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1.44    ! deraadt    17: .Dd $Mdocdate: February 28 2018 $
1.1       tedu       18: .Dt SIGNIFY 1
                     19: .Os
                     20: .Sh NAME
                     21: .Nm signify
                     22: .Nd cryptographically sign and verify files
                     23: .Sh SYNOPSIS
                     24: .Nm signify
1.24      tedu       25: .Fl C
                     26: .Op Fl q
                     27: .Fl p Ar pubkey
                     28: .Fl x Ar sigfile
1.25      naddy      29: .Op Ar
1.24      tedu       30: .Nm signify
1.10      deraadt    31: .Fl G
1.25      naddy      32: .Op Fl n
1.15      deraadt    33: .Op Fl c Ar comment
1.7       espie      34: .Fl p Ar pubkey
                     35: .Fl s Ar seckey
                     36: .Nm signify
1.10      deraadt    37: .Fl S
1.35      espie      38: .Op Fl ez
1.19      tedu       39: .Op Fl x Ar sigfile
1.7       espie      40: .Fl s Ar seckey
1.19      tedu       41: .Fl m Ar message
1.7       espie      42: .Nm signify
1.10      deraadt    43: .Fl V
1.35      espie      44: .Op Fl eqz
                     45: .Op Fl p Ar pubkey
                     46: .Op Fl t Ar keytype
1.19      tedu       47: .Op Fl x Ar sigfile
                     48: .Fl m Ar message
1.1       tedu       49: .Sh DESCRIPTION
                     50: The
                     51: .Nm
1.19      tedu       52: utility creates and verifies cryptographic signatures.
                     53: A signature verifies the integrity of a
1.8       tedu       54: .Ar message .
1.10      deraadt    55: The mode of operation is selected with the following options:
1.12      tedu       56: .Bl -tag -width Dsssigfile
1.24      tedu       57: .It Fl C
1.25      naddy      58: Verify a signed checksum list, and then verify the checksum for
1.24      tedu       59: each file.
                     60: If no files are specified, all of them are checked.
                     61: .Ar sigfile
                     62: should be the signed output of
                     63: .Xr sha256 1 .
1.10      deraadt    64: .It Fl G
1.25      naddy      65: Generate a new key pair.
1.40      tedu       66: Keynames should follow the convention of
                     67: .Pa keyname.pub
                     68: and
                     69: .Pa keyname.sec
                     70: for the public and secret keys, respectively.
1.10      deraadt    71: .It Fl S
1.19      tedu       72: Sign the specified message file and create a signature.
1.10      deraadt    73: .It Fl V
1.19      tedu       74: Verify the message and signature match.
1.10      deraadt    75: .El
1.4       jmc        76: .Pp
1.10      deraadt    77: The other options are as follows:
1.12      tedu       78: .Bl -tag -width Dsssignature
1.14      tedu       79: .It Fl c Ar comment
                     80: Specify the comment to be added during key generation.
1.8       tedu       81: .It Fl e
1.19      tedu       82: When signing, embed the message after the signature.
                     83: When verifying, extract the message from the signature.
                     84: (This requires that the signature was created using
                     85: .Fl e
                     86: and creates a new message file as output.)
                     87: .It Fl m Ar message
                     88: When signing, the file containing the message to sign.
                     89: When verifying, the file containing the message to verify.
                     90: When verifying with
                     91: .Fl e ,
                     92: the file to create.
1.6       tedu       93: .It Fl n
1.1       tedu       94: Do not ask for a passphrase during key generation.
                     95: Otherwise,
                     96: .Nm
1.19      tedu       97: will prompt the user for a passphrase to protect the secret key.
1.6       tedu       98: .It Fl p Ar pubkey
1.1       tedu       99: Public key produced by
1.7       espie     100: .Fl G ,
1.1       tedu      101: and used by
1.7       espie     102: .Fl V
1.1       tedu      103: to check a signature.
1.24      tedu      104: .It Fl q
1.25      naddy     105: Quiet mode.
                    106: Suppress informational output.
1.6       tedu      107: .It Fl s Ar seckey
1.1       tedu      108: Secret (private) key produced by
1.7       espie     109: .Fl G ,
1.1       tedu      110: and used by
1.7       espie     111: .Fl S
1.1       tedu      112: to sign a message.
1.35      espie     113: .It Fl t Ar keytype
                    114: When deducing the correct key to check a signature, make sure
                    115: the actual key matches
1.39      tedu      116: .Pa /etc/signify/*-keytype.pub .
1.19      tedu      117: .It Fl x Ar sigfile
                    118: The signature file to create or verify.
                    119: The default is
                    120: .Ar message Ns .sig .
1.35      espie     121: .It Fl z
                    122: Sign and verify
                    123: .Xr gzip 1
                    124: archives, where the signing data
                    125: is embedded in the
                    126: .Xr gzip 1
                    127: header.
1.1       tedu      128: .El
1.4       jmc       129: .Pp
                    130: The key and signature files created by
                    131: .Nm
                    132: have the same format.
                    133: The first line of the file is a free form text comment that may be edited,
                    134: so long as it does not exceed a single line.
1.40      tedu      135: Signature comments will be generated based on the name of the secret
                    136: key used for signing.
                    137: This comment can then be used as a hint for the name of the public key
                    138: when verifying.
1.4       jmc       139: The second line of the file is the actual key or signature base64 encoded.
1.1       tedu      140: .Sh EXIT STATUS
1.4       jmc       141: .Ex -std signify
                    142: It may fail because of one of the following reasons:
                    143: .Pp
1.1       tedu      144: .Bl -bullet -compact
1.4       jmc       145: .It
1.1       tedu      146: Some necessary files do not exist.
                    147: .It
                    148: Entered passphrase is incorrect.
                    149: .It
                    150: The message file was corrupted and its signature does not match.
                    151: .It
                    152: The message file is too large.
                    153: .El
                    154: .Sh EXAMPLES
1.25      naddy     155: Create a new key pair:
1.7       espie     156: .Dl $ signify -G -p newkey.pub -s newkey.sec
1.4       jmc       157: .Pp
                    158: Sign a file, specifying a signature name:
1.19      tedu      159: .Dl $ signify -S -s key.sec -m message.txt -x msg.sig
1.4       jmc       160: .Pp
1.1       tedu      161: Verify a signature, using the default signature name:
1.19      tedu      162: .Dl $ signify -V -p key.pub -m generalsorders.txt
1.11      deraadt   163: .Pp
1.17      deraadt   164: Verify a release directory containing
1.19      tedu      165: .Pa SHA256.sig
1.17      deraadt   166: and a full set of release files:
1.21      jmc       167: .Bd -literal -offset indent -compact
1.44    ! deraadt   168: $ signify -C -p /etc/signify/openbsd-65-base.pub -x SHA256.sig
1.22      lteo      169: .Ed
                    170: .Pp
                    171: Verify a bsd.rd before an upgrade:
                    172: .Bd -literal -offset indent -compact
1.44    ! deraadt   173: $ signify -C -p /etc/signify/openbsd-65-base.pub -x SHA256.sig bsd.rd
1.21      jmc       174: .Ed
1.35      espie     175: .Pp
                    176: Sign a gzip archive:
                    177: .Bd -literal -offset indent -compact
                    178: $ signify -Sz -s key-arc.sec -m in.tgz -x out.tgz
                    179: .Ed
                    180: .Pp
                    181: Verify a gzip pipeline:
                    182: .Bd -literal -offset indent -compact
1.38      tedu      183: $ ftp url | signify -Vz -t arc | tar ztf -
1.35      espie     184: .Ed
1.1       tedu      185: .Sh SEE ALSO
1.11      deraadt   186: .Xr fw_update 1 ,
1.36      espie     187: .Xr gzip 1 ,
1.11      deraadt   188: .Xr pkg_add 1 ,
1.36      espie     189: .Xr sha256 1
1.1       tedu      190: .Sh HISTORY
                    191: The
                    192: .Nm
                    193: command first appeared in
1.7       espie     194: .Ox 5.5 .
1.30      tedu      195: .Sh AUTHORS
1.36      espie     196: .An -nosplit
                    197: .An Ted Unangst Aq Mt tedu@openbsd.org
                    198: and
1.37      jmc       199: .An Marc Espie Aq Mt espie@openbsd.org .