How does 7-zip verify that the password is provided correctly?

I am trying to understand exactly how 7-zip will recognize if the password is provided correctly.

For example, I have an x.7z file that is password protected with a password. Before I try to open it, the interface asks for my password. How does 7zip verify that this password is correct before trying to unzip the file and fails?

+4
source share
1 answer

It encrypts the file using AES with a password as a key. Typically, these things will try to decrypt the block in which it knows the value (for example, the header, which is the same for each 7z file), and then compares the decrypted value with what it expects. If they do not match, he knows that the password is incorrect.

+2
source

All Articles