proof

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SigsumProofVersion = 1
	ShortChecksumSize  = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ShortChecksum

type ShortChecksum [ShortChecksumSize]byte

type ShortLeaf

type ShortLeaf struct {
	ShortChecksum ShortChecksum
	Signature     crypto.Signature
	KeyHash       crypto.Hash
}

Variant of types.Leaf, with truncated checksum.

func NewShortLeaf

func NewShortLeaf(leaf *types.Leaf) ShortLeaf

func (*ShortLeaf) Parse

func (l *ShortLeaf) Parse(p ascii.Parser) error

func (*ShortLeaf) ToASCII

func (l *ShortLeaf) ToASCII(w io.Writer) error

func (*ShortLeaf) ToLeaf

func (l *ShortLeaf) ToLeaf(checksum *crypto.Hash) (types.Leaf, error)

type SigsumProof

type SigsumProof struct {
	LogKeyHash crypto.Hash
	Leaf       ShortLeaf
	TreeHead   types.CosignedTreeHead
	Inclusion  types.InclusionProof
}

func (*SigsumProof) FromASCII

func (sp *SigsumProof) FromASCII(r io.Reader) error

func (*SigsumProof) ToASCII

func (sp *SigsumProof) ToASCII(w io.Writer) error

func (*SigsumProof) Verify

func (sp *SigsumProof) Verify(msg *crypto.Hash, submitKey *crypto.PublicKey, policy *policy.Policy) error

func (*SigsumProof) VerifyNoCosignatures

func (sp *SigsumProof) VerifyNoCosignatures(msg *crypto.Hash, submitKey *crypto.PublicKey, logKey *crypto.PublicKey) error

Jump to

Keyboard shortcuts

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