Skip to content

Commit 63b6e69

Browse files
authored
feat: correct curve names in error messages and vector type (#1587)
1 parent 9f5ddd4 commit 63b6e69

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

std/recursion/groth16/verifier.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ func ValueOfProof[G1El algebra.G1ElementT, G2El algebra.G2ElementT](proof groth1
129129
case *Proof[sw_bw6761.G1Affine, sw_bw6761.G2Affine]:
130130
tProof, ok := proof.(*groth16backend_bw6761.Proof)
131131
if !ok {
132-
return ret, fmt.Errorf("expected bls24315.Proof, got %T", proof)
132+
return ret, fmt.Errorf("expected bw6761.Proof, got %T", proof)
133133
}
134134
ar.Ar = sw_bw6761.NewG1Affine(tProof.Ar)
135135
ar.Krs = sw_bw6761.NewG1Affine(tProof.Krs)
@@ -222,7 +222,7 @@ func ValueOfVerifyingKey[G1El algebra.G1ElementT, G2El algebra.G2ElementT, GtEl
222222
case *VerifyingKey[sw_bls12377.G1Affine, sw_bls12377.G2Affine, sw_bls12377.GT]:
223223
tVk, ok := vk.(*groth16backend_bls12377.VerifyingKey)
224224
if !ok {
225-
return ret, fmt.Errorf("expected bn254.VerifyingKey, got %T", vk)
225+
return ret, fmt.Errorf("expected bls12377.VerifyingKey, got %T", vk)
226226
}
227227
// compute E
228228
e, err := bls12377.Pair([]bls12377.G1Affine{tVk.G1.Alpha}, []bls12377.G2Affine{tVk.G2.Beta})
@@ -278,7 +278,7 @@ func ValueOfVerifyingKey[G1El algebra.G1ElementT, G2El algebra.G2ElementT, GtEl
278278
case *VerifyingKey[sw_bls24315.G1Affine, sw_bls24315.G2Affine, sw_bls24315.GT]:
279279
tVk, ok := vk.(*groth16backend_bls24315.VerifyingKey)
280280
if !ok {
281-
return ret, fmt.Errorf("expected bls12381.VerifyingKey, got %T", vk)
281+
return ret, fmt.Errorf("expected bls24315.VerifyingKey, got %T", vk)
282282
}
283283
// compute E
284284
e, err := bls24315.Pair([]bls24315.G1Affine{tVk.G1.Alpha}, []bls24315.G2Affine{tVk.G2.Beta})
@@ -374,7 +374,7 @@ func ValueOfVerifyingKeyFixed[G1El algebra.G1ElementT, G2El algebra.G2ElementT,
374374
case *VerifyingKey[sw_bls12377.G1Affine, sw_bls12377.G2Affine, sw_bls12377.GT]:
375375
tVk, ok := vk.(*groth16backend_bls12377.VerifyingKey)
376376
if !ok {
377-
return ret, fmt.Errorf("expected bn254.VerifyingKey, got %T", vk)
377+
return ret, fmt.Errorf("expected bls12377.VerifyingKey, got %T", vk)
378378
}
379379
// compute E
380380
e, err := bls12377.Pair([]bls12377.G1Affine{tVk.G1.Alpha}, []bls12377.G2Affine{tVk.G2.Beta})
@@ -430,7 +430,7 @@ func ValueOfVerifyingKeyFixed[G1El algebra.G1ElementT, G2El algebra.G2ElementT,
430430
case *VerifyingKey[sw_bls24315.G1Affine, sw_bls24315.G2Affine, sw_bls24315.GT]:
431431
tVk, ok := vk.(*groth16backend_bls24315.VerifyingKey)
432432
if !ok {
433-
return ret, fmt.Errorf("expected bls12381.VerifyingKey, got %T", vk)
433+
return ret, fmt.Errorf("expected bls24315.VerifyingKey, got %T", vk)
434434
}
435435
// compute E
436436
e, err := bls24315.Pair([]bls24315.G1Affine{tVk.G1.Alpha}, []bls24315.G2Affine{tVk.G2.Beta})
@@ -554,7 +554,7 @@ func ValueOfWitness[FR emulated.FieldParams](w witness.Witness) (Witness[FR], er
554554
case *Witness[sw_bw6761.ScalarField]:
555555
vect, ok := vec.(fr_bw6761.Vector)
556556
if !ok {
557-
return ret, fmt.Errorf("expected fr_bls24315.Vector, got %T", vec)
557+
return ret, fmt.Errorf("expected fr_bw6761.Vector, got %T", vec)
558558
}
559559
for i := range vect {
560560
s.Public = append(s.Public, sw_bw6761.NewScalar(vect[i]))

0 commit comments

Comments
 (0)