Documentation ¶
Overview ¶
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
Index ¶
- Constants
- func BlindSign(messages []*bbs12381g2pub.SignatureMessage, msgCount int, commitment *ml.G1, ...) ([]byte, error)
- func UnblindSign(sigBytes []byte, S *ml.Zr, curve *ml.Curve) ([]byte, error)
- func VerifyBlinding(messageBitmap []bool, msgCommit *ml.G1, bmProof *POKOfBlindedMessages, ...) error
- type BlindedMessages
- func BlindMessages(messages [][]byte, PK *bbs12381g2pub.PublicKey, blindedMsgCount int, ...) (*BlindedMessages, error)
- func BlindMessagesZr(zrs []*ml.Zr, PK *bbs12381g2pub.PublicKey, blindedMsgCount int, nonce []byte, ...) (*BlindedMessages, error)
- func ParseBlindedMessages(bytes []byte, curve *ml.Curve) (*BlindedMessages, error)
- type Cred
- type CredRequest
- type Credential
- func (*Credential) Descriptor() ([]byte, []int)
- func (m *Credential) GetAttrs() [][]byte
- func (m *Credential) GetCred() []byte
- func (*Credential) ProtoMessage()
- func (m *Credential) Reset()
- func (m *Credential) String() string
- func (m *Credential) XXX_DiscardUnknown()
- func (m *Credential) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Credential) XXX_Merge(src proto.Message)
- func (m *Credential) XXX_Size() int
- func (m *Credential) XXX_Unmarshal(b []byte) error
- type CredentialRevocationInformation
- func (*CredentialRevocationInformation) Descriptor() ([]byte, []int)
- func (m *CredentialRevocationInformation) GetEpoch() int64
- func (m *CredentialRevocationInformation) GetEpochPk() []byte
- func (m *CredentialRevocationInformation) GetEpochPkSig() []byte
- func (m *CredentialRevocationInformation) GetRevocationAlg() int32
- func (m *CredentialRevocationInformation) GetRevocationData() []byte
- func (*CredentialRevocationInformation) ProtoMessage()
- func (m *CredentialRevocationInformation) Reset()
- func (m *CredentialRevocationInformation) String() string
- func (m *CredentialRevocationInformation) XXX_DiscardUnknown()
- func (m *CredentialRevocationInformation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CredentialRevocationInformation) XXX_Merge(src proto.Message)
- func (m *CredentialRevocationInformation) XXX_Size() int
- func (m *CredentialRevocationInformation) XXX_Unmarshal(b []byte) error
- type Issuer
- type IssuerPublicKey
- type IssuerSecretKey
- type NonRevocationProof
- func (*NonRevocationProof) Descriptor() ([]byte, []int)
- func (m *NonRevocationProof) GetNonRevocationProof() []byte
- func (m *NonRevocationProof) GetRevocationAlg() int32
- func (*NonRevocationProof) ProtoMessage()
- func (m *NonRevocationProof) Reset()
- func (m *NonRevocationProof) String() string
- func (m *NonRevocationProof) XXX_DiscardUnknown()
- func (m *NonRevocationProof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *NonRevocationProof) XXX_Merge(src proto.Message)
- func (m *NonRevocationProof) XXX_Size() int
- func (m *NonRevocationProof) XXX_Unmarshal(b []byte) error
- type NymSignature
- func (*NymSignature) Descriptor() ([]byte, []int)
- func (m *NymSignature) GetMainSignature() []byte
- func (m *NymSignature) GetNonce() []byte
- func (*NymSignature) ProtoMessage()
- func (m *NymSignature) Reset()
- func (m *NymSignature) String() string
- func (m *NymSignature) XXX_DiscardUnknown()
- func (m *NymSignature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *NymSignature) XXX_Merge(src proto.Message)
- func (m *NymSignature) XXX_Size() int
- func (m *NymSignature) XXX_Unmarshal(b []byte) error
- type NymSigner
- type POKOfBlindedMessages
- type RevocationAuthority
- func (r *RevocationAuthority) NewKey() (*ecdsa.PrivateKey, error)
- func (r *RevocationAuthority) NewKeyFromBytes(raw []byte) (*ecdsa.PrivateKey, error)
- func (r *RevocationAuthority) Sign(key *ecdsa.PrivateKey, _ [][]byte, epoch int, alg types.RevocationAlgorithm) ([]byte, error)
- func (r *RevocationAuthority) Verify(pk *ecdsa.PublicKey, criRaw []byte, epoch int, alg types.RevocationAlgorithm) error
- type Signature
- func (*Signature) Descriptor() ([]byte, []int)
- func (m *Signature) GetEpoch() int64
- func (m *Signature) GetMainSignature() []byte
- func (m *Signature) GetNonRevocationProof() *NonRevocationProof
- func (m *Signature) GetNonce() []byte
- func (m *Signature) GetNym() []byte
- func (m *Signature) GetNymEid() []byte
- func (m *Signature) GetNymEidIdx() int32
- func (m *Signature) GetNymEidProof() []byte
- func (m *Signature) GetNymProof() []byte
- func (m *Signature) GetNymRh() []byte
- func (m *Signature) GetNymRhIdx() int32
- func (m *Signature) GetNymRhProof() []byte
- func (m *Signature) GetRevocationEpochPk() []byte
- func (m *Signature) GetRevocationPkSig() []byte
- func (*Signature) ProtoMessage()
- func (m *Signature) Reset()
- func (m *Signature) String() string
- func (m *Signature) XXX_DiscardUnknown()
- func (m *Signature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Signature) XXX_Merge(src proto.Message)
- func (m *Signature) XXX_Size() int
- func (m *Signature) XXX_Unmarshal(b []byte) error
- type Signer
- func (s *Signer) AuditNymEid(key types.IssuerPublicKey, eidIndex int, signature []byte, enrollmentID string, ...) error
- func (s *Signer) AuditNymRh(key types.IssuerPublicKey, rhIndex int, signature []byte, ...) error
- func (s *Signer) Sign(credBytes []byte, sk *math.Zr, Nym *math.G1, RNym *math.Zr, ...) ([]byte, *types.IdemixSignerMetadata, error)
- func (s *Signer) Verify(key types.IssuerPublicKey, signature, msg []byte, ...) error
- type User
- func (u *User) MakeNym(sk *math.Zr, key types.IssuerPublicKey) (*math.G1, *math.Zr, error)
- func (u *User) NewKey() (*math.Zr, error)
- func (u *User) NewKeyFromBytes(raw []byte) (*math.Zr, error)
- func (u *User) NewNymFromBytes(raw []byte) (*math.G1, *math.Zr, error)
- func (u *User) NewPublicNymFromBytes(raw []byte) (*math.G1, error)
Constants ¶
const AttributeIndexInNym = 1
AttributeIndexInNym is the index of the blinding factor of the attribute in a Nym commitment
const IndexOffsetVC2Attributes = 2
IndexOffsetVC2Attributes is the index of the attributes in VC2
const UserSecretKeyIndex = 0
UserSecretKeyIndex is the index of `sk` among the attributes
Variables ¶
This section is empty.
Functions ¶
func BlindSign ¶
func BlindSign(messages []*bbs12381g2pub.SignatureMessage, msgCount int, commitment *ml.G1, privKeyBytes []byte, curve *math.Curve) ([]byte, error)
BlindSign signs disclosed and blinded messages using private key in compressed form.
func UnblindSign ¶
UnblindSign converts a signature over some blind messages into a standard signature.
func VerifyBlinding ¶
func VerifyBlinding(messageBitmap []bool, msgCommit *ml.G1, bmProof *POKOfBlindedMessages, PK *bbs12381g2pub.PublicKey, nonce []byte, curve *math.Curve) error
VerifyBlinding verifies that `msgCommit` is a valid commitment of a set of messages against the appropriate bases.
Types ¶
type BlindedMessages ¶
type BlindedMessages struct { PK *bbs12381g2pub.PublicKeyWithGenerators S *ml.Zr C *ml.G1 PoK *POKOfBlindedMessages }
BlindedMessages represents a set of messages prepared (blinded) to be submitted to a signer for a blind signature.
func BlindMessages ¶
func BlindMessages(messages [][]byte, PK *bbs12381g2pub.PublicKey, blindedMsgCount int, nonce []byte, curve *ml.Curve) (*BlindedMessages, error)
BlindMessages constructs a commitment to a set of messages that need to be blinded before signing, and generates the corresponding ZKP.
func BlindMessagesZr ¶
func BlindMessagesZr(zrs []*ml.Zr, PK *bbs12381g2pub.PublicKey, blindedMsgCount int, nonce []byte, curve *ml.Curve) (*BlindedMessages, error)
BlindMessagesZr constructs a commitment to a set of messages that need to be blinded before signing, and generates the corresponding ZKP.
func ParseBlindedMessages ¶
func ParseBlindedMessages(bytes []byte, curve *ml.Curve) (*BlindedMessages, error)
func (*BlindedMessages) Bytes ¶
func (b *BlindedMessages) Bytes() []byte
type Cred ¶
type Cred struct { Bls *bbs12381g2pub.BBSG2Pub Curve *math.Curve }
func (*Cred) Sign ¶
func (c *Cred) Sign(key types.IssuerSecretKey, credentialRequest []byte, attributes []types.IdemixAttribute) ([]byte, error)
Sign issues a new credential, which is the last step of the interactive issuance protocol All attribute values are added by the issuer at this step and then signed together with a commitment to the user's secret key from a credential request
type CredRequest ¶
func (*CredRequest) Blind ¶
func (c *CredRequest) Blind(sk *math.Zr, key types.IssuerPublicKey, nonce []byte) ([]byte, []byte, error)
Sign creates a new Credential Request, the first message of the interactive credential issuance protocol (from user to issuer)
func (*CredRequest) BlindVerify ¶
func (c *CredRequest) BlindVerify(credRequest []byte, key types.IssuerPublicKey, nonce []byte) error
Verify verifies the credential request
type Credential ¶
type Credential struct { Cred []byte `protobuf:"bytes,1,opt,name=cred,proto3" json:"cred,omitempty"` Attrs [][]byte `protobuf:"bytes,2,rep,name=attrs,proto3" json:"attrs,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Credential specifies a credential object
func (*Credential) Descriptor ¶
func (*Credential) Descriptor() ([]byte, []int)
func (*Credential) GetAttrs ¶
func (m *Credential) GetAttrs() [][]byte
func (*Credential) GetCred ¶
func (m *Credential) GetCred() []byte
func (*Credential) ProtoMessage ¶
func (*Credential) ProtoMessage()
func (*Credential) Reset ¶
func (m *Credential) Reset()
func (*Credential) String ¶
func (m *Credential) String() string
func (*Credential) XXX_DiscardUnknown ¶
func (m *Credential) XXX_DiscardUnknown()
func (*Credential) XXX_Marshal ¶
func (m *Credential) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Credential) XXX_Merge ¶
func (m *Credential) XXX_Merge(src proto.Message)
func (*Credential) XXX_Size ¶
func (m *Credential) XXX_Size() int
func (*Credential) XXX_Unmarshal ¶
func (m *Credential) XXX_Unmarshal(b []byte) error
type CredentialRevocationInformation ¶
type CredentialRevocationInformation struct { // epoch contains the epoch (time window) in which this CRI is valid Epoch int64 `protobuf:"varint,1,opt,name=epoch,proto3" json:"epoch,omitempty"` // epoch_pk is the public key that is used by the revocation authority in this epoch EpochPk []byte `protobuf:"bytes,2,opt,name=epoch_pk,json=epochPk,proto3" json:"epoch_pk,omitempty"` // epoch_pk_sig is a signature on the EpochPK valid under the revocation authority's long term key EpochPkSig []byte `protobuf:"bytes,3,opt,name=epoch_pk_sig,json=epochPkSig,proto3" json:"epoch_pk_sig,omitempty"` // revocation_alg denotes which revocation algorithm is used RevocationAlg int32 `protobuf:"varint,4,opt,name=revocation_alg,json=revocationAlg,proto3" json:"revocation_alg,omitempty"` // revocation_data contains data specific to the revocation algorithm used RevocationData []byte `protobuf:"bytes,5,opt,name=revocation_data,json=revocationData,proto3" json:"revocation_data,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*CredentialRevocationInformation) Descriptor ¶
func (*CredentialRevocationInformation) Descriptor() ([]byte, []int)
func (*CredentialRevocationInformation) GetEpoch ¶
func (m *CredentialRevocationInformation) GetEpoch() int64
func (*CredentialRevocationInformation) GetEpochPk ¶
func (m *CredentialRevocationInformation) GetEpochPk() []byte
func (*CredentialRevocationInformation) GetEpochPkSig ¶
func (m *CredentialRevocationInformation) GetEpochPkSig() []byte
func (*CredentialRevocationInformation) GetRevocationAlg ¶
func (m *CredentialRevocationInformation) GetRevocationAlg() int32
func (*CredentialRevocationInformation) GetRevocationData ¶
func (m *CredentialRevocationInformation) GetRevocationData() []byte
func (*CredentialRevocationInformation) ProtoMessage ¶
func (*CredentialRevocationInformation) ProtoMessage()
func (*CredentialRevocationInformation) Reset ¶
func (m *CredentialRevocationInformation) Reset()
func (*CredentialRevocationInformation) String ¶
func (m *CredentialRevocationInformation) String() string
func (*CredentialRevocationInformation) XXX_DiscardUnknown ¶
func (m *CredentialRevocationInformation) XXX_DiscardUnknown()
func (*CredentialRevocationInformation) XXX_Marshal ¶
func (m *CredentialRevocationInformation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CredentialRevocationInformation) XXX_Merge ¶
func (m *CredentialRevocationInformation) XXX_Merge(src proto.Message)
func (*CredentialRevocationInformation) XXX_Size ¶
func (m *CredentialRevocationInformation) XXX_Size() int
func (*CredentialRevocationInformation) XXX_Unmarshal ¶
func (m *CredentialRevocationInformation) XXX_Unmarshal(b []byte) error
type Issuer ¶
Issuer is a local interface to decouple from the idemix implementation
func (*Issuer) NewKey ¶
func (i *Issuer) NewKey(AttributeNames []string) (types.IssuerSecretKey, error)
NewKey generates a new idemix issuer key w.r.t the passed attribute names.
func (*Issuer) NewKeyFromBytes ¶
NewPublicKeyFromBytes converts the passed bytes to an Issuer key It makes sure that the so obtained key has the passed attributes, if specified
func (*Issuer) NewPublicKeyFromBytes ¶
func (i *Issuer) NewPublicKeyFromBytes(raw []byte, attributes []string) (types.IssuerPublicKey, error)
NewPublicKeyFromBytes converts the passed bytes to an Issuer public key It makes sure that the so obtained public key has the passed attributes, if specified
type IssuerPublicKey ¶
type IssuerPublicKey struct { PK *bbs12381g2pub.PublicKey PKwG *bbs12381g2pub.PublicKeyWithGenerators // N is the number of attributes; it *does not* include the user secret key N int }
IssuerPublicKey is the issuer public key
func (*IssuerPublicKey) Bytes ¶
func (i *IssuerPublicKey) Bytes() ([]byte, error)
Bytes returns the byte representation of this key
func (*IssuerPublicKey) Hash ¶
func (i *IssuerPublicKey) Hash() []byte
Hash returns the hash representation of this key. The output is supposed to be collision-resistant
type IssuerSecretKey ¶
type IssuerSecretKey struct { IssuerPublicKey SK *bbs12381g2pub.PrivateKey }
IssuerPublicKey is the issuer secret key
func (*IssuerSecretKey) Bytes ¶
func (i *IssuerSecretKey) Bytes() ([]byte, error)
Bytes returns the byte representation of this key
func (*IssuerSecretKey) Public ¶
func (i *IssuerSecretKey) Public() types.IssuerPublicKey
Public returns the corresponding public key
type NonRevocationProof ¶
type NonRevocationProof struct { RevocationAlg int32 `protobuf:"varint,1,opt,name=revocation_alg,json=revocationAlg,proto3" json:"revocation_alg,omitempty"` NonRevocationProof []byte `protobuf:"bytes,2,opt,name=non_revocation_proof,json=nonRevocationProof,proto3" json:"non_revocation_proof,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
NonRevocationProof contains proof that the credential is not revoked
func (*NonRevocationProof) Descriptor ¶
func (*NonRevocationProof) Descriptor() ([]byte, []int)
func (*NonRevocationProof) GetNonRevocationProof ¶
func (m *NonRevocationProof) GetNonRevocationProof() []byte
func (*NonRevocationProof) GetRevocationAlg ¶
func (m *NonRevocationProof) GetRevocationAlg() int32
func (*NonRevocationProof) ProtoMessage ¶
func (*NonRevocationProof) ProtoMessage()
func (*NonRevocationProof) Reset ¶
func (m *NonRevocationProof) Reset()
func (*NonRevocationProof) String ¶
func (m *NonRevocationProof) String() string
func (*NonRevocationProof) XXX_DiscardUnknown ¶
func (m *NonRevocationProof) XXX_DiscardUnknown()
func (*NonRevocationProof) XXX_Marshal ¶
func (m *NonRevocationProof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*NonRevocationProof) XXX_Merge ¶
func (m *NonRevocationProof) XXX_Merge(src proto.Message)
func (*NonRevocationProof) XXX_Size ¶
func (m *NonRevocationProof) XXX_Size() int
func (*NonRevocationProof) XXX_Unmarshal ¶
func (m *NonRevocationProof) XXX_Unmarshal(b []byte) error
type NymSignature ¶
type NymSignature struct { MainSignature []byte `protobuf:"bytes,1,opt,name=main_signature,json=mainSignature,proto3" json:"main_signature,omitempty"` Nonce []byte `protobuf:"bytes,2,opt,name=nonce,proto3" json:"nonce,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*NymSignature) Descriptor ¶
func (*NymSignature) Descriptor() ([]byte, []int)
func (*NymSignature) GetMainSignature ¶
func (m *NymSignature) GetMainSignature() []byte
func (*NymSignature) GetNonce ¶
func (m *NymSignature) GetNonce() []byte
func (*NymSignature) ProtoMessage ¶
func (*NymSignature) ProtoMessage()
func (*NymSignature) Reset ¶
func (m *NymSignature) Reset()
func (*NymSignature) String ¶
func (m *NymSignature) String() string
func (*NymSignature) XXX_DiscardUnknown ¶
func (m *NymSignature) XXX_DiscardUnknown()
func (*NymSignature) XXX_Marshal ¶
func (m *NymSignature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*NymSignature) XXX_Merge ¶
func (m *NymSignature) XXX_Merge(src proto.Message)
func (*NymSignature) XXX_Size ¶
func (m *NymSignature) XXX_Size() int
func (*NymSignature) XXX_Unmarshal ¶
func (m *NymSignature) XXX_Unmarshal(b []byte) error
type NymSigner ¶
type POKOfBlindedMessages ¶
type POKOfBlindedMessages struct { C *ml.G1 ProofC *bbs12381g2pub.ProofG1 }
POKOfBlindedMessages is the zero-knowledge proof that the requester knows the messages they have submitted for blind signature in the form of a Pedersen commitment.
func (*POKOfBlindedMessages) VerifyProof ¶
func (b *POKOfBlindedMessages) VerifyProof(messages []bool, commitment *ml.G1, challenge *ml.Zr, PK *bbs12381g2pub.PublicKey) error
VerifyProof verifies the correctness of the zero knowledge proof against the supplied commitment, challenge and public key.
type RevocationAuthority ¶
func (*RevocationAuthority) NewKey ¶
func (r *RevocationAuthority) NewKey() (*ecdsa.PrivateKey, error)
NewKey generates a long term signing key that will be used for revocation
func (*RevocationAuthority) NewKeyFromBytes ¶
func (r *RevocationAuthority) NewKeyFromBytes(raw []byte) (*ecdsa.PrivateKey, error)
NewKeyFromBytes generates a long term signing key that will be used for revocation from the passed bytes
func (*RevocationAuthority) Sign ¶
func (r *RevocationAuthority) Sign(key *ecdsa.PrivateKey, _ [][]byte, epoch int, alg types.RevocationAlgorithm) ([]byte, error)
Sign creates the Credential Revocation Information for a certain time period (epoch). Users can use the CRI to prove that they are not revoked.
func (*RevocationAuthority) Verify ¶
func (r *RevocationAuthority) Verify(pk *ecdsa.PublicKey, criRaw []byte, epoch int, alg types.RevocationAlgorithm) error
Verify verifies that the revocation PK for a certain epoch is valid, by checking that it was signed with the long term revocation key. Note that even if we use no revocation (i.e., alg = ALG_NO_REVOCATION), we need to verify the signature to make sure the issuer indeed signed that no revocation is used in this epoch.
type Signature ¶
type Signature struct { MainSignature []byte `protobuf:"bytes,1,opt,name=main_signature,json=mainSignature,proto3" json:"main_signature,omitempty"` Nonce []byte `protobuf:"bytes,2,opt,name=nonce,proto3" json:"nonce,omitempty"` Nym []byte `protobuf:"bytes,3,opt,name=nym,proto3" json:"nym,omitempty"` NymProof []byte `protobuf:"bytes,4,opt,name=nym_proof,json=nymProof,proto3" json:"nym_proof,omitempty"` NymEid []byte `protobuf:"bytes,5,opt,name=nym_eid,json=nymEid,proto3" json:"nym_eid,omitempty"` NymEidProof []byte `protobuf:"bytes,6,opt,name=nym_eid_proof,json=nymEidProof,proto3" json:"nym_eid_proof,omitempty"` NymEidIdx int32 `protobuf:"varint,7,opt,name=nym_eid_idx,json=nymEidIdx,proto3" json:"nym_eid_idx,omitempty"` NymRh []byte `protobuf:"bytes,8,opt,name=nym_rh,json=nymRh,proto3" json:"nym_rh,omitempty"` NymRhProof []byte `protobuf:"bytes,9,opt,name=nym_rh_proof,json=nymRhProof,proto3" json:"nym_rh_proof,omitempty"` NymRhIdx int32 `protobuf:"varint,10,opt,name=nym_rh_idx,json=nymRhIdx,proto3" json:"nym_rh_idx,omitempty"` RevocationEpochPk []byte `protobuf:"bytes,11,opt,name=revocation_epoch_pk,json=revocationEpochPk,proto3" json:"revocation_epoch_pk,omitempty"` RevocationPkSig []byte `protobuf:"bytes,12,opt,name=revocation_pk_sig,json=revocationPkSig,proto3" json:"revocation_pk_sig,omitempty"` Epoch int64 `protobuf:"varint,13,opt,name=epoch,proto3" json:"epoch,omitempty"` NonRevocationProof *NonRevocationProof `protobuf:"bytes,14,opt,name=non_revocation_proof,json=nonRevocationProof,proto3" json:"non_revocation_proof,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Signature is a PoK of a BBS+ signature (a credential)
func (*Signature) Descriptor ¶
func (*Signature) GetMainSignature ¶
func (*Signature) GetNonRevocationProof ¶
func (m *Signature) GetNonRevocationProof() *NonRevocationProof
func (*Signature) GetNymEidIdx ¶
func (*Signature) GetNymEidProof ¶
func (*Signature) GetNymProof ¶
func (*Signature) GetNymRhIdx ¶
func (*Signature) GetNymRhProof ¶
func (*Signature) GetRevocationEpochPk ¶
func (*Signature) GetRevocationPkSig ¶
func (*Signature) ProtoMessage ¶
func (*Signature) ProtoMessage()
func (*Signature) XXX_DiscardUnknown ¶
func (m *Signature) XXX_DiscardUnknown()
func (*Signature) XXX_Marshal ¶
func (*Signature) XXX_Unmarshal ¶
type Signer ¶
func (*Signer) AuditNymEid ¶
func (s *Signer) AuditNymEid( key types.IssuerPublicKey, eidIndex int, signature []byte, enrollmentID string, RNymEid *math.Zr, verType types.AuditVerificationType, ) error
AuditNymEid permits the auditing of the nym eid generated by a signer
func (*Signer) AuditNymRh ¶
func (s *Signer) AuditNymRh( key types.IssuerPublicKey, rhIndex int, signature []byte, revocationHandle string, RNymRh *math.Zr, verType types.AuditVerificationType, ) error
AuditNymRh permits the auditing of the nym rh generated by a signer
func (*Signer) Sign ¶
func (s *Signer) Sign( credBytes []byte, sk *math.Zr, Nym *math.G1, RNym *math.Zr, key types.IssuerPublicKey, attributes []types.IdemixAttribute, msg []byte, rhIndex, eidIndex int, criRaw []byte, sigType types.SignatureType, metadata *types.IdemixSignerMetadata, ) ([]byte, *types.IdemixSignerMetadata, error)
Sign creates a new idemix signature
func (*Signer) Verify ¶
func (s *Signer) Verify( key types.IssuerPublicKey, signature, msg []byte, attributes []types.IdemixAttribute, rhIndex, eidIndex int, _ *ecdsa.PublicKey, _ int, verType types.VerificationType, meta *types.IdemixSignerMetadata, ) error
Verify verifies an idemix signature.
type User ¶
func (*User) NewKeyFromBytes ¶
NewKeyFromBytes converts the passed bytes to a User secret key