Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dignifiedquire committed Jul 6, 2024
1 parent c52a90a commit 040f8b0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/algorithms/generate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ pub(crate) fn generate_multi_prime_key_with_exp<R: CryptoRngCore>(

for (i, prime) in primes.iter_mut().enumerate() {
let bits = (todo / (nprimes - i)) as u32;
*prime = generate_prime_with_rng(rng, bits, bits);
let bits_precision = BoxedUint::zero_with_precision(bits).bits_precision();
*prime = generate_prime_with_rng(rng, bits, bits_precision);
todo -= prime.bits() as usize;
}

Expand Down
1 change: 0 additions & 1 deletion src/key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ pub struct RsaPublicKey {
/// Typically 0x10001 (65537)
e: u64,

#[cfg_attr(feature = "serde", serde(skip))]
n_params: BoxedMontyParams,
}

Expand Down
2 changes: 1 addition & 1 deletion src/pkcs1v15/signature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ mod tests {
use super::*;
use serde_test::{assert_tokens, Configure, Token};
let signature = Signature {
inner: BigUint::new(Vec::from([42])),
inner: BoxedUint::from(42u32),
len: 1,
};

Expand Down
2 changes: 1 addition & 1 deletion src/pss/signature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ mod tests {
use super::*;
use serde_test::{assert_tokens, Configure, Token};
let signature = Signature {
inner: BigUint::new(Vec::from([42])),
inner: BoxedUint::from(42u32),
len: 1,
};

Expand Down

0 comments on commit 040f8b0

Please sign in to comment.