3 ms·
This code is actually part of NSS, I wonder whether this affects other applications using the soft token db in a similar capacity. https://dxr.mozilla.org/mozi
by blattimwind 9y ago
This code is actually part of NSS, I wonder whether this affects other applications using the soft token db in a similar capacity.
https://dxr.mozilla.org/mozilla-central/source/security/nss/lib/softoken/sftkpwd.c#49 https://dxr.mozilla.org/mozilla-central/source/security/nss/...
It also processes salt||pw; while that's not a problem per se for password hashing, I generally prefer unique encodings when hashing multiple fields, such as len(salt)||salt||len(pw)||pw.
- tatersolid 9y agoIf there are only two fields, and the length of one is fixed (the salt) then the encoding is unique. SHA1 (and other cryptographic hash functions) generally already include the length as something that is part of the hash itself, so your “length encoding” is completely redundant in the case of hashing salt|password.
- Yoric 9y agoNot sure, but I seem to remember that NSS is also used by Chrome.
- robin_reala 9y agoNot any more: they went to their own fork of OpenSSL called BoringSSL.