@@ -255,7 +255,7 @@ impl<G: Group, H: BlockSizeUser + Digest + FixedOutputReset> NonVerifiableClient
255255 evaluation_element : & EvaluationElement < G , H > ,
256256 metadata : Option < & [ u8 ] > ,
257257 ) -> Result < Output < H > > {
258- let unblinded_element = evaluation_element. value * & G :: scalar_invert ( & self . blind ) ;
258+ let unblinded_element = evaluation_element. value * & G :: invert_scalar ( self . blind ) ;
259259 let mut outputs = finalize_after_unblind :: < G , H , _ , _ > (
260260 Some ( ( input, unblinded_element) ) . into_iter ( ) ,
261261 metadata. unwrap_or_default ( ) ,
@@ -459,7 +459,7 @@ impl<G: Group, H: BlockSizeUser + Digest + FixedOutputReset> NonVerifiableServer
459459 GenericArray :: from ( STR_HASH_TO_SCALAR ) . concat ( get_context_string :: < G > ( Mode :: Base ) ) ;
460460 let m = G :: hash_to_scalar :: < H , _ , _ > ( context, dst) ?;
461461 let t = self . sk + & m;
462- let evaluation_element = blinded_element. value * & G :: scalar_invert ( & t) ;
462+ let evaluation_element = blinded_element. value * & G :: invert_scalar ( t) ;
463463 Ok ( NonVerifiableServerEvaluateResult {
464464 message : EvaluationElement {
465465 value : evaluation_element,
@@ -600,7 +600,7 @@ impl<G: Group, H: BlockSizeUser + Digest + FixedOutputReset> VerifiableServer<G,
600600 let evaluation_elements = blinded_elements
601601 // To make a return type possible, we have to convert to a `fn` pointer, which isn't
602602 // possible if we `move` from context.
603- . zip ( iter:: repeat ( G :: scalar_invert ( & t) ) )
603+ . zip ( iter:: repeat ( G :: invert_scalar ( t) ) )
604604 . map ( <fn ( ( & BlindedElement < G , H > , _ ) ) -> _ >:: from ( |( x, t) | {
605605 PreparedEvaluationElement ( EvaluationElement {
606606 value : x. value * & t,
@@ -843,7 +843,7 @@ fn blind<G: Group, H: BlockSizeUser + Digest + FixedOutputReset, R: RngCore + Cr
843843 mode : Mode ,
844844) -> Result < ( G :: Scalar , G :: Elem ) > {
845845 // Choose a random scalar that must be non-zero
846- let blind = G :: random_nonzero_scalar ( blinding_factor_rng) ;
846+ let blind = G :: random_scalar ( blinding_factor_rng) ;
847847 let blinded_element = deterministic_blind_unchecked :: < G , H > ( input, & blind, mode) ?;
848848 Ok ( ( blind, blinded_element) )
849849}
@@ -919,7 +919,7 @@ where
919919
920920 Ok ( blinds
921921 . zip ( messages. into_iter ( ) )
922- . map ( |( blind, x) | x. value * & G :: scalar_invert ( & blind) ) )
922+ . map ( |( blind, x) | x. value * & G :: invert_scalar ( blind) ) )
923923}
924924
925925#[ allow( clippy:: many_single_char_names) ]
@@ -937,7 +937,7 @@ fn generate_proof<
937937) -> Result < Proof < G , H > > {
938938 let ( m, z) = compute_composites ( Some ( k) , b, cs, ds) ?;
939939
940- let r = G :: random_nonzero_scalar ( rng) ;
940+ let r = G :: random_scalar ( rng) ;
941941 let t2 = a * & r;
942942 let t3 = m * & r;
943943
@@ -1134,7 +1134,7 @@ mod tests {
11341134 let dst = GenericArray :: from ( STR_HASH_TO_SCALAR ) . concat ( get_context_string :: < G > ( mode) ) ;
11351135 let m = G :: hash_to_scalar :: < H , _ , _ > ( context, dst) . unwrap ( ) ;
11361136
1137- let res = point * & G :: scalar_invert ( & ( key + & m) ) ;
1137+ let res = point * & G :: invert_scalar ( key + & m) ;
11381138
11391139 finalize_after_unblind :: < G , H , _ , _ > ( Some ( ( input, res) ) . into_iter ( ) , info, mode)
11401140 . unwrap ( )
0 commit comments