Něco o "soli" tam je:
http://www.google.com/codesearch/p?hl=en#HPREjo_RR rs/p7zip_4.43/7zip/Crypto/7zAES/7zAES.cpp&l=162
bool CKeyInfo::IsEqualTo(const CKeyInfo &a) const
{
if (SaltSize != a.SaltSize || NumCyclesPower != a.NumCyclesPower)
return false;
for (UInt32 i = 0; i < SaltSize; i++)
if (Salt[i] != a.Salt[i])
return false;
return (Password == a.Password);
}
void CKeyInfo::CalculateDigest()
{
if (NumCyclesPower == 0x3F)
{
UInt32 pos;
for (pos = 0; pos < SaltSize; pos++)
Key[pos] = Salt[pos];
for (UInt32 i = 0; i < Password.GetCapacity() && pos < kKeySize; i++)
Key[pos++] = Password[i];
for (; pos < kKeySize; pos++)
Key[pos] = 0;
}
else
{
NCrypto::NSha256::CContext sha;
const UInt64 numRounds = UInt64(1) << (NumCyclesPower);
Byte temp[8] = { 0,0,0,0,0,0,0,0 };
for (UInt64 round = 0; round < numRounds; round++)
{
sha.Update(Salt, SaltSize);
sha.Update(Password, Password.GetCapacity());
sha.Update(temp, 8);
for (int i = 0; i < 8; i++)
if (++(temp[i]) != 0)
break;
}
sha.Final(Key);
}
}