diff options
author | MITSUNARI Shigeo <herumi@nifty.com> | 2018-12-02 16:31:52 +0800 |
---|---|---|
committer | MITSUNARI Shigeo <herumi@nifty.com> | 2018-12-02 16:31:52 +0800 |
commit | b94e7aa9a6e3c38717e99825a1f5b2f6b5d04328 (patch) | |
tree | eadfc6301836d767086e95fd88ee508542718954 /include/bls | |
parent | 75cc396b57a31336f44f104116456b7450a5b0b9 (diff) | |
download | dexon-bls-b94e7aa9a6e3c38717e99825a1f5b2f6b5d04328.tar dexon-bls-b94e7aa9a6e3c38717e99825a1f5b2f6b5d04328.tar.gz dexon-bls-b94e7aa9a6e3c38717e99825a1f5b2f6b5d04328.tar.bz2 dexon-bls-b94e7aa9a6e3c38717e99825a1f5b2f6b5d04328.tar.lz dexon-bls-b94e7aa9a6e3c38717e99825a1f5b2f6b5d04328.tar.xz dexon-bls-b94e7aa9a6e3c38717e99825a1f5b2f6b5d04328.tar.zst dexon-bls-b94e7aa9a6e3c38717e99825a1f5b2f6b5d04328.zip |
swap_g
Diffstat (limited to 'include/bls')
-rw-r--r-- | include/bls/bls.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/bls/bls.h b/include/bls/bls.h index 48ad855..33d054f 100644 --- a/include/bls/bls.h +++ b/include/bls/bls.h @@ -46,11 +46,19 @@ typedef struct { } blsSecretKey; typedef struct { +#ifdef BLS_SWAP_G + mclBnG1 v; +#else mclBnG2 v; +#endif } blsPublicKey; typedef struct { +#ifdef BLS_SWAP_G + mclBnG2 v; +#else mclBnG1 v; +#endif } blsSignature; /* @@ -162,8 +170,13 @@ BLS_DLL_API int blsGetG1ByteSize(void); // return bytes for serialized Fr BLS_DLL_API int blsGetFrByteSize(void); +#ifdef BLS_SWAP_G +// get a generator of G1 +BLS_DLL_API void blsGetGeneratorOfG1(blsPublicKey *pub); +#else // get a generator of G2 BLS_DLL_API void blsGetGeneratorOfG2(blsPublicKey *pub); +#endif // return 0 if success BLS_DLL_API int blsIdSetDecStr(blsId *id, const char *buf, mclSize bufSize); |