minisign

package module
v0.0.0-...-5e172de Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2020 License: MIT Imports: 5 Imported by: 0

README

go-minisign

A Golang library to verify Minisign signatures.

Initial implementation of commandline.

$ go run ./cmd/minisign -V -m README.md -P RWR74LoSzk/Uxftn6cmYbe4Jq2uJMs/C9EYu1QGcYQG8YG3iA4vwdOjm
CHECK README.md
true <nil>

Documentation

Index

Constants

View Source
const CHKAlg = "B2"
View Source
const CommentMaxBytes = 1024
View Source
const CommentPrefix = "untrusted comment: "
View Source
const DefaultComment = "signature from minisign secret key"
View Source
const KDFAlg = "Sc"
View Source
const KeyNumBytes = 8
View Source
const PasswordMaxBytes = 1024
View Source
const SecretKeyDefaultComment = "minisign encrypted secret key"
View Source
const SigAlg = "Ed"
View Source
const SigAlgHashed = "ED"
View Source
const SigDefaultConfigDir = "~/.minisign"
View Source
const SigDefaultConfigDirEnvVar = "MINISIGN_CONFIG_DIR"
View Source
const SigDefaultPKFile = "minisign.pub"
View Source
const SigDefaultSKFile = "minisign.key"
View Source
const SigSuffix = ".minisig"
View Source
const TrustedCommentMaxBytes = 8192
View Source
const TrustedCommentPrefix = "trusted comment: "
View Source
const VersionString = "minisign 0.9"

Variables

This section is empty.

Functions

This section is empty.

Types

type PublicKey

type PublicKey struct {
	SignatureAlgorithm [2]byte
	KeyId              [8]byte
	PublicKey          [32]byte
}

func DecodePublicKey

func DecodePublicKey(in string) (PublicKey, error)

func NewPublicKey

func NewPublicKey(publicKeyStr string) (PublicKey, error)

func NewPublicKeyFromFile

func NewPublicKeyFromFile(file string) (PublicKey, error)

func (*PublicKey) Verify

func (publicKey *PublicKey) Verify(bin []byte, signature Signature) (bool, error)

func (*PublicKey) VerifyFromFile

func (publicKey *PublicKey) VerifyFromFile(file string, signature Signature) (bool, error)

type Signature

type Signature struct {
	UntrustedComment   string
	SignatureAlgorithm [2]byte
	KeyId              [8]byte
	Signature          [64]byte
	TrustedComment     string
	GlobalSignature    [64]byte
}

func DecodeSignature

func DecodeSignature(in string) (Signature, error)

func NewSignatureFromFile

func NewSignatureFromFile(file string) (Signature, error)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL