kt

package
v0.0.0-...-9be813a Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2018 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package kt holds Key Transparency message generation and verification routines.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNilProof occurs when the provided GetEntryResponse contains a nil proof.
	ErrNilProof = errors.New("nil proof")

	// Vlog is the verbose logger. By default it outputs to /dev/null.
	Vlog = log.New(ioutil.Discard, "", 0)
)

Functions

This section is empty.

Types

type Verifier

type Verifier struct {
	// contains filtered or unexported fields
}

Verifier is a client helper library for verifying request and responses.

func New

func New(vrf vrf.PublicKey,
	hasher hashers.MapHasher,
	mapPubKey crypto.PublicKey,
	logVerifier client.LogVerifier) *Verifier

New creates a new instance of the client verifier.

func (*Verifier) NewMutation

func (v *Verifier) NewMutation(
	domainID, appID, userID string,
	profileData []byte, authorizedKeys []*keyspb.PublicKey,
	vrfProof, oldLeaf []byte) (
	*entry.Mutation, error)

NewMutation creates a Mutation given the userID, desired state, and previous entry.

func (*Verifier) VerifyGetEntryResponse

func (v *Verifier) VerifyGetEntryResponse(ctx context.Context, domainID, appID, userID string,
	trusted *trillian.SignedLogRoot, in *pb.GetEntryResponse) error

VerifyGetEntryResponse verifies GetEntryResponse:

  • Verify commitment.
  • Verify VRF.
  • Verify tree proof.
  • Verify signature.
  • Verify consistency proof from log.Root().
  • Verify inclusion proof.

Jump to

Keyboard shortcuts

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