@@ -89,14 +89,14 @@ where
8989 /// - The prover state (random nonces and witness) used to compute the response.
9090 ///
9191 /// # Errors
92- /// -`ProofError::Other ` if the witness vector length is incorrect.
92+ /// -`ProofError::ProofSizeMismatch ` if the witness vector length is incorrect.
9393 fn prover_commit (
9494 & self ,
9595 witness : & Self :: Witness ,
9696 mut rng : & mut ( impl RngCore + CryptoRng ) ,
9797 ) -> Result < ( Self :: Commitment , Self :: ProverState ) , ProofError > {
9898 if witness. len ( ) != self . scalars_nb ( ) {
99- return Err ( ProofError :: Other ) ;
99+ return Err ( ProofError :: ProofSizeMismatch ) ;
100100 }
101101
102102 let nonces: Vec < G :: Scalar > = ( 0 ..self . scalars_nb ( ) )
@@ -117,14 +117,14 @@ where
117117 /// - A vector of scalars forming the prover's response.
118118 ///
119119 /// # Errors
120- /// - Returns `ProofError::Other ` if the prover state vectors have incorrect lengths.
120+ /// - Returns `ProofError::ProofSizeMismatch ` if the prover state vectors have incorrect lengths.
121121 fn prover_response (
122122 & self ,
123123 state : Self :: ProverState ,
124124 challenge : & Self :: Challenge ,
125125 ) -> Result < Self :: Response , ProofError > {
126126 if state. 0 . len ( ) != self . scalars_nb ( ) || state. 1 . len ( ) != self . scalars_nb ( ) {
127- return Err ( ProofError :: Other ) ;
127+ return Err ( ProofError :: ProofSizeMismatch ) ;
128128 }
129129
130130 let mut responses = Vec :: new ( ) ;
@@ -143,20 +143,20 @@ where
143143 /// # Returns
144144 /// - `Ok(())` if the proof is valid.
145145 /// - `Err(ProofError::VerificationFailure)` if the proof is invalid.
146- /// - `Err(ProofError::Other )` if the lengths of commitment or response do not match the expected counts.
146+ /// - `Err(ProofError::ProofSizeMismatch )` if the lengths of commitment or response do not match the expected counts.
147147 ///
148148 /// # Errors
149149 /// -`Err(ProofError::VerificationFailure)` if the computed relation
150150 /// does not hold for the provided challenge and response, indicating proof invalidity.
151- /// -`Err(ProofError::Other )` if the commitment or response length is incorrect.
151+ /// -`Err(ProofError::ProofSizeMismatch )` if the commitment or response length is incorrect.
152152 fn verifier (
153153 & self ,
154154 commitment : & Self :: Commitment ,
155155 challenge : & Self :: Challenge ,
156156 response : & Self :: Response ,
157157 ) -> Result < ( ) , ProofError > {
158158 if commitment. len ( ) != self . statements_nb ( ) || response. len ( ) != self . scalars_nb ( ) {
159- return Err ( ProofError :: Other ) ;
159+ return Err ( ProofError :: ProofSizeMismatch ) ;
160160 }
161161
162162 let lhs = self . evaluate ( response) ;
@@ -181,7 +181,7 @@ where
181181 /// - A byte vector representing the serialized batchable proof.
182182 ///
183183 /// # Errors
184- /// - `ProofError::Other ` if the commitment or response length is incorrect.
184+ /// - `ProofError::ProofSizeMismatch ` if the commitment or response length is incorrect.
185185 fn serialize_batchable (
186186 & self ,
187187 commitment : & Self :: Commitment ,
@@ -191,7 +191,7 @@ where
191191 let commit_nb = self . statements_nb ( ) ;
192192 let response_nb = self . scalars_nb ( ) ;
193193 if commitment. len ( ) != commit_nb || response. len ( ) != response_nb {
194- return Err ( ProofError :: Other ) ;
194+ return Err ( ProofError :: ProofSizeMismatch ) ;
195195 }
196196
197197 let mut bytes = Vec :: new ( ) ;
@@ -278,14 +278,14 @@ where
278278 /// - A vector of group elements representing the recomputed commitment (one per linear constraint).
279279 ///
280280 /// # Errors
281- /// - `ProofError::Other ` if the response length does not match the expected number of scalars.
281+ /// - `ProofError::ProofSizeMismatch ` if the response length does not match the expected number of scalars.
282282 fn get_commitment (
283283 & self ,
284284 challenge : & Self :: Challenge ,
285285 response : & Self :: Response ,
286286 ) -> Result < Self :: Commitment , ProofError > {
287287 if response. len ( ) != self . scalars_nb ( ) {
288- return Err ( ProofError :: Other ) ;
288+ return Err ( ProofError :: ProofSizeMismatch ) ;
289289 }
290290
291291 let response_image = self . evaluate ( response) ;
@@ -308,7 +308,7 @@ where
308308 /// - A byte vector representing the compact proof.
309309 ///
310310 /// # Errors
311- /// - `ProofError::Other ` if the response length does not match the expected number of scalars.
311+ /// - `ProofError::ProofSizeMismatch ` if the response length does not match the expected number of scalars.
312312 fn serialize_compact (
313313 & self ,
314314 _commitment : & Self :: Commitment ,
@@ -318,7 +318,7 @@ where
318318 let mut bytes = Vec :: new ( ) ;
319319 let response_nb = self . scalars_nb ( ) ;
320320 if response. len ( ) != response_nb {
321- return Err ( ProofError :: Other ) ;
321+ return Err ( ProofError :: ProofSizeMismatch ) ;
322322 }
323323
324324 // Serialize challenge
0 commit comments