Title: | Homomorphic Encryption Polynomials |
---|---|
Description: | Homomorphic encryption (Brakerski and Vaikuntanathan (2014) <doi:10.1137/120868669>) using Ring Learning with Errors (Lyubashevsky et al. (2012) <https://eprint.iacr.org/2012/230>) is a form of Learning with Errors (Regev (2005) <doi:10.1145/1060590.1060603>) using polynomial rings over finite fields. Functions to generate the required polynomials (using 'polynom'), with various distributions of coefficients are provided. Additionally, functions to generate and take coefficient modulo are provided. |
Authors: | Bastiaan Quast [aut, cre] |
Maintainer: | Bastiaan Quast <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.0.0 |
Built: | 2024-11-02 02:40:43 UTC |
Source: | https://github.com/bquast/hetools |
Coefficient Modulo
CoefMod(x, k)
CoefMod(x, k)
x |
polynomial from the polynom package |
k |
the modulo |
polynomial of the polynom class
polynomial = polynomial(c(5, 3, 6)) print(polynomial) CoefMod(polynomial, 5)
polynomial = polynomial(c(5, 3, 6)) print(polynomial) CoefMod(polynomial, 5)
Generate Polynomial with Discrete Gaussian Coefficients
GenDiscrGauss(n, s = 3)
GenDiscrGauss(n, s = 3)
n |
the order |
s |
scale the sigma (down) |
polynomial of the form x^^n + 1
n = 5 GenDiscrGauss(n) GenDiscrGauss(n=5, s=2)
n = 5 GenDiscrGauss(n) GenDiscrGauss(n=5, s=2)
Generate Polynomial Modulo
GenPolyMod(n)
GenPolyMod(n)
n |
the order |
polynomial of the form x^^n + 1
n = 5 GenPolyMod(5)
n = 5 GenPolyMod(5)
Generate Polynomial with Ternary
GenTernary(n)
GenTernary(n)
n |
the order |
ternary polynomial of order x^^n with coefficients (-1,0,1)
n = 5 GenTernary(n)
n = 5 GenTernary(n)
Generate Polynomial with Uniform Distribution Coefficients
GenUnif(n, q)
GenUnif(n, q)
n |
the order |
q |
the ciphermod of coefficients |
polynomial of order x^^n with coefficients 0,..,q
n = 5 q = 7 GenUnif(n, q)
n = 5 q = 7 GenUnif(n, q)