Documentation ¶
Index ¶
Constants ¶
View Source
const ( HashSize = sha256.Size SignatureSize = ed25519.SignatureSize PublicKeySize = ed25519.PublicKeySize InteriorNodePrefix = byte(0x00) LeafNodePrefix = byte(0x01) )
View Source
const ( EndpointAddLeaf = Endpoint("add-leaf") EndpointAddCosignature = Endpoint("add-cosignature") EndpointGetTreeHeadLatest = Endpoint("get-tree-head-latest") EndpointGetTreeHeadToSign = Endpoint("get-tree-head-to-sign") EndpointGetTreeHeadCosigned = Endpoint("get-tree-head-cosigned") EndpointGetInclusionProof = Endpoint("get-inclusion-proof") EndpointGetConsistencyProof = Endpoint("get-consistency-proof") EndpointGetLeaves = Endpoint("get-leaves") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsistencyProof ¶
type ConsistencyProof struct { NewSize uint64 OldSize uint64 Path []Hash `ascii:"consistency_path"` }
func (*ConsistencyProof) FromASCII ¶
func (p *ConsistencyProof) FromASCII(r io.Reader, oldSize, newSize uint64) error
func (*ConsistencyProof) ToASCII ¶
func (p *ConsistencyProof) ToASCII(w io.Writer) error
func (*ConsistencyProof) Verify ¶
func (p *ConsistencyProof) Verify(newRoot, oldRoot *Hash) bool
type CosignedTreeHead ¶
type CosignedTreeHead struct { SignedTreeHead Cosignature []Signature `ascii:"cosignature"` KeyHash []Hash `ascii:"key_hash"` }
func (*CosignedTreeHead) FromASCII ¶
func (cth *CosignedTreeHead) FromASCII(r io.Reader) error
func (*CosignedTreeHead) ToASCII ¶
func (cth *CosignedTreeHead) ToASCII(w io.Writer) error
type Hash ¶
type InclusionProof ¶
type InclusionProof struct { TreeSize uint64 LeafIndex uint64 `ascii:"leaf_index"` Path []Hash `ascii:"inclusion_path"` }
func (*InclusionProof) FromASCII ¶
func (p *InclusionProof) FromASCII(r io.Reader, treeSize uint64) error
func (*InclusionProof) ToASCII ¶
func (p *InclusionProof) ToASCII(w io.Writer) error
func (*InclusionProof) Verify ¶
func (p *InclusionProof) Verify(treeSize uint64) bool
type Leaf ¶
type PublicKey ¶
type PublicKey [PublicKeySize]byte
type Signature ¶
type Signature [SignatureSize]byte
type SignedTreeHead ¶
func (*SignedTreeHead) FromASCII ¶
func (sth *SignedTreeHead) FromASCII(r io.Reader) error
func (*SignedTreeHead) ToASCII ¶
func (sth *SignedTreeHead) ToASCII(w io.Writer) error
func (*SignedTreeHead) Verify ¶
func (sth *SignedTreeHead) Verify(key *PublicKey, ctx *Hash) bool
type Statement ¶
Click to show internal directories.
Click to hide internal directories.