public class BulletProof extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
BLIND_SIZE |
static int |
COMMIT_SIZE |
static int |
MAX_PROOF_COMMITS |
| 构造器和说明 |
|---|
BulletProof() |
| 限定符和类型 | 方法和说明 |
|---|---|
static byte[] |
addBlindFactors(ArrayList<byte[]> posBlindList,
ArrayList<byte[]> negBlindList) |
static byte[] |
addCommits(ArrayList<byte[]> posCommits,
ArrayList<byte[]> negCommits) |
static byte[] |
generateBlindFactor() |
static byte[] |
generateCommit(byte[] blind,
long value) |
static byte[] |
generateProof(ArrayList<byte[]> blindlist,
long[] values) |
static byte[] |
generateProof(byte[] blind,
long value) |
static boolean |
isCommitsSumZero(ArrayList<byte[]> posCommits,
ArrayList<byte[]> negCommits) |
static boolean |
verifyCommit(byte[] commit,
byte[] blind,
long value) |
static boolean |
verifyProof(byte[] proof,
ArrayList<byte[]> commitlist) |
static boolean |
verifyProof(byte[] proof,
byte[] commit) |
public static final int BLIND_SIZE
public static final int COMMIT_SIZE
public static final int MAX_PROOF_COMMITS
public static byte[] generateBlindFactor()
throws CryptoException
CryptoExceptionpublic static byte[] addBlindFactors(ArrayList<byte[]> posBlindList, ArrayList<byte[]> negBlindList) throws CryptoException
posBlindList - the postive blind factor listnegBlindList - the negtive blind factor listCryptoExceptionpublic static byte[] generateCommit(byte[] blind,
long value)
throws CryptoException
blind - the blind factorvalue - the valueCryptoExceptionpublic static boolean verifyCommit(byte[] commit,
byte[] blind,
long value)
throws CryptoException
commit - the commit valueblind - the blind factorvalue - the valueCryptoExceptionpublic static boolean isCommitsSumZero(ArrayList<byte[]> posCommits, ArrayList<byte[]> negCommits) throws CryptoException
posCommits - the postive commit listnegCommits - the negtive commit listCryptoExceptionpublic static byte[] addCommits(ArrayList<byte[]> posCommits, ArrayList<byte[]> negCommits) throws CryptoException
posCommits - the postive commit listnegCommits - the negtive commit listCryptoExceptionpublic static byte[] generateProof(ArrayList<byte[]> blindlist, long[] values) throws CryptoException
blindlist - the list of blind factorsvalues - the array of valuesCryptoExceptionpublic static boolean verifyProof(byte[] proof,
ArrayList<byte[]> commitlist)
throws CryptoException
proof - the bullet proofcommitlist - the list of commitsCryptoExceptionpublic static byte[] generateProof(byte[] blind,
long value)
throws CryptoException
blind - the blind factorsvalue - the valueCryptoExceptionpublic static boolean verifyProof(byte[] proof,
byte[] commit)
throws CryptoException
proof - the bullet proofcommit - the list of commitsCryptoExceptionCopyright © 2022. All rights reserved.