Documentation
¶
Index ¶
- Constants
- func Marshal(item interface{}) ([]byte, error)
- func Unmarshal(serialized []byte, out interface{}) error
- type ChecksumV1
- type ConsistencyProofV1
- type CosignedTreeHeadV1
- type Ed25519V1
- type GetConsistencyProofV1
- type GetEntriesV1
- type GetProofByHashV1
- type InclusionProofV1
- type Namespace
- type NamespaceFormat
- type NamespacePool
- type NodeHash
- type SignatureV1
- type SignedChecksumV1
- type SignedTreeHeadV1
- type StFormat
- type StItem
- func NewConsistencyProofV1(id *Namespace, size1, size2 uint64, path []NodeHash) *StItem
- func NewCosignedTreeHeadV1(sth *SignedTreeHeadV1, cosig []SignatureV1) *StItem
- func NewInclusionProofV1(id *Namespace, size, index uint64, path []NodeHash) *StItem
- func NewSignedChecksumV1(data *ChecksumV1, sig *SignatureV1) *StItem
- func NewSignedTreeHeadV1(th *TreeHeadV1, sig *SignatureV1) *StItem
- type StItemList
- type TreeHeadV1
Constants ¶
const (
HashSizeV1 = 32
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ChecksumV1 ¶
type ConsistencyProofV1 ¶
type CosignedTreeHeadV1 ¶
type CosignedTreeHeadV1 struct {
SignedTreeHead SignedTreeHeadV1
Cosignatures []SignatureV1 `tls:"minlen:0,maxlen:4294967295"`
}
type Ed25519V1 ¶
type Ed25519V1 struct {
Namespace [32]byte
}
Ed25519V1 uses an Ed25519 verification key as namespace. Encoding, signing, and verification operations are defined by RFC 8032.
type GetConsistencyProofV1 ¶
GetConsistencyProofV1 is a serializable get-consistency-proof request
type GetEntriesV1 ¶
GetEntriesV1 is a serializable get-entries request
type GetProofByHashV1 ¶
type GetProofByHashV1 struct {
Hash [HashSizeV1]byte
TreeSize uint64
}
GetProofByHashV1 is a serializable get-proof-by-hash request
type InclusionProofV1 ¶
type Namespace ¶
type Namespace struct {
Format NamespaceFormat `tls:"maxval:65535"`
Ed25519V1 *Ed25519V1 `tls:"selector:Format,val:1"`
}
Namespace references a versioned namespace based on a given format specifier
func NewNamespaceEd25519V1 ¶
NewNamespaceEd25519V1 returns an new Ed25519V1 namespace based on a verification key.
func (*Namespace) Fingerprint ¶
func (n *Namespace) Fingerprint() (*[NamespaceFingerprintSize]byte, error)
Fingerprint returns a fixed-size namespace fingerprint that is unique.
type NamespaceFormat ¶
NamespaceFormat defines a particular namespace type that is versioend
const ( NamespaceFormatReserved NamespaceFormat = 0 NamespaceFormatEd25519V1 NamespaceFormat = 1 NamespaceFingerprintSize = 32 )
func (NamespaceFormat) String ¶
func (f NamespaceFormat) String() string
type NamespacePool ¶
type NamespacePool struct {
// contains filtered or unexported fields
}
NamespacePool is a pool of namespaces that contain complete verification keys
func NewNamespacePool ¶
func NewNamespacePool(namespaces []*Namespace) (*NamespacePool, error)
NewNameSpacePool creates a new namespace pool from a list of namespaces. An error is returned if there are duplicate namespaces or namespaces without a complete verification key. The latter is determined by namespaceWithKey().
func (*NamespacePool) Find ¶
func (np *NamespacePool) Find(namespace *Namespace) (*Namespace, bool)
Find checks if namespace is a member of the namespace pool.
func (*NamespacePool) List ¶
func (np *NamespacePool) List() []*Namespace
List returns a copied list of namespaces that is used by this pool.
type SignatureV1 ¶
type SignedChecksumV1 ¶
type SignedChecksumV1 struct {
Data ChecksumV1
Signature SignatureV1
}
type SignedTreeHeadV1 ¶
type SignedTreeHeadV1 struct {
TreeHead TreeHeadV1
Signature SignatureV1
}
type StItem ¶
type StItem struct {
Format StFormat `tls:"maxval:65535"`
SignedTreeHeadV1 *SignedTreeHeadV1 `tls:"selector:Format,val:1"`
CosignedTreeHeadV1 *CosignedTreeHeadV1 `tls:"selector:Format,val:2"`
ConsistencyProofV1 *ConsistencyProofV1 `tls:"selector:Format,val:3"`
InclusionProofV1 *InclusionProofV1 `tls:"selector:Format,val:4"`
SignedChecksumV1 *SignedChecksumV1 `tls:"selector:Format,val:5"`
}
StItem references a versioned item based on a given format specifier
func NewConsistencyProofV1 ¶
func NewCosignedTreeHeadV1 ¶
func NewCosignedTreeHeadV1(sth *SignedTreeHeadV1, cosig []SignatureV1) *StItem
func NewInclusionProofV1 ¶
func NewSignedChecksumV1 ¶
func NewSignedChecksumV1(data *ChecksumV1, sig *SignatureV1) *StItem
func NewSignedTreeHeadV1 ¶
func NewSignedTreeHeadV1(th *TreeHeadV1, sig *SignatureV1) *StItem
type StItemList ¶
type StItemList struct {
Items []StItem `tls:"minlen:0,maxlen:4294967295"`
}
type TreeHeadV1 ¶
type TreeHeadV1 struct {
Timestamp uint64
TreeSize uint64
RootHash NodeHash
Extension []byte `tls:"minlen:0,maxlen:65535"`
}
func NewTreeHeadV1 ¶
func NewTreeHeadV1(timestamp, size uint64, hash, extension []byte) *TreeHeadV1
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
new-namespace
command
Package main outputs the private and public parts of a new namespace
|
Package main outputs the private and public parts of a new namespace |