This issue claims that 7zip does not use any salt with its key derivation function: https://github.com/magnumripper/JohnTheRipper/issues/1679
If that's true, wouldn't that mean you can crack multiple 7z files at very little extra cost?
This issue claims that 7zip does not use any salt with its key derivation function: https://github.com/magnumripper/JohnTheRipper/issues/1679
If that's true, wouldn't that mean you can crack multiple 7z files at very little extra cost?
From looking at the source or 7zip that seems to be the case. The format has a place for a salt, as SEJPM's link shows. It is mixed into the homebrewn iterated SHA-256 hash before the key. The 7zip decoder even seems to support salts. However, the encoder never uses a salt.
Oddly there is even code for generating a random 4-byte salt, but it is commented out. In the latest release of the code at least: I do not know if previous versions may have had it enabled.
For example, below is the salt generation part from the encoder (from 7zAes.cpp). Code calling this has also been commented out in various places.
/*
STDMETHODIMP CEncoder::ResetSalt()
{
_key.SaltSize = 4;
g_RandomGenerator.Generate(_key.Salt, _key.SaltSize);
return S_OK;
}
*/