]> pd.if.org Git - zpackage/blob - doc/zpm-sign.8
7ee293690f3e714b725f530f4dff010a5f571df7
[zpackage] / doc / zpm-sign.8
1 .TH zpm-sign 8 2019-02-15 "ZPM 0.3"
2 .SH NAME
3 zpm-sign \- manage package signatures
4 .SH SYNOPSIS
5 .B zpm sign
6 [
7 .B -hrdsgev
8 ]
9 [
10 .BI -f " sigfile"
11 ]
12 [
13 .BI -o " outfile"
14 ]
15 [
16 .BI -S " sigstring"
17 ]
18 [
19 .BI -k " keystring"
20 ]
21 [
22 .BI -K " keyfile"
23 ]
24 [
25 .BI -p " passphrase"
26 ]
27 [
28 .BI -m " messagestring"
29 ]
30 .RI [ file ]
31 .SH DESCRIPTION
32 \fBzpm-sign\fR
33 manages signatures on zpm packages.  It can generate signing keys,
34 sign files, and verify signatures.  The ed25519 algorithms are
35 used exclusively, and all the signature code is taken from the
36 ref10 implementation.  Signatures themselves are hex encoded
37 representions of the signature metadata and the actual signature value.
38 .PP
39 Private keys are potentially encrypted with chacha20 before storing
40 them on disk.
41 .SH OPTIONS
42 .B -r
43 .TP
44 .B \-g
45 Generate a private key
46 .TP
47 .B \-e
48 Extract a public key from a private key.
49 .TP
50 .B \-s
51 Sign a file or message.  In addition to the message to be signed,
52 signature metadata is signed.
53 .TP
54 .B \-v
55 Verify a signature on a file or message.
56 .TP
57 .B \-h
58 hexencode values
59 .TP
60 .B \-d
61 Increase the debug level.  May be given more than once.
62 .TP
63 .B \-r
64 Output the raw signature, rather than a full zpm certificate.
65 This also just signs the data given, without any signature
66 metadata.
67 .TP
68 .BI \-p passphrase
69 Specify a passphrase to decrypt a private key.
70 .TP
71 .BI \-m message
72 Specify a message to be signed or verified.  If not set with the -m option, the
73 message is taken from file named with the first non-option argument.
74 .TP
75 .BI \-k path
76 Take the private key for message signing from the path given.  This
77 defaults to ~/.zpm/key.  If ~/.zpm/key is not found and the euid
78 is root, /var/lib/zpm/key is tried.
79 .TP
80 .BI \-K key
81 Take the private key from the command line argument.  This is not
82 particularly secure and is primarily intended for testing.
83 .TP
84 .BI \-S sigstring
85 Use sigstring as the signature to verify.
86 .TP
87 .BI \-m message
88 Specify a message to be signed or verified.  If not set with the -m option, the
89 message is taken from file named with the first non-option argument.
90 .SH EXAMPLES
91 .TP
92 .B zpm sign
93 lists all files in the local database
94 .SH EXIT STATUS
95 0 on success non zero on failure
96 .SH FILES
97 /var/lib/zpm/local.db
98 .SH ENVIRONMENT
99 ZPMDB
100 .SH AUTHOR
101 Nathan Wagner
102 .SH SEE ALSO
103 .BR zpm (8)