Homomorphic encryption (Brakerski and Vaikuntanathan (2014) ) using Ring Learning with Errors (Lyubashevsky et al. (2012) https://eprint.iacr.org/2012/230) is a form of Learning with Errors (Regev (2005) ) 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.
You can install the development version of HEtools from GitHub with:
if (!require('remotes')) install.packages('remotes')
remotes::install_github("bquast/HEtools")
This is a basic example which shows you how to solve a common problem:
library(HEtools)
#> Loading required package: polynom
polynomial = polynomial(c(5, 3, 6))
print(polynomial)
#> 5 + 3*x + 6*x^2
CoefMod(polynomial, 5)
#> 3*x + x^2
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.