Module security

Source
Expand description

Functions related to calculating security and correctness parameters.

Structs§

OutsideConstraintsError
Error for when a value is outside the constraints of a polytope.

Functions§

evaluate_polynomial_2d
Evaluate a 2D polynomial with coefficients in increasing order of degree along both dimensions.
lwe_security_level_to_std
Returns the LWE standard deviation for a given dimension and security level, normalized to the ciphertext modulus (calculated with 2^64 as the modulus). Valid from 368 to 2048 dimensions and 78 to 130 bits of security. Assumes that the private key is binary.
lwe_std_to_security_level
Returns the LWE security level for a given dimension and standard deviation, normalized to the ciphertext modulus (calculated with 2^64 as the modulus). Valid from 368 to 2048 dimensions and 78 to 130 bits of security. Assumes that the private key is binary.
probability_away_from_mean_gaussian
Returns the log10 of the probability of being farther than x away from the mean given a standard deviation. We return the log to handle very low probabilities.

Type Aliases§

SecurityLevelResult
Result type for lwe_std_to_security_level.
StandardDeviationResult
Result type for lwe_security_level_to_std.