Rust tools for working with the Have I Been Pwned password hash database.
| Crate | Description | Docs |
|---|---|---|
| hibp-bin-fetch | Download and convert HIBP data; serve it to sync clients | |
| hibp-sync-client | Sync a local dataset replica from an hibp-bin-fetch server | |
| hibp-verifier | Check passwords against the breach database |
Download the dataset:
cargo install hibp-bin-fetch
hibp-bin-fetch --output ./hibp-dataCheck a password:
use hibp_verifier::BreachChecker;
use std::path::Path;
let checker = BreachChecker::new(Path::new("./hibp-data"));
let is_breached = checker.is_breached("password123").unwrap();Both tools use sha1t48, a compact format that truncates SHA1 hashes to 48 bits. This reduces storage from 77 GB (original text) to 13 GB while maintaining negligible collision probability.
See the individual crate READMEs for detailed documentation.
MIT