diff options
author | MITSUNARI Shigeo <herumi@nifty.com> | 2017-06-12 04:01:50 +0800 |
---|---|---|
committer | MITSUNARI Shigeo <herumi@nifty.com> | 2017-06-12 04:01:50 +0800 |
commit | 323c2e718a997fd05a87d52efa29431d4827f251 (patch) | |
tree | 6804c6a18b14f68c6a6e28ab6638ca1a8463991e | |
parent | 55c8bb26a38b21418335e249d7d1a301e0029309 (diff) | |
download | dexon-bls-323c2e718a997fd05a87d52efa29431d4827f251.tar dexon-bls-323c2e718a997fd05a87d52efa29431d4827f251.tar.gz dexon-bls-323c2e718a997fd05a87d52efa29431d4827f251.tar.bz2 dexon-bls-323c2e718a997fd05a87d52efa29431d4827f251.tar.lz dexon-bls-323c2e718a997fd05a87d52efa29431d4827f251.tar.xz dexon-bls-323c2e718a997fd05a87d52efa29431d4827f251.tar.zst dexon-bls-323c2e718a997fd05a87d52efa29431d4827f251.zip |
add blsGetGeneratorOfG2
-rw-r--r-- | include/bls/bls.h | 3 | ||||
-rw-r--r-- | src/bls_c.cpp | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/include/bls/bls.h b/include/bls/bls.h index 97bd5e7..6d40a2d 100644 --- a/include/bls/bls.h +++ b/include/bls/bls.h @@ -56,6 +56,9 @@ BLS_DLL_API size_t blsGetOpUnitSize(void); BLS_DLL_API int blsGetCurveOrder(char *buf, size_t maxBufSize); BLS_DLL_API int blsGetFieldOrder(char *buf, size_t maxBufSize); +// get a generator of G2 +BLS_DLL_API void blsGetGeneratorOfG2(blsPublicKey *pub); + BLS_DLL_API void blsIdSetInt(blsId *id, int x); // return 0 if success BLS_DLL_API int blsIdSetDecStr(blsId *id, const char *buf, size_t bufSize); diff --git a/src/bls_c.cpp b/src/bls_c.cpp index a6c24e2..4bac71d 100644 --- a/src/bls_c.cpp +++ b/src/bls_c.cpp @@ -712,6 +712,10 @@ int blsGetFieldOrder(char *buf, size_t maxBufSize) return 0; } +void blsGetGeneratorOfG2(blsPublicKey *pub) +{ + *(G2*)pub = bls2::getQ(); +} void blsGetPublicKey(blsPublicKey *pub, const blsSecretKey *sec) { |