Aleksei Rutkovskii and Sohan Show
python3 -m venv venv
source venv/bin/activate
pip3 install -r requirements.txt
pip3 install git+https://github.com/mastnk/imageshuffle
python -m venv venv
./venv/Scripts/Activate.ps1
pip install -r requirements.txt
pip install git+https://github.com/mastnk/imageshuffle
-
In one terminal, run the API from root directory:
python3 api/run.py
orpython api/run.py
-
Take the generated URL in terminal and copy it.
-
Open clinet/main.py and paste the URL in line 84.
url = '<YOUR-URL>
-
In another terminal, run the client from root directory:
python3 client/main.py
orpython client/main.py
deactivate
In our day to day lives, we always interact with servers to access services. This can be translating texts from one language to another or converting speech to text, doing image processing, or just merely communicating with other people far apart. However, in all these cases above, data might be exposed to the server for a service to be performed. But, with the invention of homomorphic encryption, we can now perform arithmetic operations on encrypted data without the need for it to be decrypted or exposed to the server. This drastically improves privacy protection and helps the user to access services without exposing their raw data. This is what we aim to demonstrate in our project. Our project, PICRYPT, enables users to find the pixel by pixel difference between two images without exposing the real image to the service provider.
The idea is to use homomorphic encryption on two images and then send it over to the server (the service provider) which would then perform pixel by pixel subtraction on the two images and return the result back to the client. The client can then decrypt the image and see the result.
The goal of the demo would be to demonstrate that the server is successfully subtracting one image from another one, where both images are homomorphically encrypted. Example of it would be subtracting one image with a moving object from another one with the same background resulting in two versions of the same object a certain distance apart.
Person would upload 2 images of a moving object with the same background Both of them would be Homomorphically Encrypted with client’s secret key Encrypted images would be then send to the server Upon receiving the server would do subtraction of the first encrypted image from the second resulting in a single image Then the new image would send back to the client Client would decrypt the image and see the result of object moving
Create a Proof-of-Concept locally initiating client and server Write script to subtract images and show the output image Apply homomorphic encryption on the original images and do the subtraction on the encrypted images Create Python (Flask) Server on one computer and Client on another computer on the same network to test image exchange between them Develop minimal website locally Host Server on AWS/GCP/Linode server providers, configure the server Integrate website to the server and test the project
https://github.com/mastnk/imageshuffle
Developed by Masataka Nakagawa
Original Project Page by Masataka Nakagawa
Reference: Masayuki Tanaka, Learnable Image Encryption, IEEE International Conference on Consumer Electronics TAIWAN (ICCE-TW), 2018.