Documentation
¶
Overview ¶
Package proof implements the MTCProof and SubtreeSignature 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.4.1.44363.47.0, per https://ietf-plants-wg.github.io/merkle-tree-certs/draft-ietf-plants-merkle-tree-certs.html#name-certificate-format:
"For initial experimentation, early implementations of this design will use the OID 1.3.6.1.4.1.44363.47.0 instead of id-alg-mtcProof."
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 MTCProof ¶
type MTCProof struct {
Extensions []byte
Start, End uint64
InclusionProof []tlog.Hash
Signatures []*SubtreeSignature
}
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;
HashValue inclusion_proof<0..2^16-1>;
SubtreeSignature signatures<0..2^16-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.
type SubtreeSignature ¶
SubtreeSignature 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.1 of draft-ietf-tls-trust-anchor-ids */ opaque TrustAnchorID<1..2^8-1>;
opaque HashValue[HASH_SIZE];
struct {
TrustAnchorID cosigner_id;
opaque signature<0..2^16-1>;
} SubtreeSignature;
func (*SubtreeSignature) Marshal ¶
func (ms *SubtreeSignature) Marshal() ([]byte, error)
Marshal serializes the bytes of a SubtreeSignature.