Skip to content

Ternary secret key #1

Description

@j2kun

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]?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions