Fq
static Fq Fq_freeze(int32_t x) {
static void R3_fromRq(small *out, const Fq *r) {
static void Rq_mult_small(Fq *h, const Fq *f, const small *g) {
static void Rq_mult3(Fq *h, const Fq *f) {
static Fq Fq_recip(Fq a1) {
Fq ai = a1;
static int Rq_recip3(Fq *out, const small *in) {
Fq f[p + 1], g[p + 1], v[p + 1], r[p + 1], scale;
static void Round(Fq *out, const Fq *a) {
static void KeyGen(Fq *h, small *f, small *ginv) {
Fq finv[p];
static void Encrypt(Fq *c, const small *r, const Fq *h) {
Fq hr[p];
static void Decrypt(small *r, const Fq *c, const small *f, const small *ginv) {
Fq cf[p], cf3[p];
static void Rq_encode(unsigned char *s, const Fq *r) {
static void Rq_decode(Fq *r, const unsigned char *s) {
for (i = 0; i < p; ++i) r[i] = ((Fq)R[i]) - q12;
static void Rounded_encode(unsigned char *s, const Fq *r) {
static void Rounded_decode(Fq *r, const unsigned char *s) {
Fq h[p];
Fq h[p], c[p];
Fq c[p];