Skip to main content

dpapi_core/
lib.rs

1//! Pure-Rust, byte-oriented DPAPI library.
2//!
3//! `dpapi-core` parses the Windows `DPAPI_BLOB` wire format, decrypts a blob
4//! **given its master key**, and unwraps Chrome/Edge `v10`/`v20` AES-256-GCM
5//! cookie values. Every entry point takes `&[u8]` and performs no I/O, so the
6//! same code serves both live-memory (LSASS) and on-disk artifacts (Chrome
7//! `Login Data` / `Local State`, Credential Manager, Vault, Wi-Fi keys).
8//!
9//! The blob format and the decrypt-given-key crypto are identical on disk and
10//! in memory; only the *source* of the master key differs by medium (LSASS
11//! cache vs. master-key files + password derivation), which lives in callers.
12//!
13//! All cryptography uses audited RustCrypto crates — no hand-rolled primitives.
14
15pub mod blob;
16pub mod chrome;
17pub mod decrypt;
18pub mod error;
19
20pub use blob::{parse_dpapi_blob, DpapiBlob};
21pub use chrome::{decrypt_v10_cookie, detect_chrome_cookie_encoding, ChromeCookieEncoding};
22pub use decrypt::{decrypt_aes256_cbc, decrypt_dpapi_blob, verify_hmac_sha1};
23pub use error::DpapiError;