[FEATURE] Encryption
See original GitHub issueWhy is your feature relevant to client-zip?
Encryption is on client-zip
roadmap, but the author does not see use case for it. Therefore, I would like to add my use case.
Describe the solution you’d like
I am running workers to backup data from cloud services to another, as zip archives. Certain users have requested for their backups to be encrypted, since they may contain personal data. Currently, I have to fetch data locally, zip it with encryption, and then upload again. It would be nice to be able to use client-zip
to do it all in one step.
Describe alternatives you’ve considered There is not really a JS library that does encryption for zip, so the alternative is really just to download data all at once, zip it with encryption, and upload the result.
Issue Analytics
- State:
- Created a year ago
- Comments:9 (5 by maintainers)
Top GitHub Comments
After studying the spec and searching the Web in vain, I am officially dropping RSA public key encryption. Just in case someone else comes along wanting that feature : sorry, won’t do. I won’t even accept a pull request to add it to client-zip if someone manages to implement it. If your users are advanced enough to use public keys, I suggest you let them encrypt the whole file with PGP instead.
Why not RSA ? I couldn’t find a single open-source implementation, and it’s based on an old Microsoft key format. More importantly, there is practically no zip utility that supports RSA (except the original PKWare Zip program), so even if client-zip could use this encryption, most users would be left unable to ever decrypt the result.
Password-based encryption is still on the table. It’s horribly complicated of course, but it seems to be all there in the spec, and decryption is supported by most programs. I still wouldn’t recommend it because of all the inherent vulnerabilities of passwords, but I’ll do it.
Anyway, “strong” encryption (that is, encryption that can’t be broken in a matter of minutes and doesn’t leak all your metadata) requires the Zip64 format, so this feature will be exclusive to the 2.x branch (and future branches) of client-zip.
Take your time. no rush 😃