{"id":13828822,"url":"https://github.com/bryant/argon2rs","last_synced_at":"2025-12-12T14:39:30.717Z","repository":{"id":57493554,"uuid":"50819392","full_name":"bryant/argon2rs","owner":"bryant","description":"The pure-Rust password hashing library running on Argon2.","archived":false,"fork":false,"pushed_at":"2019-10-30T14:21:16.000Z","size":1723,"stargazers_count":173,"open_issues_count":15,"forks_count":19,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-11-10T03:44:26.790Z","etag":null,"topics":["argon2","argon2i","argon2id","cryptography","password-hash"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bryant.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-01T06:31:43.000Z","updated_at":"2024-08-23T16:37:50.000Z","dependencies_parsed_at":"2022-08-28T13:53:36.792Z","dependency_job_id":null,"html_url":"https://github.com/bryant/argon2rs","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryant%2Fargon2rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryant%2Fargon2rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryant%2Fargon2rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryant%2Fargon2rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bryant","download_url":"https://codeload.github.com/bryant/argon2rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225492420,"owners_count":17482869,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["argon2","argon2i","argon2id","cryptography","password-hash"],"created_at":"2024-08-04T09:03:11.997Z","updated_at":"2025-12-12T14:39:25.685Z","avatar_url":"https://github.com/bryant.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"argon2rs\n========\n\n[![Build\nStatus](https://travis-ci.org/bryant/argon2rs.svg?branch=master)](https://travis-ci.org/bryant/argon2rs)\n\nThis is a purely Rust-based library that provides both variants of the\nstate-of-the-art Argon2 hashing algorithm, suitable for password hashing and\npassword-based key derivation.\n\n[Documentation](http://bryant.github.io/argon2rs/argon2rs/)\n\n## Installation\n\nVia cargo:\n\n```bash\n$ cd $PROJECT_ROOT\n$ cargo install --features \"simd\"\n```\n\nFrom git:\n\n```bash\n$ git clone https://github.com/bryant/argon2rs $ARGON_DIR \u0026\u0026 cd $ARGON_DIR\n$ cargo build --features \"simd\"\n```\n\n## Usage\n\nFrom `examples/helloworld.rs`:\n\n```rust\nextern crate argon2rs;\n\npub fn main() {\n    let (password, salt) = (\"argon2i!\", \"delicious salt\");\n    println!(\"argon2i_simple(\\\"{}\\\", \\\"{}\\\"):\", password, salt);\n    for byte in argon2rs::argon2i_simple(\u0026password, \u0026salt).iter() {\n        print!(\"{:02x}\", byte);\n    }\n    println!(\"\");\n}\n```\n\noutputs:\n\n```\nargon2i_simple(\"argon2i!\", \"delicious salt\"):\ne254b28d820f26706a19309f1888cefd5d48d91384f35dc2e3fe75c3a8f665a6\n```\n\nThere are two variants of Argon2 that differ in the manner by which reference\nindices are computed during block-filling rounds. Argon2d does this in a faster\nbut data-dependent fashion that could be vulnerable to side-channel\n[attacks][1], whereas Argon2i (\"i\" denoting independence from plaintext input)\nworks slower but is immune to such attacks and is therefore the preferred choice\nfor password hashing.\n\n## TODO\n\n- [x] Parallelize.\n- [x] Incorporate SIMD into compression function.\n- [x] Zero-on-drop trait for sensitive(s): `Matrix`\n- [x] Constant-time verification API.\n- [x] Benchmarks.\n- [ ] Support NEON and SIMD on other arches.\n- [ ] Fuzz.\n- [ ] Prove safety of unchecked accesses in `Block`, `Matrix`.\n\n## Benchmarks\n\nOur primary benchmarks are single- and multi-threaded runs of Argon2i with\ndefault parameters against the [reference implementation][2]. In order to\ncompile and run this, first pull in the C sources:\n\n```bash\n$ git submodule init\n$ git submodule update benches/cargon/phc-winner-argon2\n```\n\nand then benchmark with Cargo as usual:\n\n```\n$ rustc --version\nrustc 1.11.0-dev (4b240fe96 2016-06-08)\n\n$ export RUSTFLAGS='-C target-feature=+avx'\n$ cargo bench --features=\"simd bench_ref\"\n\n# output trimmed for brevity\n\n     Running target/release/versus_cargon-b5955411e1594c85\n\nrunning 5 tests\ntest ensure_identical_hashes ... ignored\ntest bench_argon2rs_i        ... bench:   9,547,031 ns/iter (+/- 15,964)\ntest bench_argon2rs_threaded ... bench:   4,584,163 ns/iter (+/- 398,803)\ntest bench_cargon_i          ... bench:  10,013,015 ns/iter (+/- 177,482)\ntest bench_cargon_threaded   ... bench:   3,753,022 ns/iter (+/- 48,688)\n\ntest result: ok. 0 passed; 0 failed; 0 ignored; 2 measured\n```\n\n## References\n\n[\"Argon2: The Memory-Hard Function for Password Hashing and Other\nApplications\"][1]\n\n[1]: https://github.com/P-H-C/phc-winner-argon2/raw/master/argon2-specs.pdf\n[2]: https://github.com/p-h-c/phc-winner-argon2\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbryant%2Fargon2rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbryant%2Fargon2rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbryant%2Fargon2rs/lists"}