I was looking at
|
def gen_ternary_uniform_polynomial( |
|
degree: int, moduli: list[int] |
|
) -> RnsPolynomial: |
|
"""Generate a uniformly random RNS polynomial in R_Q = Z[X] / (Q, X^N+1).""" |
|
coeffs_q = [secrets.randbelow(2) for _ in range(degree)] |
|
return gen_rns_polynomial(degree, coeffs_q, moduli) |
|
|
and I noticed the function name says "ternary uniform", but the values sampled are in [0, 1]. Is this a mistake? Should it instead be sampled from [-1, 0, 1]?
I was looking at
CROSS/jaxite_word/key_gen.py
Lines 19 to 25 in bca0954
and I noticed the function name says "ternary uniform", but the values sampled are in [0, 1]. Is this a mistake? Should it instead be sampled from [-1, 0, 1]?