New answers tagged

0

Yes, the salt and hash are stored together, and the hash is always stored in a known place - you just need to look up the format for the particular hashing algorithm used to find the details. The salt isn't intended to be any more secret than the hash, so it's no problem storing them together. The use of salt isn't intended to make a brute force attack ...


2

The output of any normal password hashing function consists of the difficulty settings, the salt, and the digest of the password, encoded to some format that password hashing function specifies. The verification function expects the same format, and simply reads the salt out of it. This site has a good explanation for the Argon2 hash functions. For example, ...


2

bcrypt is still considered a reliable password hash (when used with an appropriate cost parameter for modern hardware) but it's quite old and has a bunch of odd quirks; the 72-byte input limit is one of them. As discussed in the other answers, what PyCA's bindings are doing to work around this limit is cryptographically dubious. I would suggest you replace ...


2

Is there a best practice that sanitizes the hash prior to passing it to bcrypt that I am missing, or is there another type of byte-encoding that should be used with passwords? One reasonable thing is to convert the hash to Base64 (say, with the standard base64 alphabet), and truncate to 64 characters (well below the most common input size limit for bcrypt, ...


18

You should not be hashing it before passing to bcrypt, which is designed to do the hashing and key-stretching work itself. It's choking on the hash result because it's expecting a redundant, mushy, ASCII (or UTF-8), not-rigorous, user-entered string. Generally speaking, hashing things that might be untrustworthy is good to avoid various numeric ...


2

Not an expert on 7zip, I'll try a generic answer, I believe is applicable: Lack of salt can be a serious issue, also using a homebrew key derivation function doens't give me a lot of confidence in how they manage their crypto. Though I'm not sure how applicable most salt free attacks are to 7zip. If you lack salt, but still have different IVs, and the format ...


5

The absence of salt is a severe shortcoming only where the cracker seeks access to multiple 7z files. But why would that make a difference? If there is a password verification method and there is no salt, then password search can be batched. Calculate one hash and test for all targets. If you consider that the 7Zip uses SHA-256 with $2^{19}$ iteration this ...


Top 50 recent answers are included