{"modulePath":"github.com/eric-erki/https-hyperledger.org","version":"v1.4.4","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package idemix\n\n## Variables\n\n```go\nvar FieldBytes = int(FP256BN.MODBYTES)\n```\nFieldBytes is the bytelength of the group order\n\n```go\nvar GenG1 = FP256BN.NewECPbigs(\n\tFP256BN.NewBIGints(FP256BN.CURVE_Gx),\n\tFP256BN.NewBIGints(FP256BN.CURVE_Gy))\n```\nGenG1 is a generator of Group G1\n\n```go\nvar GenG2 = FP256BN.NewECP2fp2s(\n\tFP256BN.NewFP2bigs(FP256BN.NewBIGints(FP256BN.CURVE_Pxa), FP256BN.NewBIGints(FP256BN.CURVE_Pxb)),\n\tFP256BN.NewFP2bigs(FP256BN.NewBIGints(FP256BN.CURVE_Pya), FP256BN.NewBIGints(FP256BN.CURVE_Pyb)))\n```\nGenG2 is a generator of Group G2\n\n```go\nvar GenGT = FP256BN.Fexp(FP256BN.Ate(GenG2, GenG1))\n```\nGenGT is a generator of Group GT\n\n```go\nvar GroupOrder = FP256BN.NewBIGints(FP256BN.CURVE_Order)\n```\nGroupOrder is the order of the groups\n\n```go\nvar ProofBytes = map[RevocationAlgorithm]int{\n\tALG_NO_REVOCATION: 0,\n}\n```\n\n## Functions\n\n```go\nfunc BigToBytes(big *FP256BN.BIG) []byte\n```\nBigToBytes takes an \\*amcl.BIG and returns a \\[]byte representation\n\n```go\nfunc Ecp2FromProto(p *ECP2) *FP256BN.ECP2\n```\nEcp2FromProto converts a proto struct \\*ECP2 into an \\*amcl.ECP2\n\n```go\nfunc EcpFromProto(p *ECP) *FP256BN.ECP\n```\nEcpFromProto converts a proto struct \\*ECP into an \\*amcl.ECP\n\n```go\nfunc EcpToBytes(E *FP256BN.ECP) []byte\n```\n\n```go\nfunc GenerateLongTermRevocationKey() (*ecdsa.PrivateKey, error)\n```\nGenerateLongTermRevocationKey generates a long term signing key that will be used for revocation\n\n```go\nfunc GetRand() (*amcl.RAND, error)\n```\nGetRand returns a new \\*amcl.RAND with a fresh seed\n\n```go\nfunc HashModOrder(data []byte) *FP256BN.BIG\n```\nHashModOrder hashes data into 0, ..., GroupOrder-1\n\n```go\nfunc MakeNym(sk *FP256BN.BIG, IPk *IssuerPublicKey, rng *amcl.RAND) (*FP256BN.ECP, *FP256BN.BIG)\n```\nMakeNym creates a new unlinkable pseudonym\n\n```go\nfunc Modadd(a, b, m *FP256BN.BIG) *FP256BN.BIG\n```\nModadd takes input BIGs a, b, m, and returns a+b modulo m\n\n```go\nfunc Modsub(a, b, m *FP256BN.BIG) *FP256BN.BIG\n```\nModsub takes input BIGs a, b, m and returns a-b modulo m\n\n```go\nfunc RandModOrder(rng *amcl.RAND) *FP256BN.BIG\n```\nRandModOrder returns a random element in 0, ..., GroupOrder-1\n\n```go\nfunc VerifyEpochPK(pk *ecdsa.PublicKey, epochPK *ECP2, epochPkSig []byte, epoch int, alg RevocationAlgorithm) error\n```\nVerifyEpochPK 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.\n\n```go\nfunc WBBKeyGen(rng *amcl.RAND) (*FP256BN.BIG, *FP256BN.ECP2)\n```\nWBBKeyGen creates a fresh weak-Boneh-Boyen signature key pair ([http://ia.cr/2004/171](http://ia.cr/2004/171))\n\n```go\nfunc WBBSign(sk *FP256BN.BIG, m *FP256BN.BIG) *FP256BN.ECP\n```\nWBBSign places a weak Boneh-Boyen signature on message m using secret key sk\n\n```go\nfunc WBBVerify(pk *FP256BN.ECP2, sig *FP256BN.ECP, m *FP256BN.BIG) error\n```\nWBBVerify verifies a weak Boneh-Boyen signature sig on message m with public key pk\n\n## Types\n\n```go\ntype CredRequest struct {\n\tNym                  *ECP     `protobuf:\"bytes,1,opt,name=nym,proto3\" json:\"nym,omitempty\"`\n\tIssuerNonce          []byte   `protobuf:\"bytes,2,opt,name=issuer_nonce,json=issuerNonce,proto3\" json:\"issuer_nonce,omitempty\"`\n\tProofC               []byte   `protobuf:\"bytes,3,opt,name=proof_c,json=proofC,proto3\" json:\"proof_c,omitempty\"`\n\tProofS               []byte   `protobuf:\"bytes,4,opt,name=proof_s,json=proofS,proto3\" json:\"proof_s,omitempty\"`\n\tXXX_NoUnkeyedLiteral struct{} `json:\"-\"`\n\tXXX_unrecognized     []byte   `json:\"-\"`\n\tXXX_sizecache        int32    `json:\"-\"`\n}\n```\nCredRequest specifies a credential request object that consists of nym - a pseudonym, which is a commitment to the user secret issuer\\_nonce - a random nonce provided by the issuer proof\\_c, proof\\_s - a zero-knowledge proof of knowledge of the user secret inside Nym\n\n```go\nfunc NewCredRequest(sk *FP256BN.BIG, IssuerNonce []byte, ipk *IssuerPublicKey, rng *amcl.RAND) *CredRequest\n```\nNewCredRequest creates a new Credential Request, the first message of the interactive credential issuance protocol (from user to issuer)\n\n```go\nfunc (m *CredRequest) Check(ipk *IssuerPublicKey) error\n```\nCheck cryptographically verifies the credential request\n\n```go\nfunc (*CredRequest) Descriptor() ([]byte, []int)\n```\n\n```go\nfunc (m *CredRequest) GetIssuerNonce() []byte\n```\n\n```go\nfunc (m *CredRequest) GetNym() *ECP\n```\n\n```go\nfunc (m *CredRequest) GetProofC() []byte\n```\n\n```go\nfunc (m *CredRequest) GetProofS() []byte\n```\n\n```go\nfunc (*CredRequest) ProtoMessage()\n```\n\n```go\nfunc (m *CredRequest) Reset()\n```\n\n```go\nfunc (m *CredRequest) String() string\n```\n\n```go\nfunc (m *CredRequest) XXX_DiscardUnknown()\n```\n\n```go\nfunc (m *CredRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)\n```\n\n```go\nfunc (dst *CredRequest) XXX_Merge(src proto.Message)\n```\n\n```go\nfunc (m *CredRequest) XXX_Size() int\n```\n\n```go\nfunc (m *CredRequest) XXX_Unmarshal(b []byte) error\n```\n\n```go\ntype Credential struct {\n\tA                    *ECP     `protobuf:\"bytes,1,opt,name=a,proto3\" json:\"a,omitempty\"`\n\tB                    *ECP     `protobuf:\"bytes,2,opt,name=b,proto3\" json:\"b,omitempty\"`\n\tE                    []byte   `protobuf:\"bytes,3,opt,name=e,proto3\" json:\"e,omitempty\"`\n\tS                    []byte   `protobuf:\"bytes,4,opt,name=s,proto3\" json:\"s,omitempty\"`\n\tAttrs                [][]byte `protobuf:\"bytes,5,rep,name=attrs,proto3\" json:\"attrs,omitempty\"`\n\tXXX_NoUnkeyedLiteral struct{} `json:\"-\"`\n\tXXX_unrecognized     []byte   `json:\"-\"`\n\tXXX_sizecache        int32    `json:\"-\"`\n}\n```\nCredential specifies a credential object that consists of a, b, e, s - signature value attrs - attribute values\n\n```go\nfunc NewCredential(key *IssuerKey, m *CredRequest, attrs []*FP256BN.BIG, rng *amcl.RAND) (*Credential, error)\n```\nNewCredential 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\n\n```go\nfunc (*Credential) Descriptor() ([]byte, []int)\n```\n\n```go\nfunc (m *Credential) GetA() *ECP\n```\n\n```go\nfunc (m *Credential) GetAttrs() [][]byte\n```\n\n```go\nfunc (m *Credential) GetB() *ECP\n```\n\n```go\nfunc (m *Credential) GetE() []byte\n```\n\n```go\nfunc (m *Credential) GetS() []byte\n```\n\n```go\nfunc (*Credential) ProtoMessage()\n```\n\n```go\nfunc (m *Credential) Reset()\n```\n\n```go\nfunc (m *Credential) String() string\n```\n\n```go\nfunc (cred *Credential) Ver(sk *FP256BN.BIG, ipk *IssuerPublicKey) error\n```\nVer cryptographically verifies the credential by verifying the signature on the attribute values and user's secret key\n\n```go\nfunc (m *Credential) XXX_DiscardUnknown()\n```\n\n```go\nfunc (m *Credential) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)\n```\n\n```go\nfunc (dst *Credential) XXX_Merge(src proto.Message)\n```\n\n```go\nfunc (m *Credential) XXX_Size() int\n```\n\n```go\nfunc (m *Credential) XXX_Unmarshal(b []byte) error\n```\n\n```go\ntype CredentialRevocationInformation struct {\n\t// epoch contains the epoch (time window) in which this CRI is valid\n\tEpoch int64 `protobuf:\"varint,1,opt,name=epoch,proto3\" json:\"epoch,omitempty\"`\n\t// epoch_pk is the public key that is used by the revocation authority in this epoch\n\tEpochPk *ECP2 `protobuf:\"bytes,2,opt,name=epoch_pk,json=epochPk,proto3\" json:\"epoch_pk,omitempty\"`\n\t// epoch_pk_sig is a signature on the EpochPK valid under the revocation authority's long term key\n\tEpochPkSig []byte `protobuf:\"bytes,3,opt,name=epoch_pk_sig,json=epochPkSig,proto3\" json:\"epoch_pk_sig,omitempty\"`\n\t// revocation_alg denotes which revocation algorithm is used\n\tRevocationAlg int32 `protobuf:\"varint,4,opt,name=revocation_alg,json=revocationAlg,proto3\" json:\"revocation_alg,omitempty\"`\n\t// revocation_data contains data specific to the revocation algorithm used\n\tRevocationData       []byte   `protobuf:\"bytes,5,opt,name=revocation_data,json=revocationData,proto3\" json:\"revocation_data,omitempty\"`\n\tXXX_NoUnkeyedLiteral struct{} `json:\"-\"`\n\tXXX_unrecognized     []byte   `json:\"-\"`\n\tXXX_sizecache        int32    `json:\"-\"`\n}\n```\n\n```go\nfunc CreateCRI(key *ecdsa.PrivateKey, unrevokedHandles []*FP256BN.BIG, epoch int, alg RevocationAlgorithm, rng *amcl.RAND) (*CredentialRevocationInformation, error)\n```\nCreateCRI creates the Credential Revocation Information for a certain time period (epoch). Users can use the CRI to prove that they are not revoked. Note that when not using revocation (i.e., alg = ALG\\_NO\\_REVOCATION), the entered unrevokedHandles are not used, and the resulting CRI can be used by any signer.\n\n```go\nfunc (*CredentialRevocationInformation) Descriptor() ([]byte, []int)\n```\n\n```go\nfunc (m *CredentialRevocationInformation) GetEpoch() int64\n```\n\n```go\nfunc (m *CredentialRevocationInformation) GetEpochPk() *ECP2\n```\n\n```go\nfunc (m *CredentialRevocationInformation) GetEpochPkSig() []byte\n```\n\n```go\nfunc (m *CredentialRevocationInformation) GetRevocationAlg() int32\n```\n\n```go\nfunc (m *CredentialRevocationInformation) GetRevocationData() []byte\n```\n\n```go\nfunc (*CredentialRevocationInformation) ProtoMessage()\n```\n\n```go\nfunc (m *CredentialRevocationInformation) Reset()\n```\n\n```go\nfunc (m *CredentialRevocationInformation) String() string\n```\n\n```go\nfunc (m *CredentialRevocationInformation) XXX_DiscardUnknown()\n```\n\n```go\nfunc (m *CredentialRevocationInformation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)\n```\n\n```go\nfunc (dst *CredentialRevocationInformation) XXX_Merge(src proto.Message)\n```\n\n```go\nfunc (m *CredentialRevocationInformation) XXX_Size() int\n```\n\n```go\nfunc (m *CredentialRevocationInformation) XXX_Unmarshal(b []byte) error\n```\n\n```go\ntype ECP struct {\n\tX                    []byte   `protobuf:\"bytes,1,opt,name=x,proto3\" json:\"x,omitempty\"`\n\tY                    []byte   `protobuf:\"bytes,2,opt,name=y,proto3\" json:\"y,omitempty\"`\n\tXXX_NoUnkeyedLiteral struct{} `json:\"-\"`\n\tXXX_unrecognized     []byte   `json:\"-\"`\n\tXXX_sizecache        int32    `json:\"-\"`\n}\n```\nECP is an elliptic curve point specified by its coordinates ECP corresponds to an element of the first group (G1)\n\n```go\nfunc EcpToProto(p *FP256BN.ECP) *ECP\n```\nEcpToProto converts a \\*amcl.ECP into the proto struct \\*ECP\n\n```go\nfunc (*ECP) Descriptor() ([]byte, []int)\n```\n\n```go\nfunc (m *ECP) GetX() []byte\n```\n\n```go\nfunc (m *ECP) GetY() []byte\n```\n\n```go\nfunc (*ECP) ProtoMessage()\n```\n\n```go\nfunc (m *ECP) Reset()\n```\n\n```go\nfunc (m *ECP) String() string\n```\n\n```go\nfunc (m *ECP) XXX_DiscardUnknown()\n```\n\n```go\nfunc (m *ECP) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)\n```\n\n```go\nfunc (dst *ECP) XXX_Merge(src proto.Message)\n```\n\n```go\nfunc (m *ECP) XXX_Size() int\n```\n\n```go\nfunc (m *ECP) XXX_Unmarshal(b []byte) error\n```\n\n```go\ntype ECP2 struct {\n\tXa                   []byte   `protobuf:\"bytes,1,opt,name=xa,proto3\" json:\"xa,omitempty\"`\n\tXb                   []byte   `protobuf:\"bytes,2,opt,name=xb,proto3\" json:\"xb,omitempty\"`\n\tYa                   []byte   `protobuf:\"bytes,3,opt,name=ya,proto3\" json:\"ya,omitempty\"`\n\tYb                   []byte   `protobuf:\"bytes,4,opt,name=yb,proto3\" json:\"yb,omitempty\"`\n\tXXX_NoUnkeyedLiteral struct{} `json:\"-\"`\n\tXXX_unrecognized     []byte   `json:\"-\"`\n\tXXX_sizecache        int32    `json:\"-\"`\n}\n```\nECP2 is an elliptic curve point specified by its coordinates ECP2 corresponds to an element of the second group (G2)\n\n```go\nfunc Ecp2ToProto(p *FP256BN.ECP2) *ECP2\n```\nEcp2ToProto converts a \\*amcl.ECP2 into the proto struct \\*ECP2\n\n```go\nfunc (*ECP2) Descriptor() ([]byte, []int)\n```\n\n```go\nfunc (m *ECP2) GetXa() []byte\n```\n\n```go\nfunc (m *ECP2) GetXb() []byte\n```\n\n```go\nfunc (m *ECP2) GetYa() []byte\n```\n\n```go\nfunc (m *ECP2) GetYb() []byte\n```\n\n```go\nfunc (*ECP2) ProtoMessage()\n```\n\n```go\nfunc (m *ECP2) Reset()\n```\n\n```go\nfunc (m *ECP2) String() string\n```\n\n```go\nfunc (m *ECP2) XXX_DiscardUnknown()\n```\n\n```go\nfunc (m *ECP2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)\n```\n\n```go\nfunc (dst *ECP2) XXX_Merge(src proto.Message)\n```\n\n```go\nfunc (m *ECP2) XXX_Size() int\n```\n\n```go\nfunc (m *ECP2) XXX_Unmarshal(b []byte) error\n```\n\n```go\ntype IssuerKey struct {\n\tIsk                  []byte           `protobuf:\"bytes,1,opt,name=isk,proto3\" json:\"isk,omitempty\"`\n\tIpk                  *IssuerPublicKey `protobuf:\"bytes,2,opt,name=ipk,proto3\" json:\"ipk,omitempty\"`\n\tXXX_NoUnkeyedLiteral struct{}         `json:\"-\"`\n\tXXX_unrecognized     []byte           `json:\"-\"`\n\tXXX_sizecache        int32            `json:\"-\"`\n}\n```\nIssuerKey specifies an issuer key pair that consists of ISk - the issuer secret key and IssuerPublicKey - the issuer public key\n\n```go\nfunc NewIssuerKey(AttributeNames []string, rng *amcl.RAND) (*IssuerKey, error)\n```\nNewIssuerKey creates a new issuer key pair taking an array of attribute names that will be contained in credentials certified by this issuer (a credential specification) See [http://eprint.iacr.org/2016/663.pdf](http://eprint.iacr.org/2016/663.pdf) Sec. 4.3, for references.\n\n```go\nfunc (*IssuerKey) Descriptor() ([]byte, []int)\n```\n\n```go\nfunc (m *IssuerKey) GetIpk() *IssuerPublicKey\n```\n\n```go\nfunc (m *IssuerKey) GetIsk() []byte\n```\n\n```go\nfunc (*IssuerKey) ProtoMessage()\n```\n\n```go\nfunc (m *IssuerKey) Reset()\n```\n\n```go\nfunc (m *IssuerKey) String() string\n```\n\n```go\nfunc (m *IssuerKey) XXX_DiscardUnknown()\n```\n\n```go\nfunc (m *IssuerKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)\n```\n\n```go\nfunc (dst *IssuerKey) XXX_Merge(src proto.Message)\n```\n\n```go\nfunc (m *IssuerKey) XXX_Size() int\n```\n\n```go\nfunc (m *IssuerKey) XXX_Unmarshal(b []byte) error\n```\n\n```go\ntype IssuerPublicKey struct {\n\tAttributeNames       []string `protobuf:\"bytes,1,rep,name=attribute_names,json=attributeNames,proto3\" json:\"attribute_names,omitempty\"`\n\tHSk                  *ECP     `protobuf:\"bytes,2,opt,name=h_sk,json=hSk,proto3\" json:\"h_sk,omitempty\"`\n\tHRand                *ECP     `protobuf:\"bytes,3,opt,name=h_rand,json=hRand,proto3\" json:\"h_rand,omitempty\"`\n\tHAttrs               []*ECP   `protobuf:\"bytes,4,rep,name=h_attrs,json=hAttrs,proto3\" json:\"h_attrs,omitempty\"`\n\tW                    *ECP2    `protobuf:\"bytes,5,opt,name=w,proto3\" json:\"w,omitempty\"`\n\tBarG1                *ECP     `protobuf:\"bytes,6,opt,name=bar_g1,json=barG1,proto3\" json:\"bar_g1,omitempty\"`\n\tBarG2                *ECP     `protobuf:\"bytes,7,opt,name=bar_g2,json=barG2,proto3\" json:\"bar_g2,omitempty\"`\n\tProofC               []byte   `protobuf:\"bytes,8,opt,name=proof_c,json=proofC,proto3\" json:\"proof_c,omitempty\"`\n\tProofS               []byte   `protobuf:\"bytes,9,opt,name=proof_s,json=proofS,proto3\" json:\"proof_s,omitempty\"`\n\tHash                 []byte   `protobuf:\"bytes,10,opt,name=hash,proto3\" json:\"hash,omitempty\"`\n\tXXX_NoUnkeyedLiteral struct{} `json:\"-\"`\n\tXXX_unrecognized     []byte   `json:\"-\"`\n\tXXX_sizecache        int32    `json:\"-\"`\n}\n```\nIssuerPublicKey specifies an issuer public key that consists of attribute\\_names - a list of the attribute names of a credential issued by the issuer h\\_sk, h\\_rand, h\\_attrs, w, bar\\_g1, bar\\_g2 - group elements corresponding to the signing key, randomness, and attributes proof\\_c, proof\\_s compose a zero-knowledge proof of knowledge of the secret key hash is a hash of the public key appended to it\n\n```go\nfunc (IPk *IssuerPublicKey) Check() error\n```\nCheck checks that this issuer public key is valid, i.e. that all components are present and a ZK proofs verifies\n\n```go\nfunc (*IssuerPublicKey) Descriptor() ([]byte, []int)\n```\n\n```go\nfunc (m *IssuerPublicKey) GetAttributeNames() []string\n```\n\n```go\nfunc (m *IssuerPublicKey) GetBarG1() *ECP\n```\n\n```go\nfunc (m *IssuerPublicKey) GetBarG2() *ECP\n```\n\n```go\nfunc (m *IssuerPublicKey) GetHAttrs() []*ECP\n```\n\n```go\nfunc (m *IssuerPublicKey) GetHRand() *ECP\n```\n\n```go\nfunc (m *IssuerPublicKey) GetHSk() *ECP\n```\n\n```go\nfunc (m *IssuerPublicKey) GetHash() []byte\n```\n\n```go\nfunc (m *IssuerPublicKey) GetProofC() []byte\n```\n\n```go\nfunc (m *IssuerPublicKey) GetProofS() []byte\n```\n\n```go\nfunc (m *IssuerPublicKey) GetW() *ECP2\n```\n\n```go\nfunc (*IssuerPublicKey) ProtoMessage()\n```\n\n```go\nfunc (m *IssuerPublicKey) Reset()\n```\n\n```go\nfunc (IPk *IssuerPublicKey) SetHash() error\n```\nSetHash appends a hash of a serialized public key\n\n```go\nfunc (m *IssuerPublicKey) String() string\n```\n\n```go\nfunc (m *IssuerPublicKey) XXX_DiscardUnknown()\n```\n\n```go\nfunc (m *IssuerPublicKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)\n```\n\n```go\nfunc (dst *IssuerPublicKey) XXX_Merge(src proto.Message)\n```\n\n```go\nfunc (m *IssuerPublicKey) XXX_Size() int\n```\n\n```go\nfunc (m *IssuerPublicKey) XXX_Unmarshal(b []byte) error\n```\n\n```go\ntype NonRevocationProof struct {\n\tRevocationAlg        int32    `protobuf:\"varint,1,opt,name=revocation_alg,json=revocationAlg,proto3\" json:\"revocation_alg,omitempty\"`\n\tNonRevocationProof   []byte   `protobuf:\"bytes,2,opt,name=non_revocation_proof,json=nonRevocationProof,proto3\" json:\"non_revocation_proof,omitempty\"`\n\tXXX_NoUnkeyedLiteral struct{} `json:\"-\"`\n\tXXX_unrecognized     []byte   `json:\"-\"`\n\tXXX_sizecache        int32    `json:\"-\"`\n}\n```\nNonRevocationProof contains proof that the credential is not revoked\n\n```go\nfunc (*NonRevocationProof) Descriptor() ([]byte, []int)\n```\n\n```go\nfunc (m *NonRevocationProof) GetNonRevocationProof() []byte\n```\n\n```go\nfunc (m *NonRevocationProof) GetRevocationAlg() int32\n```\n\n```go\nfunc (*NonRevocationProof) ProtoMessage()\n```\n\n```go\nfunc (m *NonRevocationProof) Reset()\n```\n\n```go\nfunc (m *NonRevocationProof) String() string\n```\n\n```go\nfunc (m *NonRevocationProof) XXX_DiscardUnknown()\n```\n\n```go\nfunc (m *NonRevocationProof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)\n```\n\n```go\nfunc (dst *NonRevocationProof) XXX_Merge(src proto.Message)\n```\n\n```go\nfunc (m *NonRevocationProof) XXX_Size() int\n```\n\n```go\nfunc (m *NonRevocationProof) XXX_Unmarshal(b []byte) error\n```\n\n```go\ntype NymSignature struct {\n\t// proof_c is the Fiat-Shamir challenge of the ZKP\n\tProofC []byte `protobuf:\"bytes,1,opt,name=proof_c,json=proofC,proto3\" json:\"proof_c,omitempty\"`\n\t// proof_s_sk is the s-value proving knowledge of the user secret key\n\tProofSSk []byte `protobuf:\"bytes,2,opt,name=proof_s_sk,json=proofSSk,proto3\" json:\"proof_s_sk,omitempty\"`\n\t// proof_s_r_nym is the s-value proving knowledge of the pseudonym secret\n\tProofSRNym []byte `protobuf:\"bytes,3,opt,name=proof_s_r_nym,json=proofSRNym,proto3\" json:\"proof_s_r_nym,omitempty\"`\n\t// nonce is a fresh nonce used for the signature\n\tNonce                []byte   `protobuf:\"bytes,4,opt,name=nonce,proto3\" json:\"nonce,omitempty\"`\n\tXXX_NoUnkeyedLiteral struct{} `json:\"-\"`\n\tXXX_unrecognized     []byte   `json:\"-\"`\n\tXXX_sizecache        int32    `json:\"-\"`\n}\n```\nNymSignature specifies a signature object that signs a message with respect to a pseudonym. It differs from the standard idemix.signature in the fact that the  standard signature object also proves that the pseudonym is based on a secret certified by a CA (issuer), whereas NymSignature only proves that the the owner of the pseudonym signed the message\n\n```go\nfunc NewNymSignature(sk *FP256BN.BIG, Nym *FP256BN.ECP, RNym *FP256BN.BIG, ipk *IssuerPublicKey, msg []byte, rng *amcl.RAND) (*NymSignature, error)\n```\nNewSignature creates a new idemix pseudonym signature\n\n```go\nfunc (*NymSignature) Descriptor() ([]byte, []int)\n```\n\n```go\nfunc (m *NymSignature) GetNonce() []byte\n```\n\n```go\nfunc (m *NymSignature) GetProofC() []byte\n```\n\n```go\nfunc (m *NymSignature) GetProofSRNym() []byte\n```\n\n```go\nfunc (m *NymSignature) GetProofSSk() []byte\n```\n\n```go\nfunc (*NymSignature) ProtoMessage()\n```\n\n```go\nfunc (m *NymSignature) Reset()\n```\n\n```go\nfunc (m *NymSignature) String() string\n```\n\n```go\nfunc (sig *NymSignature) Ver(nym *FP256BN.ECP, ipk *IssuerPublicKey, msg []byte) error\n```\nVer verifies an idemix NymSignature\n\n```go\nfunc (m *NymSignature) XXX_DiscardUnknown()\n```\n\n```go\nfunc (m *NymSignature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)\n```\n\n```go\nfunc (dst *NymSignature) XXX_Merge(src proto.Message)\n```\n\n```go\nfunc (m *NymSignature) XXX_Size() int\n```\n\n```go\nfunc (m *NymSignature) XXX_Unmarshal(b []byte) error\n```\n\n```go\ntype RevocationAlgorithm int32\n```\n\n```go\nconst (\n\tALG_NO_REVOCATION RevocationAlgorithm = iota\n)\n```\n\n```go\ntype Signature struct {\n\tAPrime               *ECP                `protobuf:\"bytes,1,opt,name=a_prime,json=aPrime,proto3\" json:\"a_prime,omitempty\"`\n\tABar                 *ECP                `protobuf:\"bytes,2,opt,name=a_bar,json=aBar,proto3\" json:\"a_bar,omitempty\"`\n\tBPrime               *ECP                `protobuf:\"bytes,3,opt,name=b_prime,json=bPrime,proto3\" json:\"b_prime,omitempty\"`\n\tProofC               []byte              `protobuf:\"bytes,4,opt,name=proof_c,json=proofC,proto3\" json:\"proof_c,omitempty\"`\n\tProofSSk             []byte              `protobuf:\"bytes,5,opt,name=proof_s_sk,json=proofSSk,proto3\" json:\"proof_s_sk,omitempty\"`\n\tProofSE              []byte              `protobuf:\"bytes,6,opt,name=proof_s_e,json=proofSE,proto3\" json:\"proof_s_e,omitempty\"`\n\tProofSR2             []byte              `protobuf:\"bytes,7,opt,name=proof_s_r2,json=proofSR2,proto3\" json:\"proof_s_r2,omitempty\"`\n\tProofSR3             []byte              `protobuf:\"bytes,8,opt,name=proof_s_r3,json=proofSR3,proto3\" json:\"proof_s_r3,omitempty\"`\n\tProofSSPrime         []byte              `protobuf:\"bytes,9,opt,name=proof_s_s_prime,json=proofSSPrime,proto3\" json:\"proof_s_s_prime,omitempty\"`\n\tProofSAttrs          [][]byte            `protobuf:\"bytes,10,rep,name=proof_s_attrs,json=proofSAttrs,proto3\" json:\"proof_s_attrs,omitempty\"`\n\tNonce                []byte              `protobuf:\"bytes,11,opt,name=nonce,proto3\" json:\"nonce,omitempty\"`\n\tNym                  *ECP                `protobuf:\"bytes,12,opt,name=nym,proto3\" json:\"nym,omitempty\"`\n\tProofSRNym           []byte              `protobuf:\"bytes,13,opt,name=proof_s_r_nym,json=proofSRNym,proto3\" json:\"proof_s_r_nym,omitempty\"`\n\tRevocationEpochPk    *ECP2               `protobuf:\"bytes,14,opt,name=revocation_epoch_pk,json=revocationEpochPk,proto3\" json:\"revocation_epoch_pk,omitempty\"`\n\tRevocationPkSig      []byte              `protobuf:\"bytes,15,opt,name=revocation_pk_sig,json=revocationPkSig,proto3\" json:\"revocation_pk_sig,omitempty\"`\n\tEpoch                int64               `protobuf:\"varint,16,opt,name=epoch,proto3\" json:\"epoch,omitempty\"`\n\tNonRevocationProof   *NonRevocationProof `protobuf:\"bytes,17,opt,name=non_revocation_proof,json=nonRevocationProof,proto3\" json:\"non_revocation_proof,omitempty\"`\n\tXXX_NoUnkeyedLiteral struct{}            `json:\"-\"`\n\tXXX_unrecognized     []byte              `json:\"-\"`\n\tXXX_sizecache        int32               `json:\"-\"`\n}\n```\nSignature specifies a signature object that consists of a\\_prime, a\\_bar, b\\_prime, proof\\_\\* - randomized credential signature values and a zero-knowledge proof of knowledge of a credential and the corresponding user secret together with the attribute values nonce - a fresh nonce used for the signature nym - a fresh pseudonym (a commitment to to the user secret)\n\n```go\nfunc NewSignature(cred *Credential, sk *FP256BN.BIG, Nym *FP256BN.ECP, RNym *FP256BN.BIG, ipk *IssuerPublicKey, Disclosure []byte, msg []byte, rhIndex int, cri *CredentialRevocationInformation, rng *amcl.RAND) (*Signature, error)\n```\nNewSignature creates a new idemix signature (Schnorr-type signature) The \\[]byte Disclosure steers which attributes are disclosed: if Disclosure\\[i] == 0 then attribute i remains hidden and otherwise it is disclosed. We require the revocation handle to remain undisclosed (i.e., Disclosure\\[rhIndex] == 0). We use the zero-knowledge proof by [http://eprint.iacr.org/2016/663.pdf](http://eprint.iacr.org/2016/663.pdf), Sec. 4.5 to prove knowledge of a BBS+ signature\n\n```go\nfunc (*Signature) Descriptor() ([]byte, []int)\n```\n\n```go\nfunc (m *Signature) GetABar() *ECP\n```\n\n```go\nfunc (m *Signature) GetAPrime() *ECP\n```\n\n```go\nfunc (m *Signature) GetBPrime() *ECP\n```\n\n```go\nfunc (m *Signature) GetEpoch() int64\n```\n\n```go\nfunc (m *Signature) GetNonRevocationProof() *NonRevocationProof\n```\n\n```go\nfunc (m *Signature) GetNonce() []byte\n```\n\n```go\nfunc (m *Signature) GetNym() *ECP\n```\n\n```go\nfunc (m *Signature) GetProofC() []byte\n```\n\n```go\nfunc (m *Signature) GetProofSAttrs() [][]byte\n```\n\n```go\nfunc (m *Signature) GetProofSE() []byte\n```\n\n```go\nfunc (m *Signature) GetProofSR2() []byte\n```\n\n```go\nfunc (m *Signature) GetProofSR3() []byte\n```\n\n```go\nfunc (m *Signature) GetProofSRNym() []byte\n```\n\n```go\nfunc (m *Signature) GetProofSSPrime() []byte\n```\n\n```go\nfunc (m *Signature) GetProofSSk() []byte\n```\n\n```go\nfunc (m *Signature) GetRevocationEpochPk() *ECP2\n```\n\n```go\nfunc (m *Signature) GetRevocationPkSig() []byte\n```\n\n```go\nfunc (*Signature) ProtoMessage()\n```\n\n```go\nfunc (m *Signature) Reset()\n```\n\n```go\nfunc (m *Signature) String() string\n```\n\n```go\nfunc (sig *Signature) Ver(Disclosure []byte, ipk *IssuerPublicKey, msg []byte, attributeValues []*FP256BN.BIG, rhIndex int, revPk *ecdsa.PublicKey, epoch int) error\n```\nVer verifies an idemix signature Disclosure steers which attributes it expects to be disclosed attributeValues contains the desired attribute values. This function will check that if attribute i is disclosed, the i-th attribute equals attributeValues\\[i].\n\n```go\nfunc (m *Signature) XXX_DiscardUnknown()\n```\n\n```go\nfunc (m *Signature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)\n```\n\n```go\nfunc (dst *Signature) XXX_Merge(src proto.Message)\n```\n\n```go\nfunc (m *Signature) XXX_Size() int\n```\n\n```go\nfunc (m *Signature) XXX_Unmarshal(b []byte) error\n```\n\n","path":"github.com/eric-erki/https-hyperledger.org/idemix","name":"idemix","synopsis":"","isRedistributable":true}
