This repository contains an updated version of the original code by Mădălina Bolboceanu (@mbolboceanu), Miruna Roșca (@MirunaRosca), and Radu Țițiu (@rtitiu).
This code demonstrates an updated version of a homomorphic encryption/decryption scheme. It allows you to perform operations on encrypted data while preserving privacy.
- Python 3.6 or higher is required.
- Ensure you have the necessary dependencies installed. You can install them using
pip
and therequirements.txt
file.
-
Clone this repository:
git clone https://github.com/CodeByAidan/Homomorphic-Encryption-Decryption-with-Strings.git cd Homomorphic-Encryption-Decryption-with-Strings
-
Install the required dependencies using the provided
requirements.txt
:pip install -r requirements.txt
Run the main.py
script to see an example usage of the updated homomorphic encryption/decryption scheme:
python main.py
The script demonstrates encryption, decryption, and operations on encrypted data using the "updated scheme".
Go to api/ folder, open up Docker Desktop. Then build the Dockerfile image into a container:
cd api/
docker build -t homomorphic-encryption-api .
Then run it!
docker run homomorphic-encryption-api:latest
Go to api/ folder (in 2 different terminals), on one run the server.py
:
cd api/
python server.py
Then on the other run the client.py
:
python client.py
For a deeper understanding of the concepts and techniques used in this code, you can refer to the associated research paper: Paper.pdf as well as the original blogpost about this: https://bit-ml.github.io/blog/post/homomorphic-encryption-toy-implementation-in-python/