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

1.24    ! tedu        1: .\" $OpenBSD: signify.1,v 1.23 2014/02/27 17:03:52 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.24    ! tedu       17: .Dd $Mdocdate: February 27 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
        !            29: .Op files...
        !            30: .Nm signify
1.10      deraadt    31: .Fl G
1.15      deraadt    32: .Op Fl c Ar comment
1.6       tedu       33: .Op Fl n
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
        !            62: Verify the signed checksum list, and then verify the checksum for
        !            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
                     69: Generate a new keypair.
                     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
        !           106: Quiet mode. 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.19      tedu      113: .It Fl x Ar sigfile
                    114: The signature file to create or verify.
                    115: The default is
                    116: .Ar message Ns .sig .
1.1       tedu      117: .El
1.4       jmc       118: .Pp
                    119: The key and signature files created by
                    120: .Nm
                    121: have the same format.
                    122: The first line of the file is a free form text comment that may be edited,
                    123: so long as it does not exceed a single line.
                    124: The second line of the file is the actual key or signature base64 encoded.
1.1       tedu      125: .Sh EXIT STATUS
1.4       jmc       126: .Ex -std signify
                    127: It may fail because of one of the following reasons:
                    128: .Pp
1.1       tedu      129: .Bl -bullet -compact
1.4       jmc       130: .It
1.1       tedu      131: Some necessary files do not exist.
                    132: .It
                    133: Entered passphrase is incorrect.
                    134: .It
                    135: The message file was corrupted and its signature does not match.
                    136: .It
                    137: The message file is too large.
                    138: .El
                    139: .Sh EXAMPLES
                    140: Create a new keypair:
1.7       espie     141: .Dl $ signify -G -p newkey.pub -s newkey.sec
1.4       jmc       142: .Pp
                    143: Sign a file, specifying a signature name:
1.19      tedu      144: .Dl $ signify -S -s key.sec -m message.txt -x msg.sig
1.4       jmc       145: .Pp
1.1       tedu      146: Verify a signature, using the default signature name:
1.19      tedu      147: .Dl $ signify -V -p key.pub -m generalsorders.txt
1.11      deraadt   148: .Pp
1.17      deraadt   149: Verify a release directory containing
1.19      tedu      150: .Pa SHA256.sig
1.17      deraadt   151: and a full set of release files:
1.21      jmc       152: .Bd -literal -offset indent -compact
1.24    ! tedu      153: $ signify -C -p /etc/signify/openbsd-55-base.pub -x SHA256.sig
1.22      lteo      154: .Ed
                    155: .Pp
                    156: Verify a bsd.rd before an upgrade:
                    157: .Bd -literal -offset indent -compact
1.24    ! tedu      158: $ signify -C -p /etc/signify/openbsd-55-base.pub -x SHA256.sig bsd.rd
1.21      jmc       159: .Ed
1.1       tedu      160: .Sh SEE ALSO
1.11      deraadt   161: .Xr fw_update 1 ,
                    162: .Xr pkg_add 1 ,
                    163: .Xr sha256 1
1.1       tedu      164: .Sh HISTORY
                    165: The
                    166: .Nm
                    167: command first appeared in
1.7       espie     168: .Ox 5.5 .