Documentation
¶
Overview ¶
Package proof implements the MTCProof and Cosignature types from https://ietf-plants-wg.github.io/merkle-tree-certs/draft-ietf-plants-merkle-tree-certs.html#name-certificate-format.
These are used to generate the signature field of MTCs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SigAlgEncoded ¶
func SigAlgEncoded() []byte
SigAlgEncoded returns a DER-encoded AlgorithmIdentifier suitable for use with MTCProof signatures. Currently it returns 1.3.6.1.5.5.7.6.67, per https://ietf-plants-wg.github.io/merkle-tree-certs/draft-ietf-plants-merkle-tree-certs.html#name-certificate-format.
AlgorithmIdentifier is encoded per https://www.rfc-editor.org/info/rfc5280/#section-4.1.1.2:
AlgorithmIdentifier ::= SEQUENCE {
algorithm OBJECT IDENTIFIER,
parameters ANY DEFINED BY algorithm OPTIONAL }
Types ¶
type Cosignature ¶ added in v0.20261105.0
Cosignature represents the struct of that name in https://ietf-plants-wg.github.io/merkle-tree-certs/draft-ietf-plants-merkle-tree-certs.html#name-certificate-format.
Standalone certificates carry two or more of these in addition to their inclusion proof. Landmark-relative certificates carry none.
/* From Section 4 of draft-ietf-tls-trust-anchor-ids */ opaque TrustAnchorID<1..2^8-1>;
struct {
TrustAnchorID cosigner_id;
opaque signature<0..2^16-1>;
} Cosignature;
func (*Cosignature) Marshal ¶ added in v0.20261105.0
func (ms *Cosignature) Marshal() ([]byte, error)
Marshal serializes the bytes of a Cosignature.
type MTCProof ¶
type MTCProof struct {
Extensions []byte
Start, End int64
InclusionProof []tlog.Hash
Signatures []*Cosignature
}
MTCProof represents the MTCProof structure from https://ietf-plants-wg.github.io/merkle-tree-certs/draft-ietf-plants-merkle-tree-certs.html#name-certificate-format
struct {
MTCLogEntryExtension extensions<0..2^16-1>;
uint48 start;
uint48 end;
opaque inclusion_proof<0..2^16-1>;
Cosignature signatures<0..2^24-1>;
} MTCProof;
func UnmarshalMTCProof ¶
UnmarshalMTCProof parses the MTCProof structure from https://ietf-plants-wg.github.io/merkle-tree-certs/draft-ietf-plants-merkle-tree-certs.html#certificate-format.
The returned structure will have slices that point to the input data.