From 1fea3145f1a595de561527888ffc961bdf7907af Mon Sep 17 00:00:00 2001 From: MITSUNARI Shigeo Date: Sun, 26 Aug 2018 11:32:13 +0900 Subject: add verifyOrder --- include/bls/bls.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/bls') 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) -- cgit v1.2.3