by indutny

indutny /dumb-crypto

Dumb, but easily verifiable implementations of crypto algorithms

130 Stars 2 Forks Last release: Not found Other 53 Commits 10 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:


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


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;


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.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.