Coder Social home page Coder Social logo

bachacha's Introduction

baCHACHA

Hot, low speed CHACHA20 encryption in Bash

What's this?

This is an implementation of ChaCha20 (also) encryption without any external programs. No dependencies, other than a recent version of bash.

WARNING: THIS IS EXTREMELY SLOW AND INEFFICIENT. DO NOT USE IT FOR ANY SERIOUS PURPOSE, AND DO NOT USE IT ON LARGE AMOUNTS OF DATA (EVEN A FEW TENS OF KB ARE ALREADY A LOT FOR THIS BEAST). YOU HAVE BEEN WARNED.

Why is it "low speed"?

See the following comparison with openssl to encrypt a file:


$ ls -al /bin/w
-rwxr-xr-x 1 root root 22576 Feb 13 20:05 /bin/w
$ time openssl chacha20 -K 9900000000000000000000000000000000000000000000000000000000000001 -iv 00000000000000002607000a00040001 < /bin/w > /dev/null

real	0m0.005s
user	0m0.005s
sys	0m0.000s
$ time ./chacha.sh -K 9900000000000000000000000000000000000000000000000000000000000001 -I 2607000a00040001 < /bin/w > /dev/null

real	0m7.388s
user	0m7.099s
sys	0m0.140s

How do I install it?

Just run the chacha.sh script with the necessary arguments (see chacha.sh -h for help).

How do I know that it produces correct results?

There are two test scripts in the tests/ directory, whose job is to compare results from chacha.sh and openssl chacha20 (see comments in the scripts). All tests should pass.

bachacha's People

Contributors

waldner avatar

Watchers

 avatar  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.