The invention discloses a
twiddle factor table generation method for number theory transformation, which is mainly based on
decomposition of a polynomial on a finite field and comprises the steps of key data generation, polynomial
decomposition and
data selection, inverse number theory transformation data calculation, Montgomery domain conversion and the like. The method comprises the following steps of: decomposing five types of polynomials of an original three-term expression, square difference, square sum, cubic difference and cubic sum according to levels and a specific sequence, then selecting negative values of constant term parts of partial polynomials to form a
rotation factor table of positive number theory transformation, and then calculating a
rotation factor table used by inverse number theory transformation according to the
rotation factor table of the positive number theory transformation, and finally, converting the
twiddle factor table data to the Montgomery domain to obtain a final
twiddle factor table. According to the technical scheme, the implementation efficiency of number theory transformation can be remarkably improved, and finer
granularity and a wider range are provided for selection of lattice-based
password parameters; and the efficiency of anti-
quantum encryption, decryption and signature algorithms is improved.