Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/vm/contracts.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion crypto/bls12381/fp2.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion crypto/bls12381/g2.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down