test of msgToG2 for draft-07

update-fork
MITSUNARI Shigeo 5 years ago
parent eb5f51a9af
commit d5f287bcc7
  1. 23
      test/mapto_wb19_test.cpp

@ -854,9 +854,30 @@ void testHashToFp2v6(const T& mapto)
}
template<class T>
void testHashToFp2v7(const T&/* mapto*/)
void testHashToFp2v7(const T& mapto)
{
bn::setMapToMode(MCL_MAP_TO_MODE_HASH_TO_CURVE_07);
{
const char *msg = "asdf";
PointStr s = {
{
"2525875563870715639912451285996878827057943937903727288399283574780255586622124951113038778168766058972461529282986",
"3132482115871619853374334004070359337604487429071253737901486558733107203612153024147084489564256619439711974285977",
},
{
"2106640002084734620850657217129389007976098691731730501862206029008913488613958311385644530040820978748080676977912",
"2882649322619140307052211460282445786973517746532934590265600680988689024512167659295505342688129634612479405019290",
},
{
"1",
"0",
}
};
G2 P1, P2;
mapto.msgToG2(P1, msg, strlen(msg));
set(P2, s);
CYBOZU_TEST_EQUAL(P1, P2);
}
{
char msg[] = "asdf";
char dst[] = "BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_POP_";

Loading…
Cancel
Save