33[ ![ latest] ( https://badgen.net/github/tag/aead/minisign )] ( https://github.com/aead/minisign/releases/latest )
44
55# minisign
6+
67minisign is a dead simple tool to sign files and verify signatures.
78
89```
@@ -37,13 +38,16 @@ This is a Go implementation of the [original C implementation](https://github.co
3738
3839```
3940Usage:
40- minisign -G [-p <pubKey>] [-s <secKey>]
41+ minisign -G [-p <pubKey>] [-s <secKey>] [-W]
42+ minisign -R [-s <secKey>] [-p <pubKey>]
43+ minisign -C [-s <secKey>] [-W]
4144 minisign -S [-x <signature>] [-s <secKey>] [-c <comment>] [-t <comment>] -m <file>...
4245 minisign -V [-H] [-x <signature>] [-p <pubKey> | -P <pubKey>] [-o] [-q | -Q ] -m <file>
43- minisign -R [-s <secKey>] [-p <pubKey>]
44-
46+
4547Options:
46- -G Generate a new public/secret key pair.
48+ -G Generate a new public/secret key pair.
49+ -R Re-create a public key file from a secret key.
50+ -C Change or remove the password of the secret key.
4751 -S Sign files with a secret key.
4852 -V Verify files with a public key.
4953 -m <file> The file to sign or verify.
@@ -52,33 +56,41 @@ Options:
5256 -p <pubKey> Public key file (default: ./minisign.pub)
5357 -P <pubKey> Public key as base64 string
5458 -s <secKey> Secret key file (default: $HOME/.minisign/minisign.key)
59+ -W Do not encrypt/decrypt the secret key with a password.
5560 -x <signature> Signature file (default: <file>.minisig)
5661 -c <comment> Add a one-line untrusted comment.
5762 -t <comment> Add a one-line trusted comment.
5863 -q Quiet mode. Suppress output.
5964 -Q Pretty quiet mode. Combined with -V, only print the trusted comment.
60- -R Re-create a public key file from a secret key.
6165 -f Combined with -G or -R, overwrite any existing public/secret key pair.
6266 -v Print version information.
6367```
6468
6569## Installation
6670
67- On windows, linux and macOS, you can use the pre-built binaries:
68- | OS | ARCH | Latest Release |
69- | :---------:| :-------:| :-----------------------------------------------------------------------------------------------------------------------|
70- | Linux | amd64 | [ minisign-linux-amd64.tar.gz] ( https://github.com/aead/minisign/releases/download/v0.1.2/minisign-linux-amd64.tar.gz ) |
71- | Linux | arm64 | [ minisign-linux-arm64.tar.gz] ( https://github.com/aead/minisign/releases/download/v0.1.2/minisign-linux-arm64.tar.gz ) |
72- | MacOS | arm64 | [ minisign-darwin-arm64.tar.gz] ( https://github.com/aead/minisign/releases/download/v0.1.2/minisign-darwin-arm64.tar.gz ) |
73- | MacOS | amd64 | [ minisign-darwin-amd64.tar.gz] ( https://github.com/aead/minisign/releases/download/v0.1.2/minisign-darwin-amd64.tar.gz ) |
74- | Windows | amd64 | [ minisign-windows-amd64.zip] ( https://github.com/aead/minisign/releases/download/v0.1.2/minisign-windows-amd64.zip ) |
75-
76- If your system has [ Go1.16+] ( https://golang.org/dl/ ) , you can build from source:
71+ With an up-to-date Go toolchain:
7772```
78- git clone https://aead.dev/minisign && cd minisign
79- go build -o . aead.dev/minisign/cmd/minisign
73+ go install aead.dev/minisign/cmd/minisign@latest
8074```
8175
76+ On windows, linux and macOS, you can also use the pre-built binaries:
77+ | OS | ARCH | Latest Release |
78+ | :---------:| :-------:| :-----------------------------------------------------------------------------------------------------------------------|
79+ | Linux | amd64 | [ minisign-linux-amd64.tar.gz] ( https://github.com/aead/minisign/releases/download/v0.3.0/minisign-linux-amd64.tar.gz ) |
80+ | Linux | arm64 | [ minisign-linux-arm64.tar.gz] ( https://github.com/aead/minisign/releases/download/v0.3.0/minisign-linux-arm64.tar.gz ) |
81+ | MacOS | arm64 | [ minisign-darwin-arm64.tar.gz] ( https://github.com/aead/minisign/releases/download/v0.3.0/minisign-darwin-arm64.tar.gz ) |
82+ | Windows | amd64 | [ minisign-windows-amd64.zip] ( https://github.com/aead/minisign/releases/download/v0.3.0/minisign-windows-amd64.zip ) |
83+
84+ From source:
85+ 1 . Clone the repository
86+ ```
87+ git clone https://aead.dev/minisign && cd minisign
88+ ```
89+ 2 . Build the binary
90+ ```
91+ make build
92+ ```
93+
8294## Library
8395
8496``` Go
@@ -100,14 +112,14 @@ import (
100112func main () {
101113 var message = []byte (" Hello World!" )
102114
103- public , private , err := minisign.GenerateKey (rand.Reader )
115+ publicKey , privateKey , err := minisign.GenerateKey (rand.Reader )
104116 if err != nil {
105117 log.Fatalln (err)
106118 }
107119
108- signature := minisign.Sign (private , message)
120+ signature := minisign.Sign (privateKey , message)
109121
110- if !minisign.Verify (public , message, signature) {
122+ if !minisign.Verify (publicKey , message, signature) {
111123 log.Fatalln (" signature verification failed" )
112124 }
113125 log.Println (string (message))
0 commit comments