diff --git a/pairing/bls12381/circl/g1.go b/pairing/bls12381/circl/g1.go index 3916bfffb..3f21a5741 100644 --- a/pairing/bls12381/circl/g1.go +++ b/pairing/bls12381/circl/g1.go @@ -97,5 +97,7 @@ func (p *G1Elt) Mul(s kyber.Scalar, q kyber.Point) kyber.Point { func (p *G1Elt) IsInCorrectGroup() bool { return p.inner.IsOnG1() } -func (p *G1Elt) Hash(msg []byte) kyber.Point { p.inner.Hash(msg, nil); return p } +var domainG1 = []byte("BLS_SIG_BLS12381G1_XMD:SHA-256_SSWU_RO_NUL_") + +func (p *G1Elt) Hash(msg []byte) kyber.Point { p.inner.Hash(msg, domainG1); return p } func (p *G1Elt) Hash2(msg, dst []byte) kyber.Point { p.inner.Hash(msg, dst); return p } diff --git a/pairing/bls12381/circl/g2.go b/pairing/bls12381/circl/g2.go index eb8d3355f..6414b4eb9 100644 --- a/pairing/bls12381/circl/g2.go +++ b/pairing/bls12381/circl/g2.go @@ -97,5 +97,7 @@ func (p *G2Elt) Mul(s kyber.Scalar, q kyber.Point) kyber.Point { func (p *G2Elt) IsInCorrectGroup() bool { return p.inner.IsOnG2() } -func (p *G2Elt) Hash(msg []byte) kyber.Point { p.inner.Hash(msg, nil); return p } +var domainG2 = []byte("BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_NUL_") + +func (p *G2Elt) Hash(msg []byte) kyber.Point { p.inner.Hash(msg, domainG2); return p } func (p *G2Elt) Hash2(msg, dst []byte) kyber.Point { p.inner.Hash(msg, dst); return p }