Coder Social home page Coder Social logo

argon2-xor's Introduction

argon2-xor

simple XOR stream with HMAC and random salt

Using the variable output length of the Argon2id hash function, we are able to derive a key to use with XOR stream cipher.

We generate a random salt, Encrypt-then-MAC, and save to a file (or stdout).

To decrypt, we extract the salt and MAC, hash the password (with given salt), and XOR the rest of the file.

Note: This is a toy program, and hasn't been vetted by cryptographers or security professionals.

Basic Usage

Encryption

argon2-xor -out file.enc plaintext.txt

Decryption

argon2-xor -d -out plaintext.txt file.enc

CLI Flags

  -d	decrypt mode
  -hmac string
    	hash function for use with HMAC: sha256, sha384, or sha512 (default "sha512")
  -m int
    	argon2 mem parameter (default 10000)
  -out string
    	output file (default "stdout")
  -p int
    	argon2 thread/parallelism parameter (default 1)
  -saltlen int
    	use custom salt size (default 1024)
  -t int
    	argon2 time parameter (default 100)

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.