Documentation ¶
Index ¶
- func GetConnection(connConfig *ConnectionConfig) (*grpc.ClientConn, error)
- func GetLogger() log.Logger
- func SetLogger(lgr log.Logger)
- type CLClient
- func (c *CLClient) GetAcceptableCreds() (map[string][]string, error)
- func (c *CLClient) GetCredentialStructure() (*cl.RawCred, error)
- func (c *CLClient) IssueCredential(credManager *cl.CredManager, regKey string) (*cl.Cred, error)
- func (c *CLClient) ProveCredential(credManager *cl.CredManager, cred *cl.Cred, revealedAttrs []string) (*string, error)
- func (c *CLClient) UpdateCredential(credManager *cl.CredManager, rawCred *cl.RawCred) (*cl.Cred, error)
- type ConnectionConfig
- type PseudonymsysCAClient
- type PseudonymsysCAClientEC
- type PseudonymsysClient
- func (c *PseudonymsysClient) GenerateMasterKey() *big.Int
- func (c *PseudonymsysClient) GenerateNym(userSecret *big.Int, caCertificate *pseudsys.CACert, regKey string) (*pseudsys.Nym, error)
- func (c *PseudonymsysClient) ObtainCredential(userSecret *big.Int, nym *pseudsys.Nym, orgPubKeys *pseudsys.PubKey) (*pseudsys.Cred, error)
- func (c *PseudonymsysClient) TransferCredential(orgName string, userSecret *big.Int, nym *pseudsys.Nym, ...) (*pb.SessionKey, error)
- type PseudonymsysClientEC
- func (c *PseudonymsysClientEC) GenerateMasterKey() *big.Int
- func (c *PseudonymsysClientEC) GenerateNym(userSecret *big.Int, caCertificate *ecpseudsys.CACert, regKey string) (*ecpseudsys.Nym, error)
- func (c *PseudonymsysClientEC) ObtainCredential(userSecret *big.Int, nym *ecpseudsys.Nym, orgPubKeys *ecpseudsys.PubKey) (*ecpseudsys.Cred, error)
- func (c *PseudonymsysClientEC) TransferCredential(orgName string, userSecret *big.Int, nym *ecpseudsys.Nym, ...) (*pb.SessionKey, error)
- type ServiceInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConnection ¶
func GetConnection(connConfig *ConnectionConfig) (*grpc.ClientConn, error)
GetConnection attempts to return a connection to a gRPC server based on the provided configuration of connection details. Note that several clients can be passed the same connection, as the gRPC framework is able to multiplex several RPCs on the same connection, thus reducing the overhead.
Types ¶
type CLClient ¶
type CLClient struct {
// contains filtered or unexported fields
}
func NewCLClient ¶
func NewCLClient(conn *grpc.ClientConn) (*CLClient, error)
func (*CLClient) GetAcceptableCreds ¶
func (*CLClient) GetCredentialStructure ¶
func (*CLClient) IssueCredential ¶
func (*CLClient) ProveCredential ¶
func (c *CLClient) ProveCredential(credManager *cl.CredManager, cred *cl.Cred, revealedAttrs []string) (*string, error)
ProveCredential proves the possession of a valid credential and reveals only the attributes the user desires to reveal.
func (*CLClient) UpdateCredential ¶
type ConnectionConfig ¶
type ConnectionConfig struct { Endpoint string // Server's Endpoint ServerNameOverride string // When ServerNameOverride != "", // server cert's CN will be compared with the provided ServerNameOverride instead of server's // hostname CACertificate []byte // CA certificate for validating the server TimeoutMillis int // timeout (in millis) for establishing initial connection with the server }
ConnectionConfig holds all the details required for establishing a connection to the server.
func NewConnectionConfig ¶
func NewConnectionConfig(endpoint, serverNameOverride string, certificate []byte, timeoutMillis int) *ConnectionConfig
type PseudonymsysCAClient ¶
type PseudonymsysCAClient struct {
// contains filtered or unexported fields
}
func NewPseudonymsysCAClient ¶
func NewPseudonymsysCAClient(conn *grpc.ClientConn, group *schnorr.Group) (*PseudonymsysCAClient, error)
func (*PseudonymsysCAClient) GenerateCertificate ¶
func (c *PseudonymsysCAClient) GenerateCertificate(userSecret *big.Int, nym *pseudsys.Nym) ( *pseudsys.CACert, error)
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.
func (*PseudonymsysCAClient) GenerateMasterNym ¶
func (c *PseudonymsysCAClient) GenerateMasterNym(secret *big.Int) *pseudsys.Nym
GenerateMasterNym generates a master pseudonym to be used with GenerateCertificate.
type PseudonymsysCAClientEC ¶
type PseudonymsysCAClientEC struct {
// contains filtered or unexported fields
}
func NewPseudonymsysCAClientEC ¶
func NewPseudonymsysCAClientEC(conn *grpc.ClientConn, curve ec.Curve) (*PseudonymsysCAClientEC, error)
func (*PseudonymsysCAClientEC) GenerateCertificate ¶
func (c *PseudonymsysCAClientEC) GenerateCertificate(userSecret *big.Int, nym *ecpseudsys.Nym) ( *ecpseudsys.CACert, error)
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.
func (*PseudonymsysCAClientEC) GenerateMasterNym ¶
func (c *PseudonymsysCAClientEC) GenerateMasterNym(secret *big.Int) *ecpseudsys.Nym
GenerateMasterNym generates a master pseudonym to be used with GenerateCertificate.
type PseudonymsysClient ¶
type PseudonymsysClient struct {
// contains filtered or unexported fields
}
func NewPseudonymsysClient ¶
func NewPseudonymsysClient(conn *grpc.ClientConn, group *schnorr.Group) (*PseudonymsysClient, error)
func (*PseudonymsysClient) GenerateMasterKey ¶
func (c *PseudonymsysClient) GenerateMasterKey() *big.Int
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 (*PseudonymsysClient) GenerateNym ¶
func (c *PseudonymsysClient) GenerateNym(userSecret *big.Int, caCertificate *pseudsys.CACert, regKey string) ( *pseudsys.Nym, error)
GenerateNym generates a nym and registers it to the organization. Do not use the same CACert for different organizations - use it only once!
func (*PseudonymsysClient) ObtainCredential ¶
func (c *PseudonymsysClient) ObtainCredential(userSecret *big.Int, nym *pseudsys.Nym, orgPubKeys *pseudsys.PubKey) ( *pseudsys.Cred, error)
ObtainCredential returns anonymous credential.
func (*PseudonymsysClient) TransferCredential ¶
func (c *PseudonymsysClient) TransferCredential(orgName string, userSecret *big.Int, nym *pseudsys.Nym, credential *pseudsys.Cred) (*pb.SessionKey, error)
TransferCredential transfers orgName's credential to organization where the authentication should happen (the organization takes credential issued by another organization).
type PseudonymsysClientEC ¶
type PseudonymsysClientEC struct {
// contains filtered or unexported fields
}
func NewPseudonymsysClientEC ¶
func NewPseudonymsysClientEC(conn *grpc.ClientConn, curve ec.Curve) (*PseudonymsysClientEC, error)
func (*PseudonymsysClientEC) GenerateMasterKey ¶
func (c *PseudonymsysClientEC) GenerateMasterKey() *big.Int
GenerateMasterKey generates a master secret key to be used subsequently by all the protocols in the scheme.
func (*PseudonymsysClientEC) GenerateNym ¶
func (c *PseudonymsysClientEC) GenerateNym(userSecret *big.Int, caCertificate *ecpseudsys.CACert, regKey string) ( *ecpseudsys.Nym, error)
GenerateNym generates a nym and registers it to the organization. Do not use the same CACert for different organizations - use it only once!
func (*PseudonymsysClientEC) ObtainCredential ¶
func (c *PseudonymsysClientEC) ObtainCredential(userSecret *big.Int, nym *ecpseudsys.Nym, orgPubKeys *ecpseudsys.PubKey) ( *ecpseudsys.Cred, error)
ObtainCredential returns anonymous credential.
func (*PseudonymsysClientEC) TransferCredential ¶
func (c *PseudonymsysClientEC) TransferCredential(orgName string, userSecret *big.Int, nym *ecpseudsys.Nym, credential *ecpseudsys.Cred) (*pb.SessionKey, error)
TransferCredential transfers orgName's credential to organization where the authentication should happen (the organization takes credential issued by another organization).
type ServiceInfo ¶
ServiceInfo holds the data related to the service supported by emmy. All fields are exported to ensure access to data from any package.
func GetServiceInfo ¶
func GetServiceInfo(conn *grpc.ClientConn) (*ServiceInfo, error)
func NewServiceInfo ¶
func NewServiceInfo(name, description, provider string) *ServiceInfo
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package compatibility implements wrapper types, constants and functions around github.com/xlab-si/emmy/client, making relevant functionality compatible with go language binding tools.
|
Package compatibility implements wrapper types, constants and functions around github.com/xlab-si/emmy/client, making relevant functionality compatible with go language binding tools. |