diff --git a/Makefile b/Makefile index 364c17e..15a9049 100644 --- a/Makefile +++ b/Makefile @@ -294,8 +294,8 @@ $(EXE_DIR)/bn_c384_256_test.exe: $(OBJ_DIR)/bn_c384_256_test.o $(BN384_256_LIB) $(EXE_DIR)/bn_c512_test.exe: $(OBJ_DIR)/bn_c512_test.o $(BN512_LIB) $(MCL_LIB) $(PRE)$(CXX) $< -o $@ $(BN512_LIB) $(MCL_LIB) $(LDFLAGS) -$(EXE_DIR)/pairing_c.exe: $(OBJ_DIR)/pairing_c.o $(BN256_LIB) $(MCL_LIB) - $(PRE)$(CC) $< -o $@ $(BN256_LIB) $(MCL_LIB) $(LDFLAGS) -lstdc++ +$(EXE_DIR)/pairing_c.exe: $(OBJ_DIR)/pairing_c.o $(BN384_256_LIB) $(MCL_LIB) + $(PRE)$(CC) $< -o $@ $(BN384_256_LIB) $(MCL_LIB) $(LDFLAGS) -lstdc++ $(EXE_DIR)/she_c256_test.exe: $(OBJ_DIR)/she_c256_test.o $(SHE256_LIB) $(MCL_LIB) $(PRE)$(CXX) $< -o $@ $(SHE256_LIB) $(MCL_LIB) $(LDFLAGS) diff --git a/sample/pairing_c.c b/sample/pairing_c.c index ac55908..a669ec7 100644 --- a/sample/pairing_c.c +++ b/sample/pairing_c.c @@ -1,7 +1,6 @@ #include #include -#define MCLBN_FP_UNIT_SIZE 4 -#include +#include int g_err = 0; #define ASSERT(x) { if (!(x)) { printf("err %s:%d\n", __FILE__, __LINE__); g_err++; } } @@ -11,7 +10,7 @@ int main() char buf[1024]; const char *aStr = "123"; const char *bStr = "456"; - int ret = mclBn_init(MCL_BN254, MCLBN_COMPILED_TIME_VAR); + int ret = mclBn_init(MCL_BLS12_381, MCLBN_COMPILED_TIME_VAR); if (ret != 0) { printf("err ret=%d\n", ret); return 1;