Skip to content

Instantly share code, notes, and snippets.

View xbachl's full-sized avatar

Xuan Bach Le xbachl

  • Bennington, VT
  • 05:03 (UTC -05:00)
  • X @xbachl
View GitHub Profile
@xbachl
xbachl / rlwe_he_scheme.py
Created October 26, 2022 16:15 — forked from youben11/rlwe_he_scheme.py
Implementation of an homomorphic encryption scheme with numpy based on the ring learning with error problem
"""A basic homomorphic encryption scheme inspired from BFV https://eprint.iacr.org/2012/144.pdf
You can read my blog post explaining the implementation details here: https://www.ayoub-benaissa.com/blog/build-he-scheme-from-scratch-python/
Disclaimer: This implementation doesn’t neither claim to be secure nor does it follow software engineering best practices,
it is designed as simple as possible for the reader to understand the concepts behind homomorphic encryption schemes.
"""
import numpy as np
from numpy.polynomial import polynomial as poly