Versions in this module Expand all Collapse all v1 v1.0.3 Feb 8, 2019 v1.0.2 Feb 1, 2019 Changes in this version + type VerifyPasswordResult struct + Res bool + Salt []byte + func VerifyPasswordExtended(serverKeypair []byte, reqBytes []byte) (response []byte, state *VerifyPasswordResult, err error) v1.0.1 Jan 17, 2019 v1.0.0 Jan 10, 2019 Changes in this version + func Decrypt(ciphertext, key []byte) ([]byte, error) + func Encrypt(data, key []byte) ([]byte, error) + func GenerateClientKey() []byte + func GenerateServerKeypair() ([]byte, error) + func GetEnrollment(serverKeypair []byte) ([]byte, error) + func GetPublicKey(serverKeypair []byte) ([]byte, error) + func Rotate(serverKeypair []byte) (token []byte, newServerKeypair []byte, err error) + func RotateClientKeys(serverPublic, clientPrivate, tokenBytes []byte) (newClientPrivate, newServerPublic []byte, err error) + func UpdateRecord(recBytes []byte, tokenBytes []byte) (updRec []byte, err error) + func VerifyPassword(serverKeypair []byte, reqBytes []byte) (response []byte, err error) + type Client struct + func NewClient(privateKey []byte, serverPublicKey []byte) (*Client, error) + func (c *Client) CheckResponseAndDecrypt(password []byte, recBytes []byte, respBytes []byte) (key []byte, err error) + func (c *Client) CreateVerifyPasswordRequest(password []byte, recBytes []byte) (req []byte, err error) + func (c *Client) EnrollAccount(password []byte, respBytes []byte) (rec []byte, key []byte, err error) + func (c *Client) Rotate(tokenBytes []byte) error + type EnrollmentRecord struct + Nc []byte + Ns []byte + T0 []byte + T1 []byte + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*EnrollmentRecord) Descriptor() ([]byte, []int) + func (*EnrollmentRecord) ProtoMessage() + func (m *EnrollmentRecord) GetNc() []byte + func (m *EnrollmentRecord) GetNs() []byte + func (m *EnrollmentRecord) GetT0() []byte + func (m *EnrollmentRecord) GetT1() []byte + func (m *EnrollmentRecord) Reset() + func (m *EnrollmentRecord) String() string + func (m *EnrollmentRecord) XXX_DiscardUnknown() + func (m *EnrollmentRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *EnrollmentRecord) XXX_Merge(src proto.Message) + func (m *EnrollmentRecord) XXX_Size() int + func (m *EnrollmentRecord) XXX_Unmarshal(b []byte) error + type EnrollmentResponse struct + C0 []byte + C1 []byte + Ns []byte + Proof *ProofOfSuccess + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*EnrollmentResponse) Descriptor() ([]byte, []int) + func (*EnrollmentResponse) ProtoMessage() + func (m *EnrollmentResponse) GetC0() []byte + func (m *EnrollmentResponse) GetC1() []byte + func (m *EnrollmentResponse) GetNs() []byte + func (m *EnrollmentResponse) GetProof() *ProofOfSuccess + func (m *EnrollmentResponse) Reset() + func (m *EnrollmentResponse) String() string + func (m *EnrollmentResponse) XXX_DiscardUnknown() + func (m *EnrollmentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *EnrollmentResponse) XXX_Merge(src proto.Message) + func (m *EnrollmentResponse) XXX_Size() int + func (m *EnrollmentResponse) XXX_Unmarshal(b []byte) error + type Keypair struct + PrivateKey []byte + PublicKey []byte + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*Keypair) Descriptor() ([]byte, []int) + func (*Keypair) ProtoMessage() + func (m *Keypair) GetPrivateKey() []byte + func (m *Keypair) GetPublicKey() []byte + func (m *Keypair) Reset() + func (m *Keypair) String() string + func (m *Keypair) XXX_DiscardUnknown() + func (m *Keypair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Keypair) XXX_Merge(src proto.Message) + func (m *Keypair) XXX_Size() int + func (m *Keypair) XXX_Unmarshal(b []byte) error + type Point struct + X *big.Int + Y *big.Int + func PointUnmarshal(data []byte) (*Point, error) + func (p *Point) Add(a *Point) *Point + func (p *Point) Equal(other *Point) bool + func (p *Point) Marshal() []byte + func (p *Point) Neg() *Point + func (p *Point) ScalarBaseMult(b []byte) *Point + func (p *Point) ScalarBaseMultInt(b *big.Int) *Point + func (p *Point) ScalarMult(b []byte) *Point + func (p *Point) ScalarMultInt(b *big.Int) *Point + type ProofOfFail struct + BlindA []byte + BlindB []byte + Term1 []byte + Term2 []byte + Term3 []byte + Term4 []byte + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*ProofOfFail) Descriptor() ([]byte, []int) + func (*ProofOfFail) ProtoMessage() + func (m *ProofOfFail) GetBlindA() []byte + func (m *ProofOfFail) GetBlindB() []byte + func (m *ProofOfFail) GetTerm1() []byte + func (m *ProofOfFail) GetTerm2() []byte + func (m *ProofOfFail) GetTerm3() []byte + func (m *ProofOfFail) GetTerm4() []byte + func (m *ProofOfFail) Reset() + func (m *ProofOfFail) String() string + func (m *ProofOfFail) XXX_DiscardUnknown() + func (m *ProofOfFail) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *ProofOfFail) XXX_Merge(src proto.Message) + func (m *ProofOfFail) XXX_Size() int + func (m *ProofOfFail) XXX_Unmarshal(b []byte) error + type ProofOfSuccess struct + BlindX []byte + Term1 []byte + Term2 []byte + Term3 []byte + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*ProofOfSuccess) Descriptor() ([]byte, []int) + func (*ProofOfSuccess) ProtoMessage() + func (m *ProofOfSuccess) GetBlindX() []byte + func (m *ProofOfSuccess) GetTerm1() []byte + func (m *ProofOfSuccess) GetTerm2() []byte + func (m *ProofOfSuccess) GetTerm3() []byte + func (m *ProofOfSuccess) Reset() + func (m *ProofOfSuccess) String() string + func (m *ProofOfSuccess) XXX_DiscardUnknown() + func (m *ProofOfSuccess) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *ProofOfSuccess) XXX_Merge(src proto.Message) + func (m *ProofOfSuccess) XXX_Size() int + func (m *ProofOfSuccess) XXX_Unmarshal(b []byte) error + type UpdateToken struct + A []byte + B []byte + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*UpdateToken) Descriptor() ([]byte, []int) + func (*UpdateToken) ProtoMessage() + func (m *UpdateToken) GetA() []byte + func (m *UpdateToken) GetB() []byte + func (m *UpdateToken) Reset() + func (m *UpdateToken) String() string + func (m *UpdateToken) XXX_DiscardUnknown() + func (m *UpdateToken) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *UpdateToken) XXX_Merge(src proto.Message) + func (m *UpdateToken) XXX_Size() int + func (m *UpdateToken) XXX_Unmarshal(b []byte) error + type VerifyPasswordRequest struct + C0 []byte + Ns []byte + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*VerifyPasswordRequest) Descriptor() ([]byte, []int) + func (*VerifyPasswordRequest) ProtoMessage() + func (m *VerifyPasswordRequest) GetC0() []byte + func (m *VerifyPasswordRequest) GetNs() []byte + func (m *VerifyPasswordRequest) Reset() + func (m *VerifyPasswordRequest) String() string + func (m *VerifyPasswordRequest) XXX_DiscardUnknown() + func (m *VerifyPasswordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *VerifyPasswordRequest) XXX_Merge(src proto.Message) + func (m *VerifyPasswordRequest) XXX_Size() int + func (m *VerifyPasswordRequest) XXX_Unmarshal(b []byte) error + type VerifyPasswordResponse struct + C1 []byte + Proof isVerifyPasswordResponse_Proof + Res bool + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*VerifyPasswordResponse) Descriptor() ([]byte, []int) + func (*VerifyPasswordResponse) ProtoMessage() + func (*VerifyPasswordResponse) XXX_OneofWrappers() []interface{} + func (m *VerifyPasswordResponse) GetC1() []byte + func (m *VerifyPasswordResponse) GetFail() *ProofOfFail + func (m *VerifyPasswordResponse) GetProof() isVerifyPasswordResponse_Proof + func (m *VerifyPasswordResponse) GetRes() bool + func (m *VerifyPasswordResponse) GetSuccess() *ProofOfSuccess + func (m *VerifyPasswordResponse) Reset() + func (m *VerifyPasswordResponse) String() string + func (m *VerifyPasswordResponse) XXX_DiscardUnknown() + func (m *VerifyPasswordResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *VerifyPasswordResponse) XXX_Merge(src proto.Message) + func (m *VerifyPasswordResponse) XXX_Size() int + func (m *VerifyPasswordResponse) XXX_Unmarshal(b []byte) error + type VerifyPasswordResponse_Fail struct + Fail *ProofOfFail + type VerifyPasswordResponse_Success struct + Success *ProofOfSuccess