diff options
author | MITSUNARI Shigeo <herumi@nifty.com> | 2018-09-21 16:48:19 +0800 |
---|---|---|
committer | MITSUNARI Shigeo <herumi@nifty.com> | 2018-09-21 16:48:19 +0800 |
commit | e68b2a3fb07999ba000eccb1727c527763d56e9f (patch) | |
tree | 17afbcda0b3c98129966df965a397f1d4d2cc725 /include/bls/bls.h | |
parent | 5b33a863f08bbd60d7631bd586e00c993f8cda1e (diff) | |
download | dexon-bls-e68b2a3fb07999ba000eccb1727c527763d56e9f.tar dexon-bls-e68b2a3fb07999ba000eccb1727c527763d56e9f.tar.gz dexon-bls-e68b2a3fb07999ba000eccb1727c527763d56e9f.tar.bz2 dexon-bls-e68b2a3fb07999ba000eccb1727c527763d56e9f.tar.lz dexon-bls-e68b2a3fb07999ba000eccb1727c527763d56e9f.tar.xz dexon-bls-e68b2a3fb07999ba000eccb1727c527763d56e9f.tar.zst dexon-bls-e68b2a3fb07999ba000eccb1727c527763d56e9f.zip |
add blsVerifyAggregatedHashes
Diffstat (limited to 'include/bls/bls.h')
-rw-r--r-- | include/bls/bls.h | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/include/bls/bls.h b/include/bls/bls.h index 71e3d02..45bd839 100644 --- a/include/bls/bls.h +++ b/include/bls/bls.h @@ -124,11 +124,6 @@ BLS_DLL_API int blsPublicKeyIsValidOrder(const blsPublicKey *pub); #ifndef BLS_MINIMUM_API /* - set h to a point of G1 - return 0 if success else -1 -*/ -BLS_DLL_API int blsG1SetHash(mclBnG1 *g1, const void *h, mclSize size); -/* sign the hash use the low (bitSize of r) - 1 bit of h return 0 if success else -1 @@ -137,12 +132,14 @@ BLS_DLL_API int blsG1SetHash(mclBnG1 *g1, const void *h, mclSize size); BLS_DLL_API int blsSignHash(blsSignature *sig, const blsSecretKey *sec, const void *h, mclSize size); // return 1 if valid BLS_DLL_API int blsVerifyHash(const blsSignature *sig, const blsPublicKey *pub, const void *h, mclSize size); + /* - verify aggSig with pubVec[0, n) and g1Vec[0, n) - e(aggSig, Q) = prod_i e(g1Vec[i], pubVec[i]) + verify aggSig with pubVec[0, n) and hVec[0, n) + e(aggSig, Q) = prod_i e(hVec[i], pubVec[i]) return 1 if valid + @note do not check duplication of hVec */ -BLS_DLL_API int blsVerifyAggregation(const blsSignature *aggSig, const blsPublicKey *pubVec, const mclBnG1 *g1Vec, mclSize n); +BLS_DLL_API int blsVerifyAggregatedHashes(const blsSignature *aggSig, const blsPublicKey *pubVec, const void *hVec, size_t sizeofHash, mclSize n); // sub BLS_DLL_API void blsSecretKeySub(blsSecretKey *sec, const blsSecretKey *rhs); |