File tree Expand file tree Collapse file tree 2 files changed +2
-8
lines changed
adapters/sp1/groth16-verifier/src/types Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -149,10 +149,7 @@ pub(crate) fn uncompressed_bytes_to_affine_g1(buf: &[u8]) -> Result<AffineG1, Er
149149 let x = Fq :: from_slice ( x_bytes) . map_err ( Error :: Field ) ?;
150150 let y = Fq :: from_slice ( y_bytes) . map_err ( Error :: Field ) ?;
151151
152- // REVIEW: This avoids the subcheck group by assuming X and Y are valid, reducing cycle counts.
153- // If they are invalid the proof verification fails
154- let g1 = G1 :: new ( x, y, Fq :: one ( ) ) ;
155- AffineG1 :: from_jacobian ( g1) . ok_or ( Error :: InvalidPoint )
152+ AffineG1 :: new ( x, y) . map_err ( Error :: Group )
156153}
157154
158155/// Given an Fq element `x`, compute both possible y‐coordinates on the BN254 curve:
Original file line number Diff line number Diff line change @@ -187,10 +187,7 @@ pub(crate) fn uncompressed_bytes_to_affine_g2(buf: &[u8]) -> Result<AffineG2, Er
187187 let x = Fq2 :: new ( x0, x1) ;
188188 let y = Fq2 :: new ( y0, y1) ;
189189
190- // REVIEW: This avoids the subcheck group by assuming X and Y are valid, reducing cycle counts.
191- // If they are invalid the proof verification fails
192- let g2 = G2 :: new ( x, y, Fq2 :: one ( ) ) ;
193- AffineG2 :: from_jacobian ( g2) . ok_or ( Error :: InvalidPoint )
190+ AffineG2 :: new ( x, y) . map_err ( Error :: Group )
194191}
195192
196193/// Given an Fq2 element `x`, compute both possible y‐coordinates on the BN254 curve:
You can’t perform that action at this time.
0 commit comments