To install dependencies:
pip3 install -r requirements.txt
Currently, all the code for the encryption scheme test implementation lives in encrypt.py.
Our code implements the image encryption scheme described in this paper.
The Instagram compression algorithm is proprietary and seems to be platform-dependent. For better consistency and tunable parameters, we can use this ImageMagick command:
convert feldroy-512x512-unoptimized.jpg \
-sampling-factor 4:2:0 \
-strip \
-quality 85 \
-interlace Plane \
-gaussian-blur 0.05 \
-colorspace RGB \
feldroy-512x512-combined.jpg
(source)
Our code uses private key rsa_keys/private.pem and public key rsa_keys/public.pem, which were generated by the following commands:
> openssl genrsa -out private.pem 1024
> openssl rsa -in private.pem -pubout -outform PEM -out public.pem
test_image_1: https://commons.wikimedia.org/wiki/File:AsterNovi-belgii-flower-1mb.jpg (CC BY-SA 3.0)