public class IdemixSigningIdentity extends Object implements SigningIdentity
We note that since the attributes and their disclosure is fixed we are not adding them as fields here.
Constructor and Description |
---|
IdemixSigningIdentity(IdemixEnrollment enrollment) |
IdemixSigningIdentity(IdemixIssuerPublicKey ipk,
PublicKey revocationPk,
String mspId,
org.apache.milagro.amcl.FP256BN.BIG sk,
IdemixCredential cred,
org.hyperledger.fabric.protos.idemix.Idemix.CredentialRevocationInformation cri,
String ou,
int role)
Create new Idemix Signing Identity with a fresh pseudonym
|
Modifier and Type | Method and Description |
---|---|
org.hyperledger.fabric.protos.msp.Identities.SerializedIdentity |
createSerializedIdentity()
Converts an identity to bytes
|
IdemixPseudonym |
getNym() |
IdemixSignature |
getProof() |
byte[] |
sign(byte[] msg)
Sings a message with the secret key and the corresponding certificate
|
boolean |
verifySignature(byte[] msg,
byte[] sig)
Verifies a signature on a message
|
public IdemixSigningIdentity(IdemixEnrollment enrollment) throws CryptoException, InvalidArgumentException
public IdemixSigningIdentity(IdemixIssuerPublicKey ipk, PublicKey revocationPk, String mspId, org.apache.milagro.amcl.FP256BN.BIG sk, IdemixCredential cred, org.hyperledger.fabric.protos.idemix.Idemix.CredentialRevocationInformation cri, String ou, int role) throws CryptoException, InvalidArgumentException
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 attributeCryptoException
InvalidArgumentException
public byte[] sign(byte[] msg) throws CryptoException, InvalidArgumentException
SigningIdentity
sign
in interface SigningIdentity
CryptoException
InvalidArgumentException
public org.hyperledger.fabric.protos.msp.Identities.SerializedIdentity createSerializedIdentity()
Identity
createSerializedIdentity
in interface Identity
public boolean verifySignature(byte[] msg, byte[] sig) throws CryptoException, InvalidArgumentException
SigningIdentity
verifySignature
in interface SigningIdentity
CryptoException
InvalidArgumentException
public IdemixPseudonym getNym()
public IdemixSignature getProof()
Copyright © 2020. All rights reserved.