Documentation
¶
Overview ¶
Package cosigned implements CosignedSubtree from https://ietf-plants-wg.github.io/merkle-tree-certs/draft-ietf-plants-merkle-tree-certs.html#section-5.3.1.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Subtree ¶ added in v0.20261105.0
type Subtree struct {
CosignerName string
Timestamp uint64
LogOrigin string
Start int64
End int64
SubtreeHash [sha256.Size]byte
}
Subtree represents a CosignedSubtree from https://ietf-plants-wg.github.io/merkle-tree-certs/draft-ietf-plants-merkle-tree-certs.html#section-5.3.1.
func (*Subtree) Marshal ¶ added in v0.20261105.0
Marshal encodes the Subtree as bytes.
It errors if cosigner_name or log_origin are not valid names, if [start, end) is not a valid subtree, if end exceeds trees.MaxSize, or if a nonzero timestamp is paired with a nonzero start. Constraints that depend on the cosigner's view of the log are the caller's to check.
https://ietf-plants-wg.github.io/merkle-tree-certs/draft-ietf-plants-merkle-tree-certs.html#section-5.3.1 opaque HashValue[HASH_SIZE];
struct {
uint8 label[12] = "subtree/v1\n\0";
opaque cosigner_name<1..2^8-1>;
uint64 timestamp;
opaque log_origin<1..2^8-1>;
uint64 start;
uint64 end;
HashValue subtree_hash;
} CosignedSubtree;