[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.27

1.27    ! lteo        1: .\" $OpenBSD: signify.1,v 1.26 2014/03/16 22:49:56 tedu 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.27    ! lteo       17: .Dd $Mdocdate: March 16 2014 $
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 I
1.9       tedu       38: .Op Fl p Ar pubkey
                     39: .Op Fl s Ar seckey
1.19      tedu       40: .Op Fl x Ar sigfile
1.9       tedu       41: .Nm signify
1.10      deraadt    42: .Fl S
1.8       tedu       43: .Op Fl e
1.19      tedu       44: .Op Fl x Ar sigfile
1.7       espie      45: .Fl s Ar seckey
1.19      tedu       46: .Fl m Ar message
1.7       espie      47: .Nm signify
1.10      deraadt    48: .Fl V
1.24      tedu       49: .Op Fl eq
1.19      tedu       50: .Op Fl x Ar sigfile
1.7       espie      51: .Fl p Ar pubkey
1.19      tedu       52: .Fl m Ar message
1.1       tedu       53: .Sh DESCRIPTION
                     54: The
                     55: .Nm
1.19      tedu       56: utility creates and verifies cryptographic signatures.
                     57: A signature verifies the integrity of a
1.8       tedu       58: .Ar message .
1.10      deraadt    59: The mode of operation is selected with the following options:
1.12      tedu       60: .Bl -tag -width Dsssigfile
1.24      tedu       61: .It Fl C
1.25      naddy      62: Verify a signed checksum list, and then verify the checksum for
1.24      tedu       63: each file.
                     64: If no files are specified, all of them are checked.
                     65: .Ar sigfile
                     66: should be the signed output of
                     67: .Xr sha256 1 .
1.10      deraadt    68: .It Fl G
1.25      naddy      69: Generate a new key pair.
1.10      deraadt    70: .It Fl I
                     71: Inspect the specified keys or signature and print their fingerprint.
                     72: .It Fl S
1.19      tedu       73: Sign the specified message file and create a signature.
1.10      deraadt    74: .It Fl V
1.19      tedu       75: Verify the message and signature match.
1.10      deraadt    76: .El
1.4       jmc        77: .Pp
1.10      deraadt    78: The other options are as follows:
1.12      tedu       79: .Bl -tag -width Dsssignature
1.14      tedu       80: .It Fl c Ar comment
                     81: Specify the comment to be added during key generation.
1.8       tedu       82: .It Fl e
1.19      tedu       83: When signing, embed the message after the signature.
                     84: When verifying, extract the message from the signature.
                     85: (This requires that the signature was created using
                     86: .Fl e
                     87: and creates a new message file as output.)
                     88: .It Fl m Ar message
                     89: When signing, the file containing the message to sign.
                     90: When verifying, the file containing the message to verify.
                     91: When verifying with
                     92: .Fl e ,
                     93: the file to create.
1.6       tedu       94: .It Fl n
1.1       tedu       95: Do not ask for a passphrase during key generation.
                     96: Otherwise,
                     97: .Nm
1.19      tedu       98: will prompt the user for a passphrase to protect the secret key.
1.6       tedu       99: .It Fl p Ar pubkey
1.1       tedu      100: Public key produced by
1.7       espie     101: .Fl G ,
1.1       tedu      102: and used by
1.7       espie     103: .Fl V
1.1       tedu      104: to check a signature.
1.24      tedu      105: .It Fl q
1.25      naddy     106: Quiet mode.
                    107: Suppress informational output.
1.6       tedu      108: .It Fl s Ar seckey
1.1       tedu      109: Secret (private) key produced by
1.7       espie     110: .Fl G ,
1.1       tedu      111: and used by
1.7       espie     112: .Fl S
1.1       tedu      113: to sign a message.
1.19      tedu      114: .It Fl x Ar sigfile
                    115: The signature file to create or verify.
                    116: The default is
                    117: .Ar message Ns .sig .
1.1       tedu      118: .El
1.4       jmc       119: .Pp
                    120: The key and signature files created by
                    121: .Nm
                    122: have the same format.
                    123: The first line of the file is a free form text comment that may be edited,
                    124: so long as it does not exceed a single line.
1.26      tedu      125: .\" Signature comments will be generated based on the name of the secret
                    126: .\" key used for signing.
                    127: .\" This comment can then be used as a hint for the name of the public key
                    128: .\" when verifying.
1.4       jmc       129: The second line of the file is the actual key or signature base64 encoded.
1.1       tedu      130: .Sh EXIT STATUS
1.4       jmc       131: .Ex -std signify
                    132: It may fail because of one of the following reasons:
                    133: .Pp
1.1       tedu      134: .Bl -bullet -compact
1.4       jmc       135: .It
1.1       tedu      136: Some necessary files do not exist.
                    137: .It
                    138: Entered passphrase is incorrect.
                    139: .It
                    140: The message file was corrupted and its signature does not match.
                    141: .It
                    142: The message file is too large.
                    143: .El
                    144: .Sh EXAMPLES
1.25      naddy     145: Create a new key pair:
1.7       espie     146: .Dl $ signify -G -p newkey.pub -s newkey.sec
1.4       jmc       147: .Pp
                    148: Sign a file, specifying a signature name:
1.19      tedu      149: .Dl $ signify -S -s key.sec -m message.txt -x msg.sig
1.4       jmc       150: .Pp
1.1       tedu      151: Verify a signature, using the default signature name:
1.19      tedu      152: .Dl $ signify -V -p key.pub -m generalsorders.txt
1.11      deraadt   153: .Pp
1.17      deraadt   154: Verify a release directory containing
1.19      tedu      155: .Pa SHA256.sig
1.17      deraadt   156: and a full set of release files:
1.21      jmc       157: .Bd -literal -offset indent -compact
1.27    ! lteo      158: $ signify -C -p /etc/signify/openbsd-56-base.pub -x SHA256.sig
1.22      lteo      159: .Ed
                    160: .Pp
                    161: Verify a bsd.rd before an upgrade:
                    162: .Bd -literal -offset indent -compact
1.27    ! lteo      163: $ signify -C -p /etc/signify/openbsd-56-base.pub -x SHA256.sig bsd.rd
1.21      jmc       164: .Ed
1.1       tedu      165: .Sh SEE ALSO
1.11      deraadt   166: .Xr fw_update 1 ,
                    167: .Xr pkg_add 1 ,
                    168: .Xr sha256 1
1.1       tedu      169: .Sh HISTORY
                    170: The
                    171: .Nm
                    172: command first appeared in
1.7       espie     173: .Ox 5.5 .