public class RevocationAuthority extends Object
Modifier and Type | Method and Description |
---|---|
static org.hyperledger.fabric.protos.idemix.Idemix.CredentialRevocationInformation |
createCRI(PrivateKey key,
org.apache.milagro.amcl.FP256BN.BIG[] unrevokedHandles,
int epoch,
RevocationAlgorithm alg)
Creates a Credential Revocation Information object
|
static KeyPair |
generateLongTermRevocationKey()
Generate a long term ECDSA key pair used for revocation
|
static int |
getProofBytes(RevocationAlgorithm alg)
Depending on the selected revocation algorithm, the proof data length will be different.
|
static boolean |
verifyEpochPK(PublicKey pk,
org.hyperledger.fabric.protos.idemix.Idemix.ECP2 epochPK,
byte[] epochPkSig,
long epoch,
RevocationAlgorithm alg)
Verifies that the revocation PK for a certain epoch is valid,
by checking that it was signed with the long term revocation key
|
public static int getProofBytes(RevocationAlgorithm alg)
alg
- The revocation algorithmpublic static KeyPair generateLongTermRevocationKey()
public static org.hyperledger.fabric.protos.idemix.Idemix.CredentialRevocationInformation createCRI(PrivateKey key, org.apache.milagro.amcl.FP256BN.BIG[] unrevokedHandles, int epoch, RevocationAlgorithm alg) throws CryptoException
key
- Private keyunrevokedHandles
- Array of unrevoked revocation handlesepoch
- The counter (representing a time window) in which this CRI is validalg
- Revocation algorithmCryptoException
public static boolean verifyEpochPK(PublicKey pk, org.hyperledger.fabric.protos.idemix.Idemix.ECP2 epochPK, byte[] epochPkSig, long epoch, RevocationAlgorithm alg) throws CryptoException
pk
- Public KeyepochPK
- Epoch PKepochPkSig
- Epoch PK Signatureepoch
- Epochalg
- Revocation algorithmCryptoException
Copyright © 2022. All rights reserved.