All Projects → bryant → Argon2rs

bryant / Argon2rs

Licence: mit
The pure-Rust password hashing library running on Argon2.

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Argon2rs

Orion
Usable, easy and safe pure-Rust crypto
Stars: ✭ 227 (+44.59%)
Mutual labels:  cryptography, argon2
Lazysodium Android
An Android implementation of the Libsodium cryptography library. For the lazy dev.
Stars: ✭ 69 (-56.05%)
Mutual labels:  cryptography, argon2
Fscrypt
Go tool for managing Linux filesystem encryption
Stars: ✭ 534 (+240.13%)
Mutual labels:  cryptography, argon2
Argon2pw
Argon2 password hashing package for go with constant time hash comparison
Stars: ✭ 85 (-45.86%)
Mutual labels:  cryptography, argon2
Halite
High-level cryptography interface powered by libsodium
Stars: ✭ 933 (+494.27%)
Mutual labels:  cryptography, argon2
Password4j
Password4j is a user-friendly cryptographic library that supports Argon2, Bcrypt, Scrypt, PBKDF2 and various cryptographic hash functions.
Stars: ✭ 124 (-21.02%)
Mutual labels:  cryptography, argon2
Wolfssh
wolfSSH is a small, fast, portable SSH implementation, including support for SCP and SFTP.
Stars: ✭ 142 (-9.55%)
Mutual labels:  cryptography
Cryptokernel
A SDK for implementing blockchain-based digital currencies
Stars: ✭ 146 (-7.01%)
Mutual labels:  cryptography
Dizk
Java library for distributed zero knowledge proof systems
Stars: ✭ 140 (-10.83%)
Mutual labels:  cryptography
Yrssf
一个分布式(p2p)云教学/云课堂/直播平台系统CMS,睿易派的开源替代品
Stars: ✭ 141 (-10.19%)
Mutual labels:  cryptography
Discordcrypt
End-To-End File & Message Encryption For Discord
Stars: ✭ 150 (-4.46%)
Mutual labels:  cryptography
Torus Node
Torus nodes run a Distributed Key Generation protocol amongst themselves that allows for the generation, storage and assignment of cryptographic keys
Stars: ✭ 148 (-5.73%)
Mutual labels:  cryptography
Wasm Crypto
A WebAssembly (via AssemblyScript) set of cryptographic primitives for building authentication and key exchange protocols.
Stars: ✭ 146 (-7.01%)
Mutual labels:  cryptography
Dumb Crypto
Dumb, but easily verifiable implementations of crypto algorithms
Stars: ✭ 137 (-12.74%)
Mutual labels:  cryptography
Awesome Virgil
Key Management and Crypto Building Block for your App or Device.
Stars: ✭ 146 (-7.01%)
Mutual labels:  cryptography
Noiseprotocol
Noise Protocol Framework - Python 3 implementation
Stars: ✭ 142 (-9.55%)
Mutual labels:  cryptography
Dontclickshit
Як не стати кібер-жертвою
Stars: ✭ 149 (-5.1%)
Mutual labels:  cryptography
Crypto1 bs
Bitsliced Crypto-1 brute-forcer
Stars: ✭ 140 (-10.83%)
Mutual labels:  cryptography
Tink
Tink is a multi-language, cross-platform, open source library that provides cryptographic APIs that are secure, easy to use correctly, and hard(er) to misuse.
Stars: ✭ 11,855 (+7450.96%)
Mutual labels:  cryptography
Simplednscrypt
A simple management tool for dnscrypt-proxy
Stars: ✭ 1,901 (+1110.83%)
Mutual labels:  cryptography

argon2rs

Build Status

This is a purely Rust-based library that provides both variants of the state-of-the-art Argon2 hashing algorithm, suitable for password hashing and password-based key derivation.

Documentation

Installation

Via cargo:

$ cd $PROJECT_ROOT
$ cargo install --features "simd"

From git:

$ git clone https://github.com/bryant/argon2rs $ARGON_DIR && cd $ARGON_DIR
$ cargo build --features "simd"

Usage

From examples/helloworld.rs:

extern crate argon2rs;

pub fn main() {
    let (password, salt) = ("argon2i!", "delicious salt");
    println!("argon2i_simple(\"{}\", \"{}\"):", password, salt);
    for byte in argon2rs::argon2i_simple(&password, &salt).iter() {
        print!("{:02x}", byte);
    }
    println!("");
}

outputs:

argon2i_simple("argon2i!", "delicious salt"):
e254b28d820f26706a19309f1888cefd5d48d91384f35dc2e3fe75c3a8f665a6

There are two variants of Argon2 that differ in the manner by which reference indices are computed during block-filling rounds. Argon2d does this in a faster but data-dependent fashion that could be vulnerable to side-channel attacks, whereas Argon2i ("i" denoting independence from plaintext input) works slower but is immune to such attacks and is therefore the preferred choice for password hashing.

TODO

  • [x] Parallelize.
  • [x] Incorporate SIMD into compression function.
  • [x] Zero-on-drop trait for sensitive(s): Matrix
  • [x] Constant-time verification API.
  • [x] Benchmarks.
  • [ ] Support NEON and SIMD on other arches.
  • [ ] Fuzz.
  • [ ] Prove safety of unchecked accesses in Block, Matrix.

Benchmarks

Our primary benchmarks are single- and multi-threaded runs of Argon2i with default parameters against the reference implementation. In order to compile and run this, first pull in the C sources:

$ git submodule init
$ git submodule update benches/cargon/phc-winner-argon2

and then benchmark with Cargo as usual:

$ rustc --version
rustc 1.11.0-dev (4b240fe96 2016-06-08)

$ export RUSTFLAGS='-C target-feature=+avx'
$ cargo bench --features="simd bench_ref"

# output trimmed for brevity

     Running target/release/versus_cargon-b5955411e1594c85

running 5 tests
test ensure_identical_hashes ... ignored
test bench_argon2rs_i        ... bench:   9,547,031 ns/iter (+/- 15,964)
test bench_argon2rs_threaded ... bench:   4,584,163 ns/iter (+/- 398,803)
test bench_cargon_i          ... bench:  10,013,015 ns/iter (+/- 177,482)
test bench_cargon_threaded   ... bench:   3,753,022 ns/iter (+/- 48,688)

test result: ok. 0 passed; 0 failed; 0 ignored; 2 measured

References

"Argon2: The Memory-Hard Function for Password Hashing and Other Applications"

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].