Documentation ¶
Index ¶
- Variables
- type AuthCredential
- type AuthCredentialPresentation
- type AuthCredentialResponse
- type ClientZkAuthOperations
- func (c ClientZkAuthOperations) CreateAuthCredentialPresentation(groupSecretParams GroupSecretParams, authCredential AuthCredential) (AuthCredentialPresentation, error)
- func (c ClientZkAuthOperations) CreateAuthCredentialPresentationDeterministic(random []byte, groupSecretParams GroupSecretParams, ...) (AuthCredentialPresentation, error)
- func (c ClientZkAuthOperations) ReceiveAuthCredential(uuid UUID, redemptionTime uint32, ...) (AuthCredential, error)
- type ClientZkGroupCipher
- func (c ClientZkGroupCipher) DecryptBlob(ciphertext []byte) ([]byte, error)
- func (c ClientZkGroupCipher) DecryptProfileKey(profileKeyCiphertext []byte, uuid []byte) (UUID, error)
- func (c ClientZkGroupCipher) DecryptUUID(ciphertext []byte) (UUID, error)
- func (c ClientZkGroupCipher) EncryptBlob(plaintext []byte) ([]byte, error)
- func (c ClientZkGroupCipher) EncryptBlobDeterministic(random []byte, plaintext []byte) ([]byte, error)
- func (c ClientZkGroupCipher) EncryptUUID(uuid UUID) ([]byte, error)
- type Error
- type GroupIdentifier
- type GroupPublicParams
- type GroupSecretParams
- type NotarySignature
- type ProfileKeyCommitment
- type ProfileKeyCredential
- type ProfileKeyCredentialPresentation
- type ProfileKeyCredentialRequest
- type ProfileKeyCredentialRequestContext
- type ProfileKeyCredentialResponse
- type ProfileKeyVersion
- type ServerPublicParams
- func (s ServerPublicParams) CreateProfileKeyCredentialPresentation(groupSecretParams, profileKeyCredential []byte) ([]byte, error)
- func (p ServerPublicParams) ReceiveProfileKeyCredential(profileKeyCredentialRequestContext, profileKeyCredentialResponse []byte) (ProfileKeyCredential, error)
- func (p ServerPublicParams) VerifySignature(message []byte, notarySignarture NotarySignature) error
- type ServerSecretParams
- type ServerZkAuthOperations
- func (c ServerZkAuthOperations) IssueAuthCredential(uuid UUID, redemptionTime uint32) (AuthCredentialResponse, error)
- func (c ServerZkAuthOperations) IssueAuthCredentialDeterministic(random []byte, uuid UUID, redemptionTime uint32) (AuthCredentialResponse, error)
- func (c ServerZkAuthOperations) VerifyAuthCredentialPresentation(groupPublicParams GroupPublicParams, ...) error
- type ServerZkProfileOperations
- func (c ServerZkProfileOperations) IssueProfileKeyCredential(profileKeyCredentialRequest ProfileKeyCredentialRequest, uuid UUID, ...) (ProfileKeyCredentialResponse, error)
- func (c ServerZkProfileOperations) IssueProfileKeyCredentialDeterministic(random []byte, profileKeyCredentialRequest ProfileKeyCredentialRequest, ...) (ProfileKeyCredentialResponse, error)
- func (c ServerZkProfileOperations) VerifyProfileKeyCredentialPresentation(groupPublicParams GroupPublicParams, ...) error
- type UUID
Constants ¶
This section is empty.
Variables ¶
var ErrInternal = errors.New("internal error")
ErrInternal if internal error.
var ErrInvalidInput = errors.New("invalid input")
ErrInvalidInput if invalid input.
var ErrVerificationFailed = errors.New("verification failed")
ErrVerificationFailed if verification failed.
Functions ¶
This section is empty.
Types ¶
type AuthCredential ¶
type AuthCredential []byte
AuthCredential ...
func NewAuthCredential ¶
func NewAuthCredential(b []byte) (AuthCredential, error)
NewAuthCredential ...
type AuthCredentialPresentation ¶
type AuthCredentialPresentation []byte
AuthCredentialPresentation ...
func NewAuthCredentialPresentation ¶
func NewAuthCredentialPresentation(b []byte) (AuthCredentialPresentation, error)
NewAuthCredentialPresentation ...
func (AuthCredentialPresentation) ProfileKeyCiphertext ¶ added in v0.7.17
func (a AuthCredentialPresentation) ProfileKeyCiphertext() ([]byte, error)
ProfileKeyCiphertext ...
func (AuthCredentialPresentation) RedemptionTime ¶
func (a AuthCredentialPresentation) RedemptionTime() (uint32, error)
RedemptionTime ...
func (AuthCredentialPresentation) UUIDCiphertext ¶
func (a AuthCredentialPresentation) UUIDCiphertext() ([]byte, error)
UUIDCiphertext ...
type AuthCredentialResponse ¶
type AuthCredentialResponse []byte
AuthCredentialResponse ...
func NewAuthCredentialResponse ¶
func NewAuthCredentialResponse(b []byte) (AuthCredentialResponse, error)
NewAuthCredentialResponse ...
type ClientZkAuthOperations ¶
type ClientZkAuthOperations struct {
// contains filtered or unexported fields
}
ClientZkAuthOperations ...
func NewClientZkAuthOperations ¶
func NewClientZkAuthOperations(serverPublicParams ServerPublicParams) (*ClientZkAuthOperations, error)
NewClientZkAuthOperations ...
func (ClientZkAuthOperations) CreateAuthCredentialPresentation ¶
func (c ClientZkAuthOperations) CreateAuthCredentialPresentation(groupSecretParams GroupSecretParams, authCredential AuthCredential) (AuthCredentialPresentation, error)
CreateAuthCredentialPresentation ...
func (ClientZkAuthOperations) CreateAuthCredentialPresentationDeterministic ¶
func (c ClientZkAuthOperations) CreateAuthCredentialPresentationDeterministic(random []byte, groupSecretParams GroupSecretParams, authCredential AuthCredential) (AuthCredentialPresentation, error)
CreateAuthCredentialPresentationDeterministic ...
func (ClientZkAuthOperations) ReceiveAuthCredential ¶
func (c ClientZkAuthOperations) ReceiveAuthCredential(uuid UUID, redemptionTime uint32, authCredentialResponse AuthCredentialResponse) (AuthCredential, error)
ReceiveAuthCredential ...
type ClientZkGroupCipher ¶
type ClientZkGroupCipher struct {
// contains filtered or unexported fields
}
ClientZkGroupCipher ...
func NewClientZkGroupCipher ¶
func NewClientZkGroupCipher(groupSecretParams GroupSecretParams) *ClientZkGroupCipher
NewClientZkGroupCipher ...
func (ClientZkGroupCipher) DecryptBlob ¶
func (c ClientZkGroupCipher) DecryptBlob(ciphertext []byte) ([]byte, error)
DecryptBlob ...
func (ClientZkGroupCipher) DecryptProfileKey ¶ added in v0.7.17
func (c ClientZkGroupCipher) DecryptProfileKey(profileKeyCiphertext []byte, uuid []byte) (UUID, error)
DecryptProfileKey ...
func (ClientZkGroupCipher) DecryptUUID ¶
func (c ClientZkGroupCipher) DecryptUUID(ciphertext []byte) (UUID, error)
DecryptUUID ...
func (ClientZkGroupCipher) EncryptBlob ¶
func (c ClientZkGroupCipher) EncryptBlob(plaintext []byte) ([]byte, error)
EncryptBlob ...
func (ClientZkGroupCipher) EncryptBlobDeterministic ¶
func (c ClientZkGroupCipher) EncryptBlobDeterministic(random []byte, plaintext []byte) ([]byte, error)
EncryptBlobDeterministic ...
func (ClientZkGroupCipher) EncryptUUID ¶
func (c ClientZkGroupCipher) EncryptUUID(uuid UUID) ([]byte, error)
EncryptUUID ...
type GroupPublicParams ¶
type GroupPublicParams []byte
GroupPublicParams ...
func (GroupPublicParams) GroupIdentifier ¶
func (g GroupPublicParams) GroupIdentifier() (GroupIdentifier, error)
GroupIdentifier ...
type GroupSecretParams ¶
type GroupSecretParams []byte
GroupSecretParams ...
func GenerateGroupSecretParams ¶
func GenerateGroupSecretParams() (GroupSecretParams, error)
GenerateGroupSecretParams ...
func GenerateGroupSecretParamsDeterministic ¶
func GenerateGroupSecretParamsDeterministic(random []byte) (GroupSecretParams, error)
GenerateGroupSecretParamsDeterministic ...
func NewGroupSecretParams ¶
func NewGroupSecretParams(masterKey []byte) (GroupSecretParams, error)
NewGroupSecretParams ... DeriveFromMasterKey
func (GroupSecretParams) MasterKey ¶
func (g GroupSecretParams) MasterKey() ([]byte, error)
MasterKey ...
func (GroupSecretParams) PublicParams ¶
func (g GroupSecretParams) PublicParams() (GroupPublicParams, error)
PublicParams ...
type ProfileKeyCommitment ¶ added in v0.9.0
type ProfileKeyCommitment []byte
func ProfileKeyGetCommitment ¶
func ProfileKeyGetCommitment(profileKey []byte, uuid []byte) (ProfileKeyCommitment, error)
type ProfileKeyCredential ¶ added in v0.9.0
type ProfileKeyCredential []byte
type ProfileKeyCredentialPresentation ¶ added in v0.9.0
type ProfileKeyCredentialPresentation []byte
ProfileKeyCredentialPresentation ...
func NewProfileKeyCredentialPresentation ¶ added in v0.9.0
func NewProfileKeyCredentialPresentation(b []byte) (ProfileKeyCredentialPresentation, error)
func (ProfileKeyCredentialPresentation) ProfileKeyCiphertext ¶ added in v0.9.0
func (a ProfileKeyCredentialPresentation) ProfileKeyCiphertext() ([]byte, error)
ProfileKeyCiphertext ...
func (ProfileKeyCredentialPresentation) UUIDCiphertext ¶ added in v0.9.0
func (a ProfileKeyCredentialPresentation) UUIDCiphertext() ([]byte, error)
UUIDCiphertext ...
type ProfileKeyCredentialRequest ¶ added in v0.9.0
type ProfileKeyCredentialRequest []byte
type ProfileKeyCredentialRequestContext ¶ added in v0.9.0
type ProfileKeyCredentialRequestContext []byte
func CreateProfileKeyCredentialRequestContext ¶ added in v0.9.0
func CreateProfileKeyCredentialRequestContext(serverPublicParams, uuid, profileKey []byte) (ProfileKeyCredentialRequestContext, error)
func (*ProfileKeyCredentialRequestContext) ProfileKeyCredentialRequestContextGetRequest ¶ added in v0.9.0
func (p *ProfileKeyCredentialRequestContext) ProfileKeyCredentialRequestContextGetRequest() (ProfileKeyCredentialRequest, error)
type ProfileKeyCredentialResponse ¶ added in v0.9.0
type ProfileKeyCredentialResponse []byte
ProfileKeyCredentialResponse ...
func NewProfileKeyCredentialResponse ¶ added in v0.9.0
func NewProfileKeyCredentialResponse(b []byte) (ProfileKeyCredentialResponse, error)
NewProfileKeyCredentialResponse ...
type ProfileKeyVersion ¶ added in v0.9.0
type ProfileKeyVersion []byte
func ProfileKeyGetProfileKeyVersion ¶
func ProfileKeyGetProfileKeyVersion(profileKey []byte, uuid []byte) (ProfileKeyVersion, error)
ProfileKeyGetProfileKeyVersion returns the profile key version
type ServerPublicParams ¶
type ServerPublicParams []byte
ServerPublicParams ...
func NewServerPublicParams ¶
func NewServerPublicParams(b []byte) (ServerPublicParams, error)
NewServerPublicParams ...
func (ServerPublicParams) CreateProfileKeyCredentialPresentation ¶ added in v0.9.0
func (s ServerPublicParams) CreateProfileKeyCredentialPresentation(groupSecretParams, profileKeyCredential []byte) ([]byte, error)
func (ServerPublicParams) ReceiveProfileKeyCredential ¶ added in v0.9.0
func (p ServerPublicParams) ReceiveProfileKeyCredential(profileKeyCredentialRequestContext, profileKeyCredentialResponse []byte) (ProfileKeyCredential, error)
func (ServerPublicParams) VerifySignature ¶
func (p ServerPublicParams) VerifySignature(message []byte, notarySignarture NotarySignature) error
VerifySignature ...
type ServerSecretParams ¶
type ServerSecretParams []byte
ServerSecretParams ...
func GenerateServerSecretParams ¶
func GenerateServerSecretParams() (ServerSecretParams, error)
GenerateServerSecretParams ...
func GenerateServerSecretParamsDeterministic ¶
func GenerateServerSecretParamsDeterministic(random []byte) (ServerSecretParams, error)
GenerateServerSecretParamsDeterministic ...
func (ServerSecretParams) PublicParams ¶
func (g ServerSecretParams) PublicParams() (ServerPublicParams, error)
PublicParams ...
func (ServerSecretParams) Sign ¶
func (g ServerSecretParams) Sign(message []byte) (NotarySignature, error)
Sign ...
func (ServerSecretParams) SignDeterministic ¶
func (g ServerSecretParams) SignDeterministic(rand []byte, message []byte) (NotarySignature, error)
SignDeterministic ...
type ServerZkAuthOperations ¶
type ServerZkAuthOperations struct {
// contains filtered or unexported fields
}
ServerZkAuthOperations ...
func NewServerZkAuthOperations ¶
func NewServerZkAuthOperations(serverSecretParams ServerSecretParams) *ServerZkAuthOperations
NewServerZkAuthOperations ...
func (ServerZkAuthOperations) IssueAuthCredential ¶
func (c ServerZkAuthOperations) IssueAuthCredential(uuid UUID, redemptionTime uint32) (AuthCredentialResponse, error)
IssueAuthCredential ...
func (ServerZkAuthOperations) IssueAuthCredentialDeterministic ¶
func (c ServerZkAuthOperations) IssueAuthCredentialDeterministic(random []byte, uuid UUID, redemptionTime uint32) (AuthCredentialResponse, error)
IssueAuthCredentialDeterministic ...
func (ServerZkAuthOperations) VerifyAuthCredentialPresentation ¶
func (c ServerZkAuthOperations) VerifyAuthCredentialPresentation(groupPublicParams GroupPublicParams, authCredentialPresentation AuthCredentialPresentation) error
VerifyAuthCredentialPresentation ...
type ServerZkProfileOperations ¶ added in v0.9.0
type ServerZkProfileOperations struct {
// contains filtered or unexported fields
}
ServerZkProfileOperations ...
func NewServerZkProfileOperations ¶ added in v0.9.0
func NewServerZkProfileOperations(serverSecretParams ServerSecretParams) *ServerZkProfileOperations
NewServerZkProfileOperations ...
func (ServerZkProfileOperations) IssueProfileKeyCredential ¶ added in v0.9.0
func (c ServerZkProfileOperations) IssueProfileKeyCredential(profileKeyCredentialRequest ProfileKeyCredentialRequest, uuid UUID, profileKeyCommitment ProfileKeyCommitment) (ProfileKeyCredentialResponse, error)
IssueAuthCredential ...
func (ServerZkProfileOperations) IssueProfileKeyCredentialDeterministic ¶ added in v0.9.0
func (c ServerZkProfileOperations) IssueProfileKeyCredentialDeterministic(random []byte, profileKeyCredentialRequest ProfileKeyCredentialRequest, uuid UUID, profileKeyCommitment ProfileKeyCommitment, ) (ProfileKeyCredentialResponse, error)
IssueAuthCredentialDeterministic ...
func (ServerZkProfileOperations) VerifyProfileKeyCredentialPresentation ¶ added in v0.9.0
func (c ServerZkProfileOperations) VerifyProfileKeyCredentialPresentation(groupPublicParams GroupPublicParams, profileKeyCredentialPresentation ProfileKeyCredentialPresentation) error
VerifyProfileKeyCredentialPresentation ...