Documentation ¶
Overview ¶
Package envelope provides utility functions and structures allowing credential management.
Package envelope provides utility functions and structures allowing credential management.
Package envelope provides utility functions and structures allowing credential management.
Package envelope provides utility functions and structures allowing credential management.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildPRK ¶
func BuildPRK(p *internal.Parameters, unblinded []byte) []byte
BuildPRK derives the randomized password from the OPRF output.
func IsValidMode ¶
IsValidMode returns whether m is a valid envelope mode.
func RecoverEnvelope ¶
func RecoverEnvelope(p *internal.Parameters, mode Mode, randomizedPwd, serverPublicKey, idc, ids []byte, envelope *Envelope) (clientSecretKey *group.Scalar, clientPublicKey *group.Point, exportKey []byte, err error)
RecoverEnvelope assumes that the envelope's inner envelope has been previously checked to be of correct size.
Types ¶
type Core ¶
Core holds the Client state between the key derivation steps, and exposes envelope creation and key recovery functions.
func New ¶
func New(id oprf.Ciphersuite) *Core
New returns a pointer to an instantiated Core structure.
func (*Core) BuildEnvelope ¶
func (c *Core) BuildEnvelope(p *internal.Parameters, mode Mode, evaluation, serverPublicKey, clientSecretKey []byte, creds *Credentials) (env *Envelope, clientPublicKey, maskingKey, exportKey []byte, err error)
BuildEnvelope returns the client's Envelope, the masking key for the registration, and the additional export key.
func (*Core) OprfFinalize ¶
OprfFinalize terminates the OPRF by unblinding the evaluated data.
type Credentials ¶
type Credentials struct {
Idc, Ids []byte
EnvelopeNonce, MaskingNonce []byte // testing: integrated to support testing
}
Credentials is currently used for testing purposes.