Documentation ¶
Index ¶
Constants ¶
View Source
const ( RFC5054_GROUP_1024 = 0 RFC5054_GROUP_2048 = 1 RFC5054_GROUP_3072 = 2 RFC5054_GROUP_4096 = 3 )
View Source
const EPHEMERAL_SECRET_BYTE_LENGTH = 32
View Source
const (
SALT_LENGTH_IN_BYTES = 4
)
Variables ¶
View Source
var GROUPS = []*CyclicGroup{ CyclicGroup_1024, CyclicGroup_2048, CyclicGroup_3072, CyclicGroup_4096, }
Functions ¶
func RandRandomFunc ¶
func ScryptKeyDerivation ¶
Types ¶
type CyclicGroup ¶
var CyclicGroup_1024 *CyclicGroup = &CyclicGroup{ Size: 1024, Generator: big.NewInt(2), Prime: big.NewInt(0).SetBytes(rfc5054_prime_1024), }
var CyclicGroup_2048 *CyclicGroup = &CyclicGroup{ Size: 2048, Generator: big.NewInt(2), Prime: new(big.Int).SetBytes(rfc5054_prime_2048), }
var CyclicGroup_3072 *CyclicGroup = &CyclicGroup{ Size: 3072, Generator: big.NewInt(5), Prime: new(big.Int).SetBytes(rfc5054_prime_3072), }
var CyclicGroup_4096 *CyclicGroup = &CyclicGroup{ Size: 4096, Generator: big.NewInt(5), Prime: new(big.Int).SetBytes(rfc5054_prime_4096), }
type KeyDerivationFunc ¶
type PasswordVerifier ¶
type RandomFunc ¶
type Srp ¶
type Srp struct { Random RandomFunc // contains filtered or unexported fields }
func NewSrpKDF ¶
func NewSrpKDF(cyclicGroup int, keyDerivationAlgorithm KeyDerivationFunc) (*Srp, error)
func (*Srp) CreateSaltedVerificationKey ¶
func (srp *Srp) CreateSaltedVerificationKey(username string, password []byte) (verifier *PasswordVerifier, err error)
type User ¶
func (*User) Authenticated ¶
func (*User) ProcessChallenge ¶
func (*User) StartAuthentication ¶
func (*User) VerifySession ¶
type Verifier ¶
func NewVerifier ¶
func NewVerifier(srp *Srp, passwordVerifier PasswordVerifier) *Verifier
func (*Verifier) StartAuthentication ¶
Click to show internal directories.
Click to hide internal directories.