Home

Awesome

rust-fastpbkdf2

This is a rust binding for fastpbkdf2.

Build Status

Interface

pub fn pbkdf2_hmac_sha1(password: &[u8], salt: &[u8], iterations: u32, out: &mut[u8]);
pub fn pbkdf2_hmac_sha256(password: &[u8], salt: &[u8], iterations: u32, out: &mut[u8]);
pub fn pbkdf2_hmac_sha512(password: &[u8], salt: &[u8], iterations: u32, out: &mut[u8]);

Performance

Hashrust-fastpbkdf2ringrust-crypto
SHA1366ms553ms (1.5x)1077ms (2.9x)
SHA256813ms1021ms (1.25x)2450ms (3.0x)
SHA5121259ms1579ms (1.25x)3114ms (2.5x)

On Intel i3-2100T CPU @ 2.50GHz in 64-bit mode, 2<sup>20</sup> iterations, --release build.

Building and testing

You'll need OpenSSL for fastpbkdf2. cargo build builds, cargo test runs tests.

Windows

You'll need to provide an OpenSSL build to fastpbkdf2 (inside its submodule). This is unfortunately manual because it involves interacting with OpenSSL's build system, or finding suitable binaries.

License

CC0.

Author

Joseph Birr-Pixton jpixton@gmail.com