cosigned

package
v0.20260707.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2026 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package cosigned implements CosignedMessage 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 Message

type Message struct {
	CosignerName string
	Timestamp    uint64
	LogOrigin    string
	Start        uint64
	End          uint64
	SubtreeHash  [sha256.Size]byte
}

Message represents a CosignedMessage from https://ietf-plants-wg.github.io/merkle-tree-certs/draft-ietf-plants-merkle-tree-certs.html#section-5.3.1.

func Unmarshal

func Unmarshal(input []byte) (*Message, error)

Unmarshal unmarshals the input bytes and returns a *Message.

func (*Message) Marshal

func (message *Message) Marshal() ([]byte, error)

Marshal encodes the Message as bytes.

It errors if cosigner_name or log_origin are too long or too short. It does not validate semantic constraints, like start < end.

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;
} CosignedMessage;

Jump to

Keyboard shortcuts

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