Documentation
¶
Index ¶
- Constants
- func LeavesToASCII(w io.Writer, leaves []Leaf) error
- func SignLeafChecksum(signer crypto.Signer, checksum *crypto.Hash) (crypto.Signature, error)
- func SignLeafMessage(signer crypto.Signer, msg []byte) (crypto.Signature, error)
- func VerifyLeafChecksum(key *crypto.PublicKey, checksum *crypto.Hash, sig *crypto.Signature) bool
- func VerifyLeafMessage(key *crypto.PublicKey, msg []byte, sig *crypto.Signature) bool
- type ConsistencyProof
- type Cosignature
- type CosignedTreeHead
- type Endpoint
- type InclusionProof
- type Leaf
- type SignedTreeHead
- type TreeHead
- func (th *TreeHead) Cosign(signer crypto.Signer, logKeyHash *crypto.Hash, timestamp uint64) (Cosignature, error)
- func (th *TreeHead) FromASCII(r io.Reader) error
- func (th *TreeHead) Parse(p *ascii.Parser) error
- func (th *TreeHead) Sign(signer crypto.Signer) (SignedTreeHead, error)
- func (th *TreeHead) ToASCII(w io.Writer) error
Constants ¶
View Source
const ( // Sigsum log api. EndpointAddLeaf = Endpoint("add-leaf") EndpointGetTreeHead = Endpoint("get-tree-head") EndpointGetInclusionProof = Endpoint("get-inclusion-proof/") EndpointGetConsistencyProof = Endpoint("get-consistency-proof/") EndpointGetLeaves = Endpoint("get-leaves/") // For primary/secondary replication. EndpointGetSecondaryTreeHead = Endpoint("get-secondary-tree-head") // Sigsum witness api. EndpointAddTreeHead = Endpoint("add-tree-head") EndpointGetTreeSize = Endpoint("get-tree-size/") )
View Source
const ( CosignatureNamespace = "cosignature/v1" CheckpointNamePrefix = "sigsum.org/v1/tree/" )
View Source
const (
TreeLeafNamespace = "sigsum.org/v1/tree-leaf"
)
Variables ¶
This section is empty.
Functions ¶
func SignLeafChecksum ¶ added in v0.1.3
func SignLeafMessage ¶ added in v0.1.3
func VerifyLeafChecksum ¶ added in v0.1.3
Types ¶
type ConsistencyProof ¶
func (*ConsistencyProof) FromASCII ¶
func (pr *ConsistencyProof) FromASCII(r io.Reader) error
func (*ConsistencyProof) Parse ¶ added in v0.2.0
func (pr *ConsistencyProof) Parse(p *ascii.Parser) error
func (*ConsistencyProof) ToASCII ¶
func (pr *ConsistencyProof) ToASCII(w io.Writer) error
func (*ConsistencyProof) Verify ¶
func (pr *ConsistencyProof) Verify(oldTree, newTree *TreeHead) error
type Cosignature ¶ added in v0.1.6
func ParseCosignatures ¶ added in v0.1.23
func ParseCosignatures(p *ascii.Parser) ([]Cosignature, error)
func (*Cosignature) FromASCII ¶ added in v0.1.13
func (cs *Cosignature) FromASCII(r io.Reader) error
func (*Cosignature) Parse ¶ added in v0.1.23
func (cs *Cosignature) Parse(p *ascii.Parser) error
func (*Cosignature) ToASCII ¶ added in v0.1.6
func (cs *Cosignature) ToASCII(w io.Writer) error
type CosignedTreeHead ¶
type CosignedTreeHead struct { SignedTreeHead Cosignatures []Cosignature }
func (*CosignedTreeHead) FromASCII ¶
func (cth *CosignedTreeHead) FromASCII(r io.Reader) error
func (*CosignedTreeHead) ToASCII ¶
func (cth *CosignedTreeHead) ToASCII(w io.Writer) error
type InclusionProof ¶
func (*InclusionProof) FromASCII ¶
func (pr *InclusionProof) FromASCII(r io.Reader) error
func (*InclusionProof) ToASCII ¶
func (pr *InclusionProof) ToASCII(w io.Writer) error
Note the size is not included on the wire.
type SignedTreeHead ¶
func (*SignedTreeHead) FromASCII ¶
func (sth *SignedTreeHead) FromASCII(r io.Reader) error
func (*SignedTreeHead) Parse ¶ added in v0.1.23
func (sth *SignedTreeHead) Parse(p *ascii.Parser) error
func (*SignedTreeHead) ToASCII ¶
func (sth *SignedTreeHead) ToASCII(w io.Writer) error
func (*SignedTreeHead) Verify ¶
func (sth *SignedTreeHead) Verify(key *crypto.PublicKey) bool
func (*SignedTreeHead) VerifyVersion0 ¶ added in v0.1.25
func (sth *SignedTreeHead) VerifyVersion0(key *crypto.PublicKey) bool
Click to show internal directories.
Click to hide internal directories.