Releases: drand/kyber-bls12381
v0.3.0: Breaking changes to some public APIs
BREAKING: Adding ways to specify a DST in Hash (#23)
- Adding ways to specify a DST in the point's Hash methods
- Using same API for G1 and G2
- Adding a new Suite constructor with specific DST
- Using variadic args to not break the existing public APIs
The breaking change is that now the "Domain" global variable no longer exists and that we are now using the correct DST by default for Hash To Curve on G1 instead of wrongly using the DST for G2 as well.
Instead you can specify your domains using the NewBLS12381SuiteWithDST
method or by calling SetDomainG1
and SetDomainG2
on an existing Suite
. Example to instantiate a Suite using the G2 default DST on both groups (which is what we were doing by mistake prior to this release):
suite := NewBLS12381SuiteWithDST(DefaultDomainG2(), nil)
Furthermore now the NewGroupG1
and NewGroupG2
function accept a variadic byte array, if this is non-zero it will be used as the DST for that group.
Example usage to instantiate a G1 group using the DST of G2:
dst := []byte("BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_NUL_")
NullKyberG1(dst...)
What's Changed
- Adding ways to specify a DST in Hash by @AnomalRoil in #23
Full Changelog: v0.2.6...v0.3.0