pub struct Params {
pub n: usize,
pub q: u64,
pub sigma_x1000: u64,
pub t: u64,
}Expand description
FHE parameter set.
Fields§
§n: usizeRing dimension (must be a power of 2).
q: u64Ciphertext modulus (must be prime, q ≡ 1 mod 2N).
sigma_x1000: u64Gaussian error standard deviation (as fixed-point × 1000).
t: u64Plaintext modulus for encoding.
Implementations§
Source§impl Params
impl Params
Sourcepub fn research_2048() -> Self
pub fn research_2048() -> Self
Research-grade parameters: N=2048, ~100-bit security. q is an NTT-friendly prime: q ≡ 1 (mod 2*2048 = 4096).
Sourcepub fn test_small() -> Self
pub fn test_small() -> Self
Small parameters for fast testing: N=256. q/t ratio ≈ 48, giving about 5 bits of noise budget per coefficient.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Params
impl RefUnwindSafe for Params
impl Send for Params
impl Sync for Params
impl Unpin for Params
impl UnsafeUnpin for Params
impl UnwindSafe for Params
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