keyserver

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: 28 Imported by: 0

Documentation

Overview

Package keyserver implements a transparent key server for End to End.

Index

Constants

View Source
const (
	MaxClockDrift = 5 * time.Minute
	PGPAppID      = "pgp"
	MinNonceLen   = 16
)

Maximum period of time to allow between CreationTime and server time.

Variables

View Source
var (
	// ErrNoAppID occurs when the app id is missing.
	ErrNoAppID = errors.New("missing AppID")
	// ErrNoCommitted occurs when the committed field is missing.
	ErrNoCommitted = errors.New("missing commitment")
	// ErrCommittedKeyLen occurs when the committed key is too small.
	ErrCommittedKeyLen = errors.New("committed.key is too small")
	// ErrWrongIndex occurs when the index in key value does not match the
	// output of VRF.
	ErrWrongIndex = errors.New("index does not match VRF")
	// ErrInvalidStart occurs when the start epoch of ListEntryHistoryRequest
	// is not valid (not in [1, currentEpoch]).
	ErrInvalidStart = errors.New("invalid start epoch")
	// ErrInvalidPageSize occurs when the page size is < 0.
	ErrInvalidPageSize = errors.New("Invalid page size")
)
View Source
var (
	// ErrEntityCount occurs when more than one entity is found.
	ErrEntityCount = errors.New("pgp: one entity allowed")
	// ErrRevocationCount occurs when a revocation is found.
	ErrRevocationCount = errors.New("pgp: no revocations allowed")
	// ErrSigCount occurs when more than one signature packet is found.
	ErrSigCount = errors.New("pgp: only self signature allowed")
	// ErrSubkeyCount occurs when more than one subkey is found.
	ErrSubkeyCount = errors.New("pgp: one subkey allowed")
	// ErrUserID occurs when the userid does not match the expected userid.
	ErrUserID = errors.New("pgp: wrong userID")
	// ErrMissingSelfSig occurs when the self signature packet is missing.
	ErrMissingSelfSig = errors.New("pgp: missing valid self signature")
	// ErrMissingSubkey occurs when a subkey is missing.
	ErrMissingSubkey = errors.New("pgp: missing valid subkey")
	// ErrExpiredSig occurs when a signature packet is expired.
	ErrExpiredSig = errors.New("pgp: expired signature")
	// ErrAlgo occurs when unsupported algorithms are used in a signature packet.
	ErrAlgo = errors.New("pgp: unsupported algorithm")
)

Functions

This section is empty.

Types

type Fingerprint

type Fingerprint [20]byte

Fingerprint is the type used to identify keys.

type Server

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

Server holds internal state for the key server.

func New

New creates a new instance of the key server.

func (*Server) GetDomain

func (s *Server) GetDomain(ctx context.Context, in *pb.GetDomainRequest) (*pb.Domain, error)

GetDomain returns all info tied to the specified domain.

This API to get all necessary data needed to verify a particular key-server. Data contains for instance the tree-info, like for instance the log/map-id and the corresponding public-keys.

func (*Server) GetEntry

func (s *Server) GetEntry(ctx context.Context, in *pb.GetEntryRequest) (*pb.GetEntryResponse, error)

GetEntry returns a user's profile and proof that there is only one object for this user and that it is the same one being provided to everyone else. GetEntry also supports querying past values by setting the epoch field.

func (*Server) GetEpoch

func (s *Server) GetEpoch(ctx context.Context, in *pb.GetEpochRequest) (*pb.Epoch, error)

GetEpoch returns a list of mutations paged by epoch number.

func (*Server) GetEpochStream

GetEpochStream is a streaming API similar to GetMutations.

func (*Server) ListEntryHistory

ListEntryHistory returns a list of EntryProofs covering a period of time.

func (*Server) ListMutations

func (s *Server) ListMutations(ctx context.Context, in *pb.ListMutationsRequest) (*pb.ListMutationsResponse, error)

ListMutations returns the mutations that created an epoch.

func (*Server) ListMutationsStream

ListMutationsStream is a streaming list of mutations in a specific epoch.

func (*Server) UpdateEntry

func (s *Server) UpdateEntry(ctx context.Context, in *pb.UpdateEntryRequest) (*pb.UpdateEntryResponse, error)

UpdateEntry updates a user's profile. If the user does not exist, a new profile will be created.

Jump to

Keyboard shortcuts

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