native: fix error message on unexpected BLS12-381 curve point
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
This commit is contained in:
parent
b5a75b1485
commit
a2d28272ef
1 changed files with 2 additions and 2 deletions
|
@ -272,7 +272,7 @@ func blsPointPairing(a, b blsPoint) (blsPoint, error) {
|
|||
x = new(bls12381.G1Affine)
|
||||
x.FromJacobian(p)
|
||||
default:
|
||||
return blsPoint{}, fmt.Errorf("pairing: unexpected bls12381 point type (g1): %T", x)
|
||||
return blsPoint{}, fmt.Errorf("pairing: unexpected bls12381 point type (g1): %T", p)
|
||||
}
|
||||
switch p := b.point.(type) {
|
||||
case *bls12381.G2Affine:
|
||||
|
@ -281,7 +281,7 @@ func blsPointPairing(a, b blsPoint) (blsPoint, error) {
|
|||
y = new(bls12381.G2Affine)
|
||||
y.FromJacobian(p)
|
||||
default:
|
||||
return blsPoint{}, fmt.Errorf("pairing: unexpected bls12381 point type (g2): %T", x)
|
||||
return blsPoint{}, fmt.Errorf("pairing: unexpected bls12381 point type (g2): %T", p)
|
||||
}
|
||||
|
||||
gt, err := bls12381.Pair([]bls12381.G1Affine{*x}, []bls12381.G2Affine{*y})
|
||||
|
|
Loading…
Reference in a new issue