lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 7 Mar 2014 12:23:14 +0100
From: CodesInChaos <>
Subject: Re: [PHC] Are password trailing 0's a problem?

I like putting PBKDF2 in between the two parts of HKDF:

hash1 = HKDF-Extract(salt, password)
hash2 = PBKDF2(hash1)
hash3 = HKDF-Expand(hash2, purpose, length)

Using HKDF-Expand avoids the large cost increase for larger outputs
and supports a purpose string.
Using HKDF-Extract avoid the collisions (both the >64 and the 0
padding variants) because it uses the salt not the password as HMAC

Of course it still leaks information about the length of the password,
but that's unavoidable if one doesn't limit the maximal password

If you want to apply a pad, consider a removable padding, like PKCS#7
instead of null padding.

Even without a padding, an implementation can always choose to
implement the initial hash step in constant time for all inputs
shorter than a threshold.
For example you could always use 5 SHA-256 compressions to avoid side
channels on passwords shorter than 300
or so bytes using proper constant time selection to choose one. The
only problem with that is that many implementors won't bother.

Powered by blists - more mailing lists