Class IdemixSigningIdentity
- java.lang.Object
-
- org.hyperledger.fabric.sdk.identity.IdemixSigningIdentity
-
- All Implemented Interfaces:
Identity,SigningIdentity
public class IdemixSigningIdentity extends java.lang.Object implements SigningIdentity
IdemixSigningIdentity is an Idemix implementation of the SigningIdentity It contains IdemixIdentity (a public part) and a corresponding secret part that contains the user secret key and the commitment opening (randomness) to the pseudonym value (a commitment to the user secret)We note that since the attributes and their disclosure is fixed we are not adding them as fields here.
-
-
Constructor Summary
Constructors Constructor Description IdemixSigningIdentity(IdemixIssuerPublicKey ipk, java.security.PublicKey revocationPk, java.lang.String mspId, org.apache.milagro.amcl.FP256BN.BIG sk, IdemixCredential cred, org.hyperledger.fabric.protos.idemix.Idemix.CredentialRevocationInformation cri, java.lang.String ou, int role)Create new Idemix Signing Identity with a fresh pseudonymIdemixSigningIdentity(IdemixEnrollment enrollment)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.hyperledger.fabric.protos.msp.Identities.SerializedIdentitycreateSerializedIdentity()Converts an identity to bytesIdemixPseudonymgetNym()IdemixSignaturegetProof()byte[]sign(byte[] msg)Sings a message with the secret key and the corresponding certificatebooleanverifySignature(byte[] msg, byte[] sig)Verifies a signature on a message
-
-
-
Constructor Detail
-
IdemixSigningIdentity
public IdemixSigningIdentity(IdemixEnrollment enrollment) throws CryptoException, InvalidArgumentException
-
IdemixSigningIdentity
public IdemixSigningIdentity(IdemixIssuerPublicKey ipk, java.security.PublicKey revocationPk, java.lang.String mspId, org.apache.milagro.amcl.FP256BN.BIG sk, IdemixCredential cred, org.hyperledger.fabric.protos.idemix.Idemix.CredentialRevocationInformation cri, java.lang.String ou, int role) throws CryptoException, InvalidArgumentException
Create new Idemix Signing Identity with a fresh pseudonym- Parameters:
ipk- issuer public keyrevocationPk- the issuer's long term revocation public keymspId- MSP identifiersk- user's secretcred- idemix credentialcri- the credential revocation informationou- is OU attributerole- is role attribute- Throws:
CryptoExceptionInvalidArgumentException
-
-
Method Detail
-
sign
public byte[] sign(byte[] msg) throws CryptoException, InvalidArgumentExceptionDescription copied from interface:SigningIdentitySings a message with the secret key and the corresponding certificate- Specified by:
signin interfaceSigningIdentity- Returns:
- signature
- Throws:
CryptoExceptionInvalidArgumentException
-
createSerializedIdentity
public org.hyperledger.fabric.protos.msp.Identities.SerializedIdentity createSerializedIdentity()
Description copied from interface:IdentityConverts an identity to bytes- Specified by:
createSerializedIdentityin interfaceIdentity- Returns:
- SerializedIdentity
-
verifySignature
public boolean verifySignature(byte[] msg, byte[] sig) throws CryptoException, InvalidArgumentExceptionDescription copied from interface:SigningIdentityVerifies a signature on a message- Specified by:
verifySignaturein interfaceSigningIdentity- Returns:
- true/false
- Throws:
CryptoExceptionInvalidArgumentException
-
getNym
public IdemixPseudonym getNym()
-
getProof
public IdemixSignature getProof()
-
-