@@ -379,7 +379,7 @@ impl RsaPrivateKey {
379379 // Check that the product of primes matches the modulus.
380380 // This also ensures that `bit_precision` of each prime is <= that of the modulus,
381381 // and `bit_precision` of their product is >= that of the modulus.
382- if & primes. iter ( ) . fold ( BoxedUint :: one ( ) , |acc, p| acc * p) != n_c. as_ref ( ) {
382+ if primes. iter ( ) . fold ( BoxedUint :: one ( ) , |acc, p| acc * p) != n_c. as_ref ( ) {
383383 return Err ( Error :: InvalidModulus ) ;
384384 }
385385 }
@@ -555,12 +555,12 @@ impl RsaPrivateKey {
555555 . ok_or ( Error :: InvalidPrime ) ?;
556556 let q_params = BoxedMontyParams :: new ( q_odd) ;
557557
558- let x = NonZero :: new ( p. wrapping_sub ( & BoxedUint :: one ( ) ) )
558+ let x = NonZero :: new ( p. wrapping_sub ( BoxedUint :: one ( ) ) )
559559 . into_option ( )
560560 . ok_or ( Error :: InvalidPrime ) ?;
561561 let dp = d. rem_vartime ( & x) ;
562562
563- let x = NonZero :: new ( q. wrapping_sub ( & BoxedUint :: one ( ) ) )
563+ let x = NonZero :: new ( q. wrapping_sub ( BoxedUint :: one ( ) ) )
564564 . into_option ( )
565565 . ok_or ( Error :: InvalidPrime ) ?;
566566 let dq = d. rem_vartime ( & x) ;
@@ -769,7 +769,7 @@ fn validate_private_key_parts(key: &RsaPrivateKey) -> Result<()> {
769769 let de = key. d . mul ( & key. pubkey_components . e ) ;
770770
771771 for prime in & key. primes {
772- let x = NonZero :: new ( prime. wrapping_sub ( & BoxedUint :: one ( ) ) ) . unwrap ( ) ;
772+ let x = NonZero :: new ( prime. wrapping_sub ( BoxedUint :: one ( ) ) ) . unwrap ( ) ;
773773 let congruence = de. rem_vartime ( & x) ;
774774 if !bool:: from ( congruence. is_one ( ) ) {
775775 return Err ( Error :: InvalidExponent ) ;
0 commit comments