Closed aguycalled closed 1 year ago
Your code must be compiled with -DBLS_ETH=1
. How about append #define BLS_ETH 1
before including bls/bls384_256.h
?
And you don't have to include bls.h
, which is included from bls384_256.h
.
I observed that when BLS_ETH=1
is set, calling mclBnG1_hashAndMapTo
is no longer equivalent of calling mclBnFp_setHashOf
and mclBnFp_mapToG1
because BN::param.mapTo.mapTo_WB19_.msgToG1
is called instead of setHashOf
and mapToG1
since the mode is set to MCL_MAP_TO_MODE_HASH_TO_CURVE_07
.
Is this expected behavior?
Yes. Those codes are very complicated for historical reasons and backward compatibility.
If you want Ethereum compatibility, then use hashAndMapToG1
instead of setHashOf/mapToG1.
Thank you for the confirmation. Regarding the blsInit
issue, it was resolved following your suggestion.
The issue disappears when building with simple
make
withoutBLS_ETH=1
.