Skip to content
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

About AES encode #1

Closed
szmulder opened this issue Feb 22, 2015 · 9 comments
Closed

About AES encode #1

szmulder opened this issue Feb 22, 2015 · 9 comments
Assignees

Comments

@szmulder
Copy link

I can see you support AesDecoderStream, do you support AesEecoderStream?
How can I user it if supported?

Thanks!

@weltkante
Copy link
Owner

So far I've only ported the AES decoder so it's currently not possible to output encrypted archives, but I'll take a look. If System.Security.Cryptography outputs data compatible to the 7z format I may be able to implement it.

@weltkante weltkante self-assigned this Feb 23, 2015
@szmulder
Copy link
Author

I have to say your project is the best 7Z project I have ever seen.
Very easy to use as well!

@weltkante
Copy link
Owner

I've done some initial testing and it looks like it is possible to use System.Security.Cryptography for implementing an AES encoder. However before doing so I need to fix some other issues, in particular issue #5 is important to verify the password when you later unpack an encrypted 7z archive. If the (optional) checksum is not present 7z can still decrypt the file but cannot tell if your password was correct. If it isn't correct you get random garbage in the decrypted file, but 7z doesn't realize that when it doesn't have a checksum to compare with.

@szmulder
Copy link
Author

Very nice work!

@szmulder
Copy link
Author

szmulder commented Mar 3, 2015

Is the AES encoder available to use?

@weltkante
Copy link
Owner

Sorry, I only have limited time and have been using that to work on issue #4 - right now I can't get the sample to work as it was intended so there is not much point in working at new encoder variants until that bug is fixed.

I do have a prototype version which can be used in the ArchiveWriter.ConnectEncoder call but currently this means you have to chose between encryption and compression and can't use them both at the same time, which is probably not really useful, so I didn't bother to check it in.

@weltkante
Copy link
Owner

After fixing the deadlock issue I'll work on AES over the next week.

@weltkante
Copy link
Owner

Initial implementation for AES encryption is checked in, it should match what 7z 9.22 does.

The sandbox-7z project is updated as an example, but basically you create an EncryptionProvider with the desired password and assign it to the ArchiveWriter and the encoders will pick it up.

@szmulder
Copy link
Author

Your are my hero! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants