Class IdemixSignature
- java.lang.Object
-
- org.hyperledger.fabric.sdk.idemix.IdemixSignature
-
public class IdemixSignature extends java.lang.ObjectIdemixSignature represents an idemix signature, which is a zero knowledge proof of knowledge of a BBS+ signature. The Camenisch-Drijvers-Lehmann ZKP (ia.cr/2016/663) is used
-
-
Constructor Summary
Constructors Constructor Description IdemixSignature(org.hyperledger.fabric.protos.idemix.Idemix.Signature proto)Construct a new signature from a serialized IdemixSignatureIdemixSignature(IdemixCredential c, org.apache.milagro.amcl.FP256BN.BIG sk, IdemixPseudonym pseudonym, IdemixIssuerPublicKey ipk, boolean[] disclosure, byte[] msg, int rhIndex, org.hyperledger.fabric.protos.idemix.Idemix.CredentialRevocationInformation cri)Create a new IdemixSignature by proving knowledge of a credential
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.hyperledger.fabric.protos.idemix.Idemix.SignaturetoProto()Convert this signature to a protobooleanverify(boolean[] disclosure, IdemixIssuerPublicKey ipk, byte[] msg, org.apache.milagro.amcl.FP256BN.BIG[] attributeValues, int rhIndex, java.security.PublicKey revPk, int epoch)Verify this signature
-
-
-
Constructor Detail
-
IdemixSignature
public IdemixSignature(IdemixCredential c, org.apache.milagro.amcl.FP256BN.BIG sk, IdemixPseudonym pseudonym, IdemixIssuerPublicKey ipk, boolean[] disclosure, byte[] msg, int rhIndex, org.hyperledger.fabric.protos.idemix.Idemix.CredentialRevocationInformation cri)
Create a new IdemixSignature by proving knowledge of a credential- Parameters:
c- the credential used to create an idemix signaturesk- the signer's secret keypseudonym- a pseudonym of the signeripk- the issuer public keydisclosure- a bool-array that steers the disclosure of attributesmsg- the message to be signedrhIndex- the index of the attribute that represents the revocation handlecri- the credential revocation information that allows the signer to prove non-revocation
-
IdemixSignature
public IdemixSignature(org.hyperledger.fabric.protos.idemix.Idemix.Signature proto)
Construct a new signature from a serialized IdemixSignature- Parameters:
proto- a protobuf object representing an IdemixSignature
-
-
Method Detail
-
verify
public boolean verify(boolean[] disclosure, IdemixIssuerPublicKey ipk, byte[] msg, org.apache.milagro.amcl.FP256BN.BIG[] attributeValues, int rhIndex, java.security.PublicKey revPk, int epoch) throws CryptoExceptionVerify this signature- Parameters:
disclosure- an array indicating which attributes it expects to be disclosedipk- the issuer public keymsg- the message that should be signed in this signatureattributeValues- BIG array where attributeValues[i] contains the desired attribute value for the i-th attribute if its disclosedrhIndex- index of the attribute that represents the revocation-handlerevPk- the long term public key used to authenticate CRIsepoch- monotonically increasing counter representing a time window- Returns:
- true iff valid
- Throws:
CryptoException
-
toProto
public org.hyperledger.fabric.protos.idemix.Idemix.Signature toProto()
Convert this signature to a proto- Returns:
- a protobuf object representing this IdemixSignature
-
-