Documentation
¶
Overview ¶
Package keyserver implements a transparent key server for End to End.
Index ¶
- Constants
- Variables
- type Fingerprint
- type Server
- func (s *Server) GetEntry(ctx context.Context, in *tpb.GetEntryRequest) (*tpb.GetEntryResponse, error)
- func (s *Server) ListEntryHistory(ctx context.Context, in *tpb.ListEntryHistoryRequest) (*tpb.ListEntryHistoryResponse, error)
- func (s *Server) UpdateEntry(ctx context.Context, in *tpb.UpdateEntryRequest) (*tpb.UpdateEntryResponse, error)
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") )
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 Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server holds internal state for the key server.
func New ¶
func New(logID int64, tlog trillian.TrillianLogClient, mapID int64, tmap trillian.TrillianMapClient, committer commitments.Committer, vrf vrf.PrivateKey, mutator mutator.Mutator, auth authentication.Authenticator, factory transaction.Factory, mutations mutator.Mutation) *Server
New creates a new instance of the key server.
func (*Server) GetEntry ¶
func (s *Server) GetEntry(ctx context.Context, in *tpb.GetEntryRequest) (*tpb.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) ListEntryHistory ¶
func (s *Server) ListEntryHistory(ctx context.Context, in *tpb.ListEntryHistoryRequest) (*tpb.ListEntryHistoryResponse, error)
ListEntryHistory returns a list of EntryProofs covering a period of time.
func (*Server) UpdateEntry ¶
func (s *Server) UpdateEntry(ctx context.Context, in *tpb.UpdateEntryRequest) (*tpb.UpdateEntryResponse, error)
UpdateEntry updates a user's profile. If the user does not exist, a new profile will be created.
Click to show internal directories.
Click to hide internal directories.