diff options
author | MITSUNARI Shigeo <herumi@nifty.com> | 2017-06-12 05:08:02 +0800 |
---|---|---|
committer | MITSUNARI Shigeo <herumi@nifty.com> | 2017-06-12 05:08:02 +0800 |
commit | 8960a3bfc70931637b79ec53ab5645f56cc7d1a3 (patch) | |
tree | c9b7f0b7f9f8adc33b739c850657571be74ae39b /include/bls | |
parent | 1588e7db5b770970fd7cf066a40b2832c9a1172b (diff) | |
download | dexon-bls-8960a3bfc70931637b79ec53ab5645f56cc7d1a3.tar dexon-bls-8960a3bfc70931637b79ec53ab5645f56cc7d1a3.tar.gz dexon-bls-8960a3bfc70931637b79ec53ab5645f56cc7d1a3.tar.bz2 dexon-bls-8960a3bfc70931637b79ec53ab5645f56cc7d1a3.tar.lz dexon-bls-8960a3bfc70931637b79ec53ab5645f56cc7d1a3.tar.xz dexon-bls-8960a3bfc70931637b79ec53ab5645f56cc7d1a3.tar.zst dexon-bls-8960a3bfc70931637b79ec53ab5645f56cc7d1a3.zip |
refactor recovering
Diffstat (limited to 'include/bls')
-rw-r--r-- | include/bls/bls.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/bls/bls.h b/include/bls/bls.h index 6d40a2d..ef5f24f 100644 --- a/include/bls/bls.h +++ b/include/bls/bls.h @@ -121,6 +121,14 @@ BLS_DLL_API void blsSign(blsSignature *sig, const blsSecretKey *sec, const char BLS_DLL_API int blsVerify(const blsSignature *sig, const blsPublicKey *pub, const char *m, size_t size); BLS_DLL_API int blsVerifyPop(const blsSignature *sig, const blsPublicKey *pub); +/* + recover out = y(0) by { (xVec[i], yVec[i]) } + return 0 if success else -1 +*/ +BLS_DLL_API int mclBn_FrLagrangeInterpolation(mclBnFr *out, const mclBnFr *yVec, const mclBnFr *xVec, size_t k); +BLS_DLL_API int mclBn_G1LagrangeInterpolation(mclBnG1 *out, const mclBnG1 *yVec, const mclBnFr *xVec, size_t k); +BLS_DLL_API int mclBn_G2LagrangeInterpolation(mclBnG2 *out, const mclBnG2 *yVec, const mclBnFr *xVec, size_t k); + ////////////////////////////////////////////////////////////////////////// // the following apis will be removed |