Documentation ¶
Overview ¶
Package verifier implements an AuCPace Password Verifier Record as per the AuCPace draft
Index ¶
- type PVRType
- type PasswordVerifierRecord
- func (pvr *PasswordVerifierRecord) Buildq() error
- func (pvr *PasswordVerifierRecord) Finish(w []byte)
- func (pvr *PasswordVerifierRecord) QFromNonExistentUser(prefix, username, databaseSeed []byte) error
- func (pvr *PasswordVerifierRecord) SaltDerivationQ() []byte
- func (pvr *PasswordVerifierRecord) Verifier() []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PVRType ¶
type PVRType string
PVRType indicates what kind of AuCPace password verifier record we are working with
const ( // DefaultPrefix would be a possible prefix for unknown pvr. todo : clear that situation DefaultPrefix = "(strong)-AuCPace-Database" // LPVD : Legacy password verifier database LPVD PVRType = "LPVD" // APVD : AuCPace password verifier database APVD PVRType = "APVD" // SAPVD : (strong) AuCPace password verifier database SAPVD PVRType = "sAPVD" )
type PasswordVerifierRecord ¶
type PasswordVerifierRecord struct { PvrType PVRType // will determine if q is salt or a salt derivation parameter Sigma phf.PasswordHashingFunction Username []byte // contains filtered or unexported fields }
PasswordVerifierRecord groups the data relative to a username in the database
func PvrInit ¶
func PvrInit(pvrType PVRType, s phf.PasswordHashingFunction, username []byte) *PasswordVerifierRecord
PvrInit initialises a new PasswordVerifierRecord without the verifier W and salt q
func (*PasswordVerifierRecord) Buildq ¶
func (pvr *PasswordVerifierRecord) Buildq() error
Buildq builds the parameter q with a random scalar
func (*PasswordVerifierRecord) Finish ¶
func (pvr *PasswordVerifierRecord) Finish(w []byte)
Finish inserts the given verifier into the PasswordVerifierRecord, and therefore finishes its setup
func (*PasswordVerifierRecord) QFromNonExistentUser ¶
func (pvr *PasswordVerifierRecord) QFromNonExistentUser(prefix, username, databaseSeed []byte) error
QFromNonExistentUser builds q following the draft for a failed database lookup TODO : how should the case be handled in which the database entry does not exist ? hash out q here or require it from database ?
func (*PasswordVerifierRecord) SaltDerivationQ ¶
func (pvr *PasswordVerifierRecord) SaltDerivationQ() []byte
SaltDerivationQ returns the parameter q
func (*PasswordVerifierRecord) Verifier ¶
func (pvr *PasswordVerifierRecord) Verifier() []byte
Verifier returns the verifier W