The invention discloses a general
software implementation method for round-off learning on a ring in
post quantum cryptography construction, which comprises the following steps of: A, setting RLWR parameters N, f, p, q and S and a CPU digit B of an actual operation platform; B, selecting a polynomial multiplication implementation
algorithm according to the parameters N, f, q, S and B, recording the
algorithm as PMA, and generating pre-computable parameters in the polynomial multiplication implementation scheme; C, selecting an available modular reduction method as a modular reduction implementation scheme according to the parameter q and the selected polynomial multiplication implementation scheme PMA, and recording as MRA; D, selecting a
rounding calculation implementation method according to the parameters p and q, recording the
rounding calculation implementation method as RA, and generating parameters which can be pre-calculated in the
rounding calculation implementation scheme; and E, for the input polynomials a(x) and s(x), calculating and outputting a corresponding value b(x) in RLWR distribution.