Sneakercrypt is an open-source implementation of the theoretically secure one-time pad encryption scheme. Sneakercrypt is built from a single principle: that privacy is a inalienable human right. If you share this belief, please read on!
A random stream of bits, known as a "pad", is generated by two parties who wish to communicate. The parties meet in person and exchange the pads. Messages are encrypted by performing an XOR operation with pad to produce an encrypted ciphertext:
message : 0 1 1 0 1 0 0 0 0
pad : 1 1 0 1 0 1 0 1 1
ciphertext : 1 0 1 1 1 1 0 1 1
The XOR operation produces a 1 if the bits differ (a 0 and a 1), and a 0 if the bits are the same (both 0 or 1). To decrypt, the receiving party performs an xor between the ciphertext and the pad to recover the original message (the plaintext):
ciphertext : 1 0 1 1 1 1 0 1 1
pad : 1 1 0 1 0 1 0 1 1
plaintext : 0 1 1 0 1 0 0 0 0
After the message is decrypted by the receiving party, Sneakercrypt erases the bits from the pad, preventing parties that have intercepted the ciphertext from decrypting the message if the pad is stolen. One-time pad cryptography is invulnerable to "cipher-text only attacks", and provides complete communication security, as long as two (admittedly nontrivial) conditions are met:
- The generated pads are truly random (see custom entropy source discussion below)
- The pads are kept secret.
Public-key encryption exists and protects the internet. Why does the world need Sneakercrypt? The answer is that one-time pads can help two parties communicate when all other forms of encryption fall short. Public-key encryption is mathematically rigorous restricting the amount of eyes that can audit the code, and implementations are prone to bugs. Sneakercrypt is a relatively small package, making bugs quite shallow and easy to detect. In addition, while public-key encryption algorithms protect against most threats, there is some evidence to suggest that an adversary with a quantum computer can break conventional encryption schemes. For some, Sneakercrypt may be the only viable option.
Sneakercrypt strives to rely on as few dependencies as possible. Currently, these include:
- python3
The project has a few future goals that we are working towards (please contact if you are interested in helping develop!):
- A Django based server that Sneakercrypt clients can connect to.
- Custom sources of entropy. Some individuals may not wish to rely on their computer's hardware-based RNG. We would like the ability for users to use atmospheric data, thermal noise, or their own custom source of entropy.
- Support for communication over Tor.
python3 sneakercrypt.py <command>