From 00bac9eee847543a1e2b7445ff16a6703300cec0 Mon Sep 17 00:00:00 2001 From: Sonic Date: Wed, 10 Apr 2019 16:35:20 +0800 Subject: Use the same generators of BLS12-381 with zkcrypto --- src/bls_c_impl.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/bls_c_impl.hpp b/src/bls_c_impl.hpp index b38c1ad..00d4393 100644 --- a/src/bls_c_impl.hpp +++ b/src/bls_c_impl.hpp @@ -85,7 +85,13 @@ int blsInitNotThreadSafe(int curve, int compiledTimeVar) g_Q.x.setStr(&b, Qx_BN254, 16); g_Q.y.setStr(&b, Qy_BN254, 16); g_Q.z = 1; - } else { + } else if (curve == MCL_BLS12_381) { + const char *Qx_BLS12_381 = "352701069587466618187139116011060144890029952792775240219908644239793785735715026873347600343865175952761926303160 3059144344244213709971259814753781636986470325476647558659373206291635324768958432433509563104347017837885763365758"; + const char *Qy_BLS12_381 = "1985150602287291935568054521177171638300868978215655730859378665066344726373823718423869104263333984641494340347905 927553665492332455747201965776037880757740193453592970025027978793976877002675564980949289727957565575433344219582"; + g_Q.x.setStr(&b, Qx_BLS12_381, 10); + g_Q.y.setStr(&b, Qy_BLS12_381, 10); + g_Q.z = 1; + } else { mapToG2(&b, g_Q, 1); } if (!b) return -100; -- cgit v1.2.3