diff options
author | MITSUNARI Shigeo <herumi@nifty.com> | 2017-06-14 06:03:56 +0800 |
---|---|---|
committer | MITSUNARI Shigeo <herumi@nifty.com> | 2017-06-14 06:03:59 +0800 |
commit | 1ac8d799f2fc0bd02404118344019c568c5e6f07 (patch) | |
tree | 6e83858eda899cc55ce715613939e0caccb5e534 | |
parent | f84c000e102ed889a607a63819e305798359418a (diff) | |
download | dexon-bls-1ac8d799f2fc0bd02404118344019c568c5e6f07.tar dexon-bls-1ac8d799f2fc0bd02404118344019c568c5e6f07.tar.gz dexon-bls-1ac8d799f2fc0bd02404118344019c568c5e6f07.tar.bz2 dexon-bls-1ac8d799f2fc0bd02404118344019c568c5e6f07.tar.lz dexon-bls-1ac8d799f2fc0bd02404118344019c568c5e6f07.tar.xz dexon-bls-1ac8d799f2fc0bd02404118344019c568c5e6f07.tar.zst dexon-bls-1ac8d799f2fc0bd02404118344019c568c5e6f07.zip |
unify how to create a global parameter Q
-rw-r--r-- | src/bls_c.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/bls_c.cpp b/src/bls_c.cpp index 64ff5bc..4d96b9a 100644 --- a/src/bls_c.cpp +++ b/src/bls_c.cpp @@ -11,7 +11,7 @@ #include <bls/bls.h> /* BLS signature - e : G2 x G1 -> Fp12 + e : G1 x G2 -> Fp12 Q in G2 ; fixed global parameter H : {str} -> G1 s : secret key @@ -29,14 +29,7 @@ int blsInit(int curve, int maxUnitSize) try { if (mclBn_init(curve, maxUnitSize) != 0) return -1; - if (curve == mclBn_CurveFp254BNb) { - g_Q.set( - Fp2("12723517038133731887338407189719511622662176727675373276651903807414909099441", "4168783608814932154536427934509895782246573715297911553964171371032945126671"), - Fp2("13891744915211034074451795021214165905772212241412891944830863846330766296736", "7937318970632701341203597196594272556916396164729705624521405069090520231616") - ); - } else { - BN::mapToG2(g_Q, 1); - } + BN::mapToG2(g_Q, 1); BN::precomputeG2(g_Qcoeff, getQ()); return 0; } catch (std::exception&) { |