Coder Social home page Coder Social logo

sneakercrypt's Introduction

SneakerCrypt

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!

One-Time Pad (OTP) Cryptography

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:

  1. The generated pads are truly random (see custom entropy source discussion below)
  2. The pads are kept secret.

Why do we need Sneakercrypt?

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.

Dependencies

Sneakercrypt strives to rely on as few dependencies as possible. Currently, these include:

  1. python3

Future Goals

The project has a few future goals that we are working towards (please contact if you are interested in helping develop!):

  1. A Django based server that Sneakercrypt clients can connect to.
  2. 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.
  3. Support for communication over Tor.

Usage

python3 sneakercrypt.py <command>

sneakercrypt's People

Contributors

kennewcomb avatar git3121 avatar ibarria0 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.