Documentation ¶
Index ¶
- Constants
- func GenerateKeyPair(group *schnorr.Group) (*SecKey, *PubKey)
- type CA
- type CACert
- type CAClient
- type CAServer
- type Client
- func (c *Client) GenerateMasterKey() *big.Int
- func (c *Client) GenerateNym(userSecret *big.Int, caCert *CACert, regKey string) (*Nym, error)
- func (c *Client) ObtainCredential(userSecret *big.Int, nym *Nym, orgPubKeys *PubKey) (*Cred, error)
- func (c *Client) TransferCredential(orgName string, userSecret *big.Int, nym *Nym, cred *Cred) (*string, error)
- type Cred
- type CredIssuer
- type CredVerifier
- type Nym
- type NymGenerator
- type OrgServer
- type PubKey
- type SecKey
Constants ¶
const CA_CURVE = ec.P256
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CAClient ¶
func NewCAClient ¶
func (*CAClient) GenerateCertificate ¶
GenerateCertificate provides a certificate from trusted CA to the user. Note that CA needs to know the user. The certificate is then used for registering pseudonym (nym). The certificate contains blinded user's master key pair and a signature of it.
type CAServer ¶
type CAServer struct {
// contains filtered or unexported fields
}
func NewCAServer ¶
func (*CAServer) GenerateCertificate ¶
func (s *CAServer) GenerateCertificate(stream pb.CA_GenerateCertificateServer) error
func (*CAServer) RegisterTo ¶
type Client ¶
func (*Client) GenerateMasterKey ¶
GenerateMasterKey generates a master secret key, representing a random integer betweeen 0 and order of the group. This key will be used subsequently by all the protocols in the scheme.
func (*Client) GenerateNym ¶
GenerateNym generates a nym and registers it to the organization. Do not use the same CACert for different organizations - use it only once!
func (*Client) ObtainCredential ¶
ObtainCredential returns anonymous credential.
func (*Client) TransferCredential ¶
func (c *Client) TransferCredential(orgName string, userSecret *big.Int, nym *Nym, cred *Cred) (*string, error)
FIXME get rid of orgname? TransferCredential transfers orgName's credential to organization where the authentication should happen (the organization takes credential issued by another organization).
type Cred ¶
type CredIssuer ¶
type CredIssuer struct {
// contains filtered or unexported fields
}
func NewCredIssuer ¶
func NewCredIssuer(group *schnorr.Group, secKey *SecKey) *CredIssuer
func (*CredIssuer) GetChallenge ¶
func (i *CredIssuer) GetChallenge(a, b, x *big.Int) *big.Int
func (*CredIssuer) GetProofData ¶
type CredVerifier ¶
type CredVerifier struct {
// contains filtered or unexported fields
}
func NewCredVerifier ¶
func NewCredVerifier(group *schnorr.Group, secKey *SecKey) *CredVerifier
func (*CredVerifier) GetChallenge ¶
func (v *CredVerifier) GetChallenge(a, b, a1, b1, x1, x2 *big.Int) *big.Int
type NymGenerator ¶
type NymGenerator struct {
// contains filtered or unexported fields
}
func NewNymGenerator ¶
func NewNymGenerator(group *schnorr.Group, caPubKey *PubKey) *NymGenerator
func (*NymGenerator) GetChallenge ¶
type OrgServer ¶
type OrgServer struct { *NymGenerator *CredIssuer *CredVerifier SessMgr anauth.SessManager RegMgr anauth.RegManager // contains filtered or unexported fields }
func NewOrgServer ¶
func (*OrgServer) GenerateNym ¶
func (s *OrgServer) GenerateNym(stream pb.Org_GenerateNymServer) error
func (*OrgServer) ObtainCred ¶
func (s *OrgServer) ObtainCred(stream pb.Org_ObtainCredServer) error
func (*OrgServer) RegisterTo ¶
func (*OrgServer) TransferCred ¶
func (s *OrgServer) TransferCred(stream pb.Org_TransferCredServer) error