diff options
author | MITSUNARI Shigeo <herumi@nifty.com> | 2018-08-26 10:32:13 +0800 |
---|---|---|
committer | MITSUNARI Shigeo <herumi@nifty.com> | 2018-08-26 10:32:13 +0800 |
commit | 1fea3145f1a595de561527888ffc961bdf7907af (patch) | |
tree | d358f462341d42cdca38db35ae8ee2b0577d8737 /include | |
parent | 06a8ffae438a61552555ffff930bb92e80398f2b (diff) | |
download | dexon-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')
-rw-r--r-- | include/bls/bls.h | 12 |
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) |