forked from icsharpcode/SharpZipLib
-
Notifications
You must be signed in to change notification settings - Fork 0
Zis aes - Fix HMAC Calculation #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
remogloor
wants to merge
162
commits into
Numpsy:rw/zis_aes
Choose a base branch
from
remogloor:zis_aes
base: rw/zis_aes
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
Change the BZip2 Compress/Decompress functions to throw ArgumentNullxception rather than Exception when null stream parameters are provided
…archives * Store ZipEntry.DateTime in dedicated backing field This allows reading values with a higher resolution than DOS time (2 second accuracy). * Fix getting unix modification time in ZIP files InfoZIP actually does respect a file's modification time, even if the access time and/or creation time are not set. * Remove backing field for ZipEntry.DosTime, convert to and from ZipEntry.DateTime instead This prevents the two values from becoming potentially inconsistent.
…es using FastZip
… to test multiple block sizes
copyCount was being computed but not passed to Array.Copy(), which caused an exception to be thrown when enough bytes were read from an encrypted stream.
* fix doc comment in ZipInputStream.BodyRead * fix doc comment in ZipOutputStream.SetComment
* add encoding parameter to creating tar entry default is same as current master behavior(omit upper byte) * add encoding tests(cp932) and add doc comment(icsharpcode#364) * add header bytes test and mark obsolete methods without encodings(icsharpcode#364) but IEntryFactory does not considering name encoding. * forget to mark as obsoleting(icsharpcode#364) * add doc comment for name encoding parameter (icsharpcode#364)
…sswords when decrypting AES entries * Add unit test for reading an AES encrypted entry with an empty password * Allow ZipFile to accept empty strings as passwords when decrypting AES entries
…e written before flush * Add unit tests to repro icsharpcode#382 * Add an override of Flush() to GZipOutputStream to ensure the headers is writen before flushing
…me, string entryName)
…g with FastZip * When extracting folders with FastZip, reset the last modified time if the RestoreDateTimeOnExtract option is enabled * Add unit test for restoring directory timestamps when extracing with fastzip and RestoreDateTimeOnExtract is true
…validate the requested compression method
Co-authored-by: nils måsén <nils@piksel.se>
…s in InflaterDeflaterTestSuite
… benchmark classes
* Add a variant of FastZip.CreateZip with a leaveOpen parameter to control output stream disposal * Add unit test for FastZip.CreateZip leaving the stream open or disposed as required
…csharpcode#711) Bumps [SharpZipLib](https://github.com/icsharpcode/SharpZipLib) from 1.3.1 to 1.3.3. - [Release notes](https://github.com/icsharpcode/SharpZipLib/releases) - [Changelog](https://github.com/icsharpcode/SharpZipLib/blob/master/docs/Changes.txt) - [Commits](icsharpcode/SharpZipLib@v1.3.1...v1.3.3) --- updated-dependencies: - dependency-name: SharpZipLib dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix(tar): read full extended headers * Update src/ICSharpCode.SharpZipLib/Tar/TarExtendedHeaderReader.cs
…arpcode#766) Replace insecure obsolete method (new RNGCryptoServiceProvider()) with RandomNumberGenerator.Create() in PkzipClassic, ZipFile and ZipOutputStream. See docs.microsoft.com/en-us/dotnet/api/system.security.cryptography.rngcryptoserviceprovider?view=net-6.0 and dotnet/runtime#40169
Co-authored-by: nils måsén <nils@piksel.se> Co-authored-by: Simon Ensslen <simon.ensslen@griesser.ch>
changes needed for the upcoming release, mainly related to .NET 6 compatibility
769b6b3
to
5972bae
Compare
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.
Hi
I took a look at your draft for ZipInputStream AES support. The problem with the HMAC calculation is that your implementation always decrypted and calculated HMAC for the entire input buffer. But actually it should only decrypt and calculate the HMAC up to the compressed size of the current entry. This pull request fixes that problem and all the Unit Tests pass.
You might want to look into that implementation again as I don't know from your changes if there is anything else that needs to be changed.
Best regards
Remo
I certify that I own, and have sufficient rights to contribute, all source code and related material intended to be compiled or integrated with the source code for the SharpZipLib open source product (the "Contribution"). My Contribution is licensed under the MIT License.