aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2017-06-12 05:08:02 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2017-06-12 05:08:02 +0800
commit8960a3bfc70931637b79ec53ab5645f56cc7d1a3 (patch)
treec9b7f0b7f9f8adc33b739c850657571be74ae39b /include
parent1588e7db5b770970fd7cf066a40b2832c9a1172b (diff)
downloaddexon-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')
-rw-r--r--include/bls/bls.h8
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