add version

pull/2/head
MITSUNARI Shigeo 6 years ago
parent 497fa07d29
commit 4ae8bc289c
  1. 2
      include/mcl/bn.h
  2. 5
      include/mcl/impl/bn_c_impl.hpp
  3. 2
      include/mcl/op.hpp
  4. 1
      readme.md
  5. 1
      test/bn_test.cpp

@ -112,6 +112,8 @@ enum {
mclBls12_CurveFp381 = 5
};
// return 0xABC which means A.BC
MCLBN_DLL_API int mclBn_getVersion();
/*
init library
@param curve [in] type of bn curve

@ -60,6 +60,11 @@ extern "C" MCLBN_DLL_API void mclBnFree(void *p)
}
#endif
int mclBn_getVersion()
{
return mcl::version;
}
int mclBn_init(int curve, int compiledTimeVar)
{
if (compiledTimeVar != MCLBN_COMPILED_TIME_VAR) {

@ -26,6 +26,8 @@
namespace mcl {
static const int version = 0x090; /* 0xABC = A.BC */
/*
specifies available string format mode for X::setIoMode()
// for Fp, Fp2, Fp6, Fp12

@ -443,6 +443,7 @@ Y. Sakemi, Y. Nogami, K. Okeya, Y. Morikawa, CANS 2008.
# History
* 2019/Mar/12 v0.90 fix Vint::setArray(x) for x == this
* 2019/Mar/07 add mclBnFr_setLittleEndianMod, mclBnFp_setLittleEndianMod
* 2019/Feb/20 LagrangeInterpolation sets out = yVec[0] if k = 1
* 2019/Jan/31 add mclBnFp_mapToG1, mclBnFp2_mapToG2

@ -352,6 +352,7 @@ void testIo(const G1& P, const G2& Q)
CYBOZU_TEST_AUTO(naive)
{
printf("mcl version=%03x\n", mcl::version);
for (size_t i = 0; i < CYBOZU_NUM_OF_ARRAY(g_testSetTbl); i++) {
const TestSet& ts = g_testSetTbl[i];
printf("i=%d curve=%s\n", int(i), ts.name);

Loading…
Cancel
Save