DST for hash-to-curve is changed

update-fork
MITSUNARI Shigeo 5 years ago
parent 6544951800
commit b96acf6e86
  1. 7
      include/mcl/mapto_wb19.hpp
  2. 2
      include/mcl/op.hpp
  3. 2
      readme.md

@ -701,7 +701,12 @@ struct MapToG2_WB19 {
} }
void msgToG2(G2& out, const void *msg, size_t msgSize) const void msgToG2(G2& out, const void *msg, size_t msgSize) const
{ {
const char *dst = "BLS_SIG_BLS12381G2-SHA256-SSWU-RO-_POP_"; const char *dst;
if (draftVersion_ == 5) {
dst = "BLS_SIG_BLS12381G2-SHA256-SSWU-RO-_POP_";
} else {
dst = "BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_POP_";
}
map2curve_osswu2(out, msg, msgSize, dst, strlen(dst)); map2curve_osswu2(out, msg, msgSize, dst, strlen(dst));
} }
}; };

@ -23,7 +23,7 @@
namespace mcl { namespace mcl {
static const int version = 0x106; /* 0xABC = A.BC */ static const int version = 0x107; /* 0xABC = A.BC */
/* /*
specifies available string format mode for X::setIoMode() specifies available string format mode for X::setIoMode()

@ -10,6 +10,7 @@ mcl is a library for pairing-based cryptography,
which supports the optimal Ate pairing over BN curves and BLS12-381 curves. which supports the optimal Ate pairing over BN curves and BLS12-381 curves.
# News # News
- change DST of hash-to-curve for `MCL_MAP_TO_MODE_HASH_TO_CURVE_06`.
- add new hash-to-curve function of [draft-irtf-cfrg-hash-to-curve](https://cfrg.github.io/draft-irtf-cfrg-hash-to-curve/draft-irtf-cfrg-hash-to-curve.txt) at March 2020. - add new hash-to-curve function of [draft-irtf-cfrg-hash-to-curve](https://cfrg.github.io/draft-irtf-cfrg-hash-to-curve/draft-irtf-cfrg-hash-to-curve.txt) at March 2020.
- call `setETHmode(MCL_MAP_TO_MODE_HASH_TO_CURVE_06);` - call `setETHmode(MCL_MAP_TO_MODE_HASH_TO_CURVE_06);`
- The older `MAP_TO_MODE` will be removed after the draft is fixed. - The older `MAP_TO_MODE` will be removed after the draft is fixed.
@ -295,6 +296,7 @@ If `MCL_USE_OLD_MAPTO_FOR_BLS12` is defined, then the old function is used, but
# History # History
- 2020/Mar/26 v1.07 change DST for hash-to-curve-06
- 2020/Mar/15 v1.06 support hash-to-curve-06 - 2020/Mar/15 v1.06 support hash-to-curve-06
- 2020/Jan/31 v1.05 mclBn_ethMsgToFp2 has changed to append zero byte at the end of msg - 2020/Jan/31 v1.05 mclBn_ethMsgToFp2 has changed to append zero byte at the end of msg
- 2020/Jan/25 v1.04 add new hash functions - 2020/Jan/25 v1.04 add new hash functions

Loading…
Cancel
Save