From cf3e984dbffc0fb2a695306a9b4d53257bb74ea8 Mon Sep 17 00:00:00 2001 From: lloyd Date: Tue, 2 Feb 2010 10:48:48 +0000 Subject: Prefix passhash with "$9$" in a manner similar with other password hashing schemes. Increase salt size to 80 bits. Research shows that virtually no other PBKDF2 implementations support anything but SHA-1; for ease of implementation elsehwere switch back from SHA-512 to SHA-1. Should be mostly harmless; it limits total entropy of the password to a maximum of 160 bits, but this is unlikely anyway. Use two bytes to specify the work factor for future-proofing. Add a test. --- doc/examples/passhash.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/examples/passhash.cpp b/doc/examples/passhash.cpp index 0949e944c..1e4c8c505 100644 --- a/doc/examples/passhash.cpp +++ b/doc/examples/passhash.cpp @@ -29,10 +29,8 @@ int main(int argc, char* argv[]) { Botan::AutoSeeded_RNG rng; - Botan::u32bit work_factor = 10; - std::cout << "H('" << argv[1] << "') = " - << Botan::password_hash(argv[1], rng, work_factor) << '\n'; + << Botan::password_hash(argv[1], rng) << '\n'; } else { -- cgit v1.2.3