I am studying the way that can be used to check if a given password for an encrypted zip file is correct or not. I see this link:
How does a zip file detect a correct password?
In the answer of this question, it said CRC is used to check if a password is correct. It also paste a code snippet from Info-zip to prove this.
However, after carefully studying the Info-zip source code, as below:
if ((ush)(c | (b<<8)) != (GLOBAL(pInfo->ExtLocHdr) ? ((ush)GLOBAL(lrec.last_mod_dos_datetime) & 0xffff) : (ush)(GLOBAL(lrec.crc32) >> 16)))
I find when there is ExtLocHdr in the zip item, the lower 2 bytes of last_mod_dos_datetime, instead of the CRC, will be used to verify the password. But this is not mentioned in the file format specification in https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT at all.