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.SerializedIdentity
createSerializedIdentity()
Converts an identity to bytesIdemixPseudonym
getNym()
IdemixSignature
getProof()
byte[]
sign(byte[] msg)
Sings a message with the secret key and the corresponding certificateboolean
verifySignature(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:
CryptoException
InvalidArgumentException
-
-
Method Detail
-
sign
public byte[] sign(byte[] msg) throws CryptoException, InvalidArgumentException
Description copied from interface:SigningIdentity
Sings a message with the secret key and the corresponding certificate- Specified by:
sign
in interfaceSigningIdentity
- Returns:
- signature
- Throws:
CryptoException
InvalidArgumentException
-
createSerializedIdentity
public org.hyperledger.fabric.protos.msp.Identities.SerializedIdentity createSerializedIdentity()
Description copied from interface:Identity
Converts an identity to bytes- Specified by:
createSerializedIdentity
in interfaceIdentity
- Returns:
- SerializedIdentity
-
verifySignature
public boolean verifySignature(byte[] msg, byte[] sig) throws CryptoException, InvalidArgumentException
Description copied from interface:SigningIdentity
Verifies a signature on a message- Specified by:
verifySignature
in interfaceSigningIdentity
- Returns:
- true/false
- Throws:
CryptoException
InvalidArgumentException
-
getNym
public IdemixPseudonym getNym()
-
getProof
public IdemixSignature getProof()
-
-