| 程序包 | 说明 |
|---|---|
| com.alipay.mychain.zoro | |
| com.alipay.mychain.zoro.annotation.privacy | |
| com.alipay.mychain.zoro.tools |
| 限定符和类型 | 方法和说明 |
|---|---|
static List<String> |
ZoroAPI.decrypt(List<String> ciphertextList,
String envelop,
byte[] keyName,
byte[] password)
Returns an list of plaintext string which is decrypted from ciphertextList.
|
static String |
ZoroAPI.decrypt(String ciphertext,
String envelop,
byte[] keyName,
byte[] password)
Returns an plaintext string which is decrypted from ciphertext.
|
static List<Note> |
ZoroAPI.decryptAndVerifyCommitment(List<String> commitmentList,
List<String> encryptedValueList,
List<String> encryptedBlindFactorList,
String envelop,
byte[] keyName,
byte[] password)
Decrypts the encrypted blind factor and value of each pedersen commitment and verify the commitment is whether matched or not.
|
static Note |
ZoroAPI.decryptAndVerifyCommitment(String commitment,
String encryptedValue,
String encryptedBlindFactor,
String envelop,
byte[] keyName,
byte[] password)
Decrypts the encrypted blind factor and value of a pedersen commitment and verify the commitment is whether matched or not.
|
static String |
ZoroAPI.ecdsaSign(byte[] message,
byte[] keyName,
byte[] password)
Returns the signature of a message.
|
static boolean |
ZoroAPI.ecdsaverify(ECPublicKey pubkey,
byte[] message,
String signature)
Verify the signature based on public key and message.
|
static String |
ZoroAPI.generateBlindFactor()
Return a 32-bytes blind factor encoded by Base64
|
static void |
ZoroAPI.initZoroCryptoSpi(CryptoServiceSpi cryptoServiceSpi) |
static void |
ZoroAPI.initZoroKeyManagementSpi(KeyManagementSpi keyManagementSpi) |
static String |
ZoroAPI.mapPlainToPrivacy(Object obj)
Returns an json string which is encrypted from obj.
|
static <T> T |
ZoroAPI.mapPlainToPrivacy(Object obj,
Class<T> clazz)
Returns an encrypted object which is encrypted from obj.
|
static <T> T |
ZoroAPI.mapPlainToPrivacyIndirectly(Object obj,
Class<T> clazz)
Returns an encrypted object which is encrypted from obj.
|
static <T> T |
ZoroAPI.mapPrivacyToPlain(Object obj,
Class<T> clazz,
String selfId,
byte[] keyName,
byte[] password)
Returns an plaintext object which is decrypted from obj.
|
static boolean |
ZoroAPI.verifyCommitment(String commitment,
String blindFactor,
long value)
Verify commitment is correct with plain blind factor and plain value.
|
static Note |
ZoroAPI.verifyCommitmentChange(String pc,
String blindFactor,
long value,
byte[] keyName,
byte[] password,
List<? extends EncryptedTuple> positiveTuples,
List<? extends EncryptedTuple> negativeTuples) |
static Note |
ZoroAPI.verifyCommitmentChange(String pc,
String blindFactor,
long value,
List<? extends PlainTuple> positiveTuples,
List<? extends PlainTuple> negativeTuples)
verify commitment change and accumulate blind factor and value
|
| 限定符和类型 | 方法和说明 |
|---|---|
static Node |
ObjectTreeBuilder.buildObjectTree(Object obj) |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
ZoroTool.blindFactorAdd(String firstBlindFactor,
String secondBlindFactor) |
static String |
ZoroTool.blindFactorSub(String firstBlindFactor,
String secondBlindFactor) |
static String |
ZoroTool.generateBlindFactor() |
static String |
ZoroTool.generateProof(String[] blindFactors,
long[] values) |
static String |
ZoroTool.generateProof(String blindFactor,
long value) |
static boolean |
ZoroTool.isTwoPedersenCommitmentEqual(String firstCommitment,
String secondCommitment) |
static String |
ZoroTool.pedersenCommitment(String blindFactor,
long value) |
static String |
ZoroTool.pedersenCommitmentAdd(String firstCommitment,
String secondCommitment) |
static String |
ZoroTool.pedersenCommitmentSub(String firstCommitment,
String secondCommitment) |
static boolean |
ZoroTool.verifyProof(String proof,
String[] commitments) |
Copyright © 2022. All rights reserved.