MCPcopy Index your code
hub / github.com/aead/minisign

github.com/aead/minisign @v0.3.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.3.0 ↗ · + Follow
76 symbols 279 edges 10 files 47 documented · 62%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Go Reference Github CI latest

minisign

minisign is a dead simple tool to sign files and verify signatures.

$ minisign -G                                                                                  
Please enter a password to protect the secret key.

Enter Password: 
Enter Password (one more time): 
Deriving a key from the password in order to encrypt the secret key... done

The secret key was saved as ~/.minisign/minisign.key - Keep it secret!
The public key was saved as minisign.pub - That one can be public.

Files signed using this key pair can be verified with the following command:

minisign -Vm <file> -P RWSYKA736yqh+JrZ7cRDdWgck/WKtwW9ATBFmk8pQ1lHeUKXtV6uJ7Fu
$ minisign -Sm message.txt
Enter password: 
Deriving a key from the password in order to decrypt the secret key... done
$ minisign -Vm message.txt
Signature and comment signature verified
Trusted comment: timestamp:1614718943   filename:message.txt

This is a Go implementation of the original C implementation by Frank Denis.

Usage

Usage:
    minisign -G [-p <pubKey>] [-s <secKey>] [-W]
    minisign -R [-s <secKey>] [-p <pubKey>]
    minisign -C [-s <secKey>] [-W]
    minisign -S [-x <signature>] [-s <secKey>] [-c <comment>] [-t <comment>] -m <file>...
    minisign -V [-H] [-x <signature>] [-p <pubKey> | -P <pubKey>] [-o] [-q | -Q ] -m <file>

Options:
    -G               Generate a new public/secret key pair.
    -R               Re-create a public key file from a secret key.
    -C               Change or remove the password of the secret key.
    -S               Sign files with a secret key.
    -V               Verify files with a public key.
    -m <file>        The file to sign or verify.
    -o               Combined with -V, output the file after verification.
    -H               Combined with -V, require a signature over a pre-hashed file.
    -p <pubKey>      Public key file (default: ./minisign.pub)
    -P <pubKey>      Public key as base64 string
    -s <secKey>      Secret key file (default: $HOME/.minisign/minisign.key)
    -W               Do not encrypt/decrypt the secret key with a password.
    -x <signature>   Signature file (default: <file>.minisig)
    -c <comment>     Add a one-line untrusted comment.
    -t <comment>     Add a one-line trusted comment.
    -q               Quiet mode. Suppress output.
    -Q               Pretty quiet mode. Combined with -V, only print the trusted comment.
    -f               Combined with -G or -R, overwrite any existing public/secret key pair.
    -v               Print version information.

Installation

With an up-to-date Go toolchain:

go install aead.dev/minisign/cmd/minisign@latest

On windows, linux and macOS, you can also use the pre-built binaries: | OS | ARCH | Latest Release | |:---------:|:-------:|:-----------------------------------------------------------------------------------------------------------------------| | Linux | amd64 | minisign-linux-amd64.tar.gz | | Linux | arm64 | minisign-linux-arm64.tar.gz | | MacOS | arm64 | minisign-darwin-arm64.tar.gz | | Windows | amd64 | minisign-windows-amd64.zip |

From source: 1. Clone the repository git clone https://aead.dev/minisign && cd minisign 2. Build the binary make build

Library

import "aead.dev/minisign" 

The following example generates a minisign public/private key pair, signs a message and verifies the message signature.

package main

import (
    "crypto/rand"
    "log"

    "aead.dev/minisign"
)

func main() {
    var message = []byte("Hello World!")

    publicKey, privateKey, err := minisign.GenerateKey(rand.Reader)
    if err != nil {
        log.Fatalln(err)
    }

    signature := minisign.Sign(privateKey, message)

    if !minisign.Verify(publicKey, message, signature) {
        log.Fatalln("signature verification failed")
    }
    log.Println(string(message))
}

For more examples visit the package documentation.

Core symbols most depended-on inside this repo

exitf
called by 46
cmd/minisign/minisign.go
ID
called by 14
public.go
readPassword
called by 9
cmd/minisign/minisign.go
DecryptKey
called by 8
private.go
exit
called by 7
cmd/minisign/minisign.go
Equal
called by 6
public.go
MarshalText
called by 6
public.go
ID
called by 5
private.go

Shape

Function 50
Method 21
Struct 4
TypeAlias 1

Languages

Go100%

Modules by API surface

cmd/minisign/minisign.go16 symbols
private.go14 symbols
minisign.go13 symbols
signature.go7 symbols
public.go7 symbols
example_test.go7 symbols
signature_test.go5 symbols
private_test.go3 symbols
public_test.go2 symbols
minisign_test.go2 symbols

For agents

$ claude mcp add minisign \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact