File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
adapters/sp1/groth16-verifier/src/types Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ pub(crate) const G2_COMPRESSED_SIZE: usize = FQ_SIZE * 2;
4747pub ( crate ) const G2_UNCOMPRESSED_SIZE : usize = G2_COMPRESSED_SIZE * 2 ;
4848
4949// Groth16 Proof size constants
50- /// Size of a GNARK-compressed Groth16 proof in bytes (32 + 64 + 64 )
50+ /// Size of a GNARK-compressed Groth16 proof in bytes (32 + 64 + 32 )
5151pub const GROTH16_PROOF_COMPRESSED_SIZE : usize =
5252 G1_COMPRESSED_SIZE + G2_COMPRESSED_SIZE + G1_COMPRESSED_SIZE ;
5353
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ impl Groth16Proof {
5151 Ok ( Groth16Proof { ar, bs, krs } )
5252 }
5353
54- /// Deserialize from GNARK-compressed bytes (160 bytes).
54+ /// Deserialize from GNARK-compressed bytes (128 bytes).
5555 pub fn from_gnark_compressed_bytes ( bytes : & [ u8 ] ) -> Result < Self , Groth16Error > {
5656 if bytes. len ( ) != GROTH16_PROOF_COMPRESSED_SIZE {
5757 return Err ( Groth16Error :: Serialization (
@@ -75,14 +75,14 @@ impl Groth16Proof {
7575 Ok ( Groth16Proof { ar, bs, krs } )
7676 }
7777
78- /// Serialize to GNARK-compressed bytes (160 bytes: 32 + 64 + 64 ).
78+ /// Serialize to GNARK-compressed bytes (128 bytes: 32 + 64 + 32 ).
7979 ///
8080 /// Uses the GNARK compression scheme.
8181 ///
8282 /// Layout:
8383 /// - bytes 0..32: GNARK-compressed G1 point `A·R`
8484 /// - bytes 32..96: GNARK-compressed G2 point `B·S`
85- /// - bytes 96..160 : GNARK-compressed G1 point `K·R·S`
85+ /// - bytes 96..128 : GNARK-compressed G1 point `K·R·S`
8686 ///
8787 /// Note: This is more compact than GNARK's uncompressed format (256 bytes).
8888 pub fn to_gnark_compressed_bytes ( & self ) -> [ u8 ; GROTH16_PROOF_COMPRESSED_SIZE ] {
You can’t perform that action at this time.
0 commit comments