Win32_Hash: PBKDF2-HMAC-SHA256 password hashing in SPARK
Hi all, I’ve published a small Windows password-hashing library in Ada/SPARK: Win32_Hash. What it does: PBKDF2-HMAC-SHA256 through the Windows CNG API (BCryptDeriveKeyPBKDF2), 1,000,000 iterations by default (650k–1M by type) Random salt, 32–256 bytes, from ProcessPrng with BCryptGenRandom as fallback; stored as Base64 (RFC 4648) Hash stored as 64 uppercase hex characters; separate verify procedure with constant-time comparison, fail-closed Every secret wiped with SecureZeroMemory plus a redundant Ada overwrite, on success and on every failure path Verification: GNATprove --level=4, all provers: 186/186 checks proved, 0 unproved Re-verified on three GNATprove versions: Community 2021
…