pub enum SetBits {
Msb,
TwoMsb,
None,
}Expand description
Decide how prime candidates are manipulated by setting certain bits before primality testing, influencing the range of the prime.
Variants§
Msb
Set the most significant bit, thus limiting the range to [MAX/2 + 1, MAX].
In other words, all candidates will have the same bit size.
TwoMsb
Set two most significant bits, limiting the range to [MAX - MAX/4 + 1, MAX].
This is useful in the RSA case because a product of two such numbers will have a guaranteed bit size.
None
No additional bits set; uses the full range [1, MAX].
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SetBits
impl RefUnwindSafe for SetBits
impl Send for SetBits
impl Sync for SetBits
impl Unpin for SetBits
impl UnwindSafe for SetBits
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more