https://github.com/derivepass/dumb-crypto
Dumb, but easily verifiable implementations of crypto algorithms
https://github.com/derivepass/dumb-crypto
cryptography dumb
Last synced: 11 months ago
JSON representation
Dumb, but easily verifiable implementations of crypto algorithms
- Host: GitHub
- URL: https://github.com/derivepass/dumb-crypto
- Owner: derivepass
- License: other
- Created: 2019-01-05T09:39:09.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-17T21:27:31.000Z (over 7 years ago)
- Last Synced: 2025-06-26T15:04:17.335Z (12 months ago)
- Topics: cryptography, dumb
- Language: Rust
- Size: 53.7 KB
- Stars: 144
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-MIT
Awesome Lists containing this project
README
# dumb-crypto
[](http://travis-ci.org/indutny/dumb-crypto)
[](https://crates.io/crates/dumb-crypto)
[][docs]

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
```rust
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][docs] for details.
[docs]: https://docs.rs/dumb-crypto