Unverified Commit 55f30db0 authored by Marius van der Wijden's avatar Marius van der Wijden Committed by GitHub

core/vm, crypt/bls12381: fixed comments in bls (#21182)

* core/vm: crypto/bls12381: minor code comments

* crypto/bls12381: fix comment
parent 9d935356
......@@ -904,7 +904,7 @@ func (c *bls12381MapG1) Run(input []byte) ([]byte, error) {
return nil, err
}
// Encode the G1 point to 256 bytes
// Encode the G1 point to 128 bytes
return g.EncodePoint(r), nil
}
......
......@@ -44,7 +44,7 @@ func newFp2() *fp2 {
func (e *fp2) fromBytes(in []byte) (*fe2, error) {
if len(in) != 96 {
return nil, errors.New("input string should be larger than 96 bytes")
return nil, errors.New("length of input string should be 96 bytes")
}
c1, err := fromBytes(in[:48])
if err != nil {
......
......@@ -165,7 +165,7 @@ func (g *G2) ToBytes(p *PointG2) []byte {
return out
}
// EncodePoint encodes a point into 128 bytes.
// EncodePoint encodes a point into 256 bytes.
func (g *G2) EncodePoint(p *PointG2) []byte {
// outRaw is 96 bytes
outRaw := g.ToBytes(p)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment