Crates.io | dumb-crypto |
lib.rs | dumb-crypto |
version | 3.1.0 |
source | src |
created_at | 2019-01-05 13:21:44.716627 |
updated_at | 2019-01-25 01:03:48.546066 |
description | Dumb, but easily verifiable implementations of crypto algorithms |
homepage | |
repository | https://github.com/indutny/dumb-crypto |
max_upload_size | |
id | 105643 |
size | 105,379 |
This library implements following cryptographic routines in the dumbest and the most obvious way:
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.
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,
]);
See documentation for details.