Dumb, but easily verifiable implementations of crypto algorithms
Branch: master
Clone or download
Latest commit 2380a80 Feb 18, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src src: fix docs Feb 17, 2019
.clippy.toml salsa20: initial Jan 5, 2019
.gitignore sha256: initial Jan 4, 2019
.travis.yml clippy: config Jan 5, 2019
Cargo.lock cargo: 3.1.0 Jan 25, 2019
Cargo.toml cargo: 3.1.0 Jan 25, 2019
LICENSE-MIT license: bump Jan 5, 2019
README.md readme: style fix Jan 5, 2019

README.md

dumb-crypto

Build Status Latest version Documentation License

This library implements following cryptographic routines in the dumbest and the most obvious way:

  • sha256
  • hmac-sha256
  • pbkdf2-sha256
  • salsa20
  • scrypt

Why?

Normally, one would find a highly optimized code implementing those. However, verifying such code is a non-trivial task. All routines (except for scrypt itself) are pre-requisites for scrypt, and a provided just for convenience.

Quick example

extern crate dumb_crypto;

use::dumb_crypto::scrypt::Scrypt;

let scrypt = Scrypt::new(1, 128, 1);

let mut out: [u8; 8] = [0; 8];

scrypt.derive(b"passphrase", b"salt", &mut out);

assert_eq!(out.to_vec(), vec![
    79, 35, 225, 99, 145, 145, 172, 245,
]);

Using dumb-crypto

See documentation for details.