Expand description
Utilities for the fhe.rs library.
Functionsยง
- catch_
unwind - Define catch_unwind to silence the panic in unit tests.
- inverse
- Computes the modular multiplicative inverse of
a
modulop
. ReturnsNone
ifa
is not invertible modulop
. - is_
prime - Returns whether the modulus p is prime; this function is 100% accurate.
- sample_
vec_ cbd - Sample a vector of independent centered binomial distributions of a given variance. Returns an error if the variance is strictly larger than 16.
- transcode_
bidirectional - Transcodes a vector of u64 of
input_nbits
-bit numbers into a vector of u64 ofoutput_nbits
-bit numbers. - transcode_
from_ bytes - Transcodes a vector of u8 into a vector of u64 of
nbits
-bit numbers. - transcode_
to_ bytes - Transcodes a vector of u64 of
nbits
-bit numbers into a vector of bytes. - variance
- Compute the sample variance of a list of values. Panics if the length of value is < 2.