Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-lj committed Oct 7, 2024
1 parent c5a71d3 commit 8e45a97
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions fastcrypto-vdf/src/rsa_group/modulus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ pub struct RSAModulus {
/// Precomputed value of `modulus / 2` for faster reduction.
#[serde(skip)]
pub(super) half: BigUint,

/// Precomputed value of `2^{2 * log(modulus)}` for fast modular reduction.
#[serde(skip)]
pub(super) r: BigUint,
}

impl FromStr for RSAModulus {
Expand All @@ -39,8 +35,7 @@ impl From<BigUint> for RSAModulus {
/// responsibility to ensure that it is a valid RSA modulus.
fn from(value: BigUint) -> Self {
let half = (&value).shr(1);
let r = BigUint::one().shl(2 * value.bits()).div_floor(&value);
Self { value, half, r }
Self { value, half }
}
}

Expand Down

0 comments on commit 8e45a97

Please sign in to comment.