Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ageron/visual_crypto
Visual cryptography tool
https://github.com/ageron/visual_crypto
Last synced: 2 months ago
JSON representation
Visual cryptography tool
- Host: GitHub
- URL: https://github.com/ageron/visual_crypto
- Owner: ageron
- Created: 2012-08-20T08:24:06.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2016-11-05T10:03:43.000Z (about 8 years ago)
- Last Synced: 2024-10-03T12:31:19.743Z (3 months ago)
- Language: Python
- Size: 242 KB
- Stars: 43
- Watchers: 11
- Forks: 20
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Visual cryptography tool
A fun visual cryptography tool that will amaze your kids.
![overview](overview.png)
## Usage
$ python visual_crypto.py -vvv --message message.png --secret secret.png
This produces the ciphered image (`ciphered.png`) that looks completely random, just like the random secret image (`secret.png`).
Print `secret.png` on a transparent paper, and `ciphered.png` on regular paper, then place the transparent paper on top of the regular paper, and see the original image suddenly appear in front of you. Make sure to print at exactly the same scale and align both papers perfectly: the image only appears when alignment is perfect.
## Requirements
This program requires the Python Image Library (PIL). The easiest way to install it is using pip:$ pip install --upgrade Pillow
## More info
This is a visual variant of the one-time-pad algorithm which is one of the rare crypto algorithms that has been proven to be completely unbreakable. The great thing about it is that you don't need a computer to decipher the messages you receive (but you do need one to generate the ciphered messages). If you were to use this seriously, you would first generate many random secret images and share them securely with the person you want to communicate with, then later you must use one different secret image for each message you want to send. Never reuse a secret image.Check out the Wikipedia article on [Visual Cryptography](https://en.wikipedia.org/wiki/Visual_cryptography) for more details.
Have fun!