Documentation
¶
Index ¶
- type Probe
- type ProofBundle
- type TesseraEngine
- func (e *TesseraEngine) GetProof(statement []byte, probe []byte) (proof []byte, err error)
- func (e *TesseraEngine) SetKey(logKey []byte, submitKey []byte) (err error)
- func (e *TesseraEngine) SetWitnessPolicy(wp []byte) (err error)
- func (e *TesseraEngine) VerifyProof(statement []byte, proof []byte, probe []byte) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Probe ¶
type Probe struct {
// Origin represents the log origin that is needed, during the probing,
// to identify the correct log where the leaf has been logged to.
Origin string `json:"origin"`
// LeafIdx represents the leaf index.
LeafIdx uint64 `json:"leafIdx"`
// TreeSize represents the tree size.
TreeSize uint64 `json:"treeSize"`
// Root represents the root hash.
Root []byte `json:"root"`
// LogPublicKey represents the log public key which is needed to
// verify that the proof has been signed by a trusted log key.
LogPublicKey string `json:"log_public_key"`
}
Probe represents the data required to request an inclusion proof for a given lead to a Tessera log. This structure is a simplified version of the Tessera inclusionProbe structure.
type ProofBundle ¶
type ProofBundle struct {
// Format represents the proof bundle format.
Format transparency.EngineCode `json:"format"`
// Statement represents the logged claims.
Statement json.RawMessage `json:"statement"`
// Probe represents the probing data required to request a fresh proof bundle to the public log.
Probe Probe `json:"probe,omitempty"`
// Proof represents the Tessera inclusion proof (underlying Tessera stores inclusion proofs as [][]byte).
Proof []string `json:"proof,omitempty"`
}
ProofBundle represents a Tessera proof bundle.
type TesseraEngine ¶
type TesseraEngine struct {
// contains filtered or unexported fields
}
TesseraEngine represents the Tessera transparency engine and its configuration parameters.
func (*TesseraEngine) GetProof ¶
func (e *TesseraEngine) GetProof(statement []byte, probe []byte) (proof []byte, err error)
GetProof implements transparency.GetProof() for the Tessera engine.
func (*TesseraEngine) SetKey ¶
func (e *TesseraEngine) SetKey(logKey []byte, submitKey []byte) (err error)
SetKey implements transparency.SetKey() for the Tessera engine. Tessera supports Ed25519 public keys in sumdb note format: https://pkg.go.dev/golang.org/x/mod/sumdb/note
func (*TesseraEngine) SetWitnessPolicy ¶
func (e *TesseraEngine) SetWitnessPolicy(wp []byte) (err error)
SetWitnessPolicy implements transparency.SetWitnessPolicy for the Tessera engine.
func (*TesseraEngine) VerifyProof ¶
func (e *TesseraEngine) VerifyProof(statement []byte, proof []byte, probe []byte) (err error)
VerifyProof implements transparency.VerifyProof() for the Tessera engine.