aboutsummaryrefslogtreecommitdiffstats
path: root/include/bls
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2018-08-26 10:32:13 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2018-08-26 10:32:13 +0800
commit1fea3145f1a595de561527888ffc961bdf7907af (patch)
treed358f462341d42cdca38db35ae8ee2b0577d8737 /include/bls
parent06a8ffae438a61552555ffff930bb92e80398f2b (diff)
downloaddexon-bls-1fea3145f1a595de561527888ffc961bdf7907af.tar
dexon-bls-1fea3145f1a595de561527888ffc961bdf7907af.tar.gz
dexon-bls-1fea3145f1a595de561527888ffc961bdf7907af.tar.bz2
dexon-bls-1fea3145f1a595de561527888ffc961bdf7907af.tar.lz
dexon-bls-1fea3145f1a595de561527888ffc961bdf7907af.tar.xz
dexon-bls-1fea3145f1a595de561527888ffc961bdf7907af.tar.zst
dexon-bls-1fea3145f1a595de561527888ffc961bdf7907af.zip
add verifyOrder
Diffstat (limited to 'include/bls')
-rw-r--r--include/bls/bls.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/bls/bls.h b/include/bls/bls.h
index 0592b95..7188097 100644
--- a/include/bls/bls.h
+++ b/include/bls/bls.h
@@ -108,6 +108,18 @@ BLS_DLL_API void blsSecretKeyAdd(blsSecretKey *sec, const blsSecretKey *rhs);
BLS_DLL_API void blsPublicKeyAdd(blsPublicKey *pub, const blsPublicKey *rhs);
BLS_DLL_API void blsSignatureAdd(blsSignature *sig, const blsSignature *rhs);
+/*
+ verify whether a point of an elliptic curve has order r
+ This api affetcs setStr(), deserialize() for G2 on BN or G1/G2 on BLS12
+ @param doVerify [in] does not verify if zero(default 1)
+ Signature = G1, PublicKey = G2
+*/
+BLS_DLL_API void blsSignatureVerifyOrder(int doVerify);
+BLS_DLL_API void blsPublicKeyVerifyOrder(int doVerify);
+// deserialize under VerifyOrder(true) = deserialize under VerifyOrder(false) + IsValidOrder
+BLS_DLL_API int blsSignatureIsValidOrder(const blsSignature *sig);
+BLS_DLL_API int blsPublicKeyIsValidOrder(const blsPublicKey *pub);
+
#ifndef BLS_MINIMUM_API
// not thread safe version (old blsInit)