Documentation
¶
Overview ¶
package merkle provides hashing operations that can be used to verify a Sigsum log's Merkle tree. The exact hash strategy is defined in RFC 6962.
Index ¶
- func HashEmptyTree() crypto.Hash
- func HashInteriorNode(left, right *crypto.Hash) crypto.Hash
- func HashLeafNode(leaf []byte) crypto.Hash
- func VerifyConsistency(oldSize, newSize uint64, oldRoot, newRoot *crypto.Hash, path []crypto.Hash) error
- func VerifyInclusion(leaf *crypto.Hash, index, size uint64, root *crypto.Hash, path []crypto.Hash) error
- type Prefix
- type Tree
- func (t *Tree) AddLeafHash(leafHash *crypto.Hash) bool
- func (t *Tree) GetLeafIndex(leafHash *crypto.Hash) (uint64, error)
- func (t *Tree) GetRootHash() crypto.Hash
- func (t *Tree) ProveConsistency(m, n uint64) ([]crypto.Hash, error)
- func (t *Tree) ProveInclusion(index, size uint64) ([]crypto.Hash, error)
- func (t *Tree) Size() uint64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Tree ¶ added in v0.1.8
type Tree struct {
// contains filtered or unexported fields
}
Represents a tree of leaf hashes. Not concurrency safe; needs external synchronization.
func (*Tree) AddLeafHash ¶ added in v0.1.8
Returns true if added, false for duplicates.
func (*Tree) GetLeafIndex ¶ added in v0.1.8
func (*Tree) ProveConsistency ¶ added in v0.1.8
func (*Tree) ProveInclusion ¶ added in v0.1.8
Click to show internal directories.
Click to hide internal directories.