Class IdemixSignature



  • public class IdemixSignature
    extends java.lang.Object
    IdemixSignature 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 IdemixSignature
      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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.hyperledger.fabric.protos.idemix.Idemix.Signature toProto​()
      Convert this signature to a proto
      boolean verify​(boolean[] disclosure, IdemixIssuerPublicKey ipk, byte[] msg, org.apache.milagro.amcl.FP256BN.BIG[] attributeValues, int rhIndex, java.security.PublicKey revPk, int epoch)
      Verify this signature
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 signature
        sk - the signer's secret key
        pseudonym - a pseudonym of the signer
        ipk - the issuer public key
        disclosure - a bool-array that steers the disclosure of attributes
        msg - the message to be signed
        rhIndex - the index of the attribute that represents the revocation handle
        cri - 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 CryptoException
        Verify this signature
        Parameters:
        disclosure - an array indicating which attributes it expects to be disclosed
        ipk - the issuer public key
        msg - the message that should be signed in this signature
        attributeValues - BIG array where attributeValues[i] contains the desired attribute value for the i-th attribute if its disclosed
        rhIndex - index of the attribute that represents the revocation-handle
        revPk - the long term public key used to authenticate CRIs
        epoch - 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