[she] fix the serialization size for BLS12-381

pull/2/head
MITSUNARI Shigeo 6 years ago
parent 9bc05bf641
commit 72bae9b544
  1. 4
      include/mcl/she.hpp
  2. 2
      src/she_c384_256.cpp
  3. 2
      test/she_c384_test.cpp

@ -1045,7 +1045,7 @@ private:
G2 R5, R6; G2 R5, R6;
ElGamalEnc(R4, R3, rm, Pmul, xPmul, &rp); ElGamalEnc(R4, R3, rm, Pmul, xPmul, &rp);
ElGamalEnc(R6, R5, rm, Qmul, yQmul, &rs); ElGamalEnc(R6, R5, rm, Qmul, yQmul, &rs);
char buf[sizeof(Fr) * 12]; char buf[sizeof(Fp) * 12];
cybozu::MemoryOutputStream os(buf, sizeof(buf)); cybozu::MemoryOutputStream os(buf, sizeof(buf));
S1.save(os); S1.save(os);
T1.save(os); T1.save(os);
@ -1105,7 +1105,7 @@ private:
R5 -= X2; R5 -= X2;
G2::mul(X2, S2, c); G2::mul(X2, S2, c);
R6 -= X2; R6 -= X2;
char buf[sizeof(Fr) * 12]; char buf[sizeof(Fp) * 12];
cybozu::MemoryOutputStream os(buf, sizeof(buf)); cybozu::MemoryOutputStream os(buf, sizeof(buf));
S1.save(os); S1.save(os);
T1.save(os); T1.save(os);

@ -0,0 +1,2 @@
#include <mcl/bn_c384_256.h>
#include "she_c_impl.hpp"

@ -1,2 +1,2 @@
#define MCLBN_FP_UNIT_SIZE 6 #include <mcl/bn_c384.h>
#include "she_c_test.hpp" #include "she_c_test.hpp"

Loading…
Cancel
Save