Skip to content

Repository files navigation

hibp-rs

CI maintenance

Rust tools for working with the Have I Been Pwned password hash database.

Crates

Crate Description Docs
hibp-bin-fetch Download and convert HIBP data; serve it to sync clients docs.rs
hibp-sync-client Sync a local dataset replica from an hibp-bin-fetch server docs.rs
hibp-verifier Check passwords against the breach database docs.rs

Quick Start

Download the dataset:

cargo install hibp-bin-fetch
hibp-bin-fetch --output ./hibp-data

Check 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();

Storage Format

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.

License

MIT

About

Have I Been Pwned rust downloader and verifier (local verification only)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages