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

Support for Central Directory Encryption #141

Closed
nmoinvaz opened this issue Sep 18, 2017 · 5 comments
Closed

Support for Central Directory Encryption #141

nmoinvaz opened this issue Sep 18, 2017 · 5 comments
Labels
fixed Issue or bug has been fixed new feature New feature

Comments

@nmoinvaz
Copy link
Member

nmoinvaz commented Sep 18, 2017

Need to add support for central directory encryption to prevent information leakage about the file names and sizes. Essentially the central directory is encrypted like any other file in the zip and the information in the local file headers are masked.

@nmoinvaz nmoinvaz added the help wanted Need outside help label Sep 18, 2017
@nmoinvaz
Copy link
Member Author

I did some initial investigations and the only application I could find that supported central directory encryption was PKWARE's. Additionally, PKWARE's zip application only supported central directory encryption using their patented Strong Encryption. The minizip library uses WinZIP's AES which doesn't have such licensing restrictions. WinZIP doesn't support central directory encryption at all, and WinZIP's AES specification doesn't mention central directory encryption either. If the minizip library was to implement central directory encryption it would have to use WinZIP's AES which nobody supports. At this point it is probably better to use an outside encryption app to encrypt the entire zip file which would probably be more secure than the WinZIP AES supported in minizip.

@nmoinvaz nmoinvaz added won't do Won't do and removed help wanted Need outside help labels Sep 18, 2017
@nmoinvaz nmoinvaz added 2.0 fixed Issue or bug has been fixed new feature New feature and removed won't do Won't do labels Apr 19, 2019
@nmoinvaz
Copy link
Member Author

This is possible now. See How to Create a Secure Zip under Wiki.

@oleg-cherednik
Copy link

Hi, Have you tried to implement it?

@nmoinvaz
Copy link
Member Author

nmoinvaz commented Oct 16, 2019

It is done. Minizip can zip the central directory and if you are using AES encryption then the central directory will be encrypted. please see the wiki

@oleg-cherednik
Copy link

@nmoinvaz could you help me to extract this algo from the minzip code? I was C/C++ developer many years ago but now I am working on zip4jvm to support it in Java. I have successfully compiled this code but cannot run it in debug mode neither CLion nor VisualStudio. In both cases I have different errors. For me it's enough to have debuggable application and then I can extract what I need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed Issue or bug has been fixed new feature New feature
Projects
None yet
Development

No branches or pull requests

2 participants