Repository navigation
feat: validate WinZip AES ZIP extraction - #137
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nextestudios
force-pushed
the
feature/64-zip-aes
branch
from
September 27, 2026 04:49
060fc94 to
1725fb7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
InvalidFormatException("bad password");ErrorMappermapped it to "wrong password or corrupt" (non-fatal, per entry). It now maps toWrongPassword, so the extraction stops before writing and the app asks for the password again, like ZipCrypto/RAR.zip/Zip.deflate.WinzipAES.zip(AES-256, AE-2, passwordtest) copied unchanged from SharpCompressb6cc95af(MIT, same provenance as the existing RAR/7z fixtures); extracted files are checked by SHA-256 against the originals.AesZipFixtures(test support) writes AE-1/AE-2 archives per the public WinZip spec (PBKDF2-HMAC-SHA1, AES-CTR, HMAC-SHA1), used for AES-128 (AE-1, CRC checked) and AES-192 (AE-2, CRC 0 skipped).PasswordRequired; wrong →WrongPassword, nothing left behind; correct → byte-identical content; a tampered AE-1 entry is refused by the CRC check and not placed (security boundary).docs/archive-support.md, fixture README and both changelogs updated with the observed results. Documented limitation: AE-2 stores CRC 0 and the engine doesn't verify the HMAC, so tampered AE-2 data is only noticed if decompression fails.Tested in CI
Manual checks
Closes #64
🤖 Generated with Claude Code