Unzip password protected ZIP

Does ionic support unzipping password protected zips?
If not, are there any plans to support this feature in the near future? https://ionicframework.com/docs/native/zip/

Ionic doesn’t support any of this itself at all, it only offers a convenient wrapper around a Cordova plugin.

If there is a Cordova plugin to unzip password protected ZIPs, Ionic can support it. Does https://github.com/MobileChromeApps/cordova-plugin-zip? Do other plugins?

I understand. I didn’t find any plugin to unzip password protected ZIPs, although it seems there’s some demand for it.

Is there anywhere I can put an official request for it?

You can create a issue for ionic-native on Github, but if there is not Cordova plugin for it they can’t do anything. But maybe someone has a private Cordova plugin and then puts it on Github because he saw the need on Ionic Native.

Otherwise… not really :frowning:

Got it :frowning: Thanks for the help

What’s the underlying use case here? Do we control the generation of these assets?

Upon request from my ionic app, my server is bundling existing assets such as images and json files into a password protected ZIP and responds with it.

Once downloaded, I’d like to unzip it on the device.

Then I think this can be done on your own. I’m not sure how you want to convey the password to the user, but I would consider the WebCrypto API a good choice for dealing with the security. AES-GCM is my personal favorite symmetric algorithm.

This is experimental, would it be wise to use it in production?

If so, would the direction be to ZIP the files, encrypt the ZIP, then on device decrypt the ZIP and unzip the files? In other words the encryption and decryption wouldn’t be part of the zipping/unzipping process itself.

I think it would be as safe as what you were proposing in the first place. The means of conveying the shared secret (password) to the user is the tricky part.

That’s what I’m thinking.

1 Like

Got it, I’ll give it a try.

Any ideas regarding conveying the password to the user? Not really related to ionic, but I’m curious.

The most important factor here is whether you have a secure connection (like https). If so, then there probably isn’t any need to be doing password protection of assets at all, so I’ll assume you don’t. You might want to look into zero-knowledge encryption, although it might be simpler just to use https in the first place.

I have https actually.

I’d like to add an extra layer of protection for hackers trying to forge requests.

Assuming they somehow managed to forge a correct session and start downloading the files, the files will be password protected.

I’ll look more into zero knowledge encryption. Thanks :slight_smile:

Hi @royibernthal
I have same use case to bundle the assets into a password protected ZIP .
Please share the approach or plugin you have used to accomplish this.

Please help me !!!
Appreciate your response.