globaleaks / GlobaLeaks

GlobaLeaks is free, open source software enabling anyone to easily set up and maintain a secure whistleblowing platform.
https://www.globaleaks.org
Other
1.21k stars 263 forks source link

Enable recipients to export the submission with an AES encrypted zip file #1581

Open evilaliv3 opened 8 years ago

evilaliv3 commented 8 years ago

As an improvement for #931 it would be valuable if recipients could download the file with an encrypted zip file.

evilaliv3 commented 8 years ago

@fpietrosanti: following the research performed with the clientside crypto few are the things to be kept into account that would make this desiderata difficult; the main critical aspect is that we will have to perform zip+aes clientside.

The interesting aspect if one day will be able to do this is that we can make the user use the same password of the platform or eventually create an independent one but still stored encrypted on the server with the same mechanism of the end2end encryption so that the client will be able to use the password in a transparent way to the user to create the zip files.

The only big concern in being able to do this is that none of the current javascript libraries have such a support.

Im currently considered:

evilaliv3 commented 8 years ago

Related:

NSkelsey commented 8 years ago

@evilaliv3 is the idea of implementing streaming in openPGP-stream still on the table?

Is streaming an encrypted zip file the use-case for the OpenPGP-js issue. If not could you point me to the issue in GL.

evilaliv3 commented 8 years ago

The implementation of the stream is working, but i would now suggest that we consider first to implement it in a non streaming way and then to overcome the possible limits with that.

I answer here your doubts but then let's eventually discuss in relevant tickets:

evilaliv3 commented 3 years ago

I consider that we could restart working on this ticket that considering that files are now downloaded unencrypted would provide important guarantees to the export of the submissions.

I consider in fact that offering an easy possibility to users to export submissions encrypted in a an AES-256 encrypted zip file could be a nice feature.

A secure password could be clientside generated and eventually shown to users on the screen.

evilaliv3 commented 3 years ago

@danifus: I'm looking at your nice implementation of https://github.com/danifus/pyzipper considering to replicate your schema on our version of zipstream: https://github.com/globaleaks/GlobaLeaks/blob/main/backend/globaleaks/utils/zipstream.py

Do you consider that you implementation would easily map on it and would be able to fully work in streaming?

(p.s.: Within globaleaks we could only use software libraries that are included in Debian/Ubuntu as package so that we won't be able for the moment to just use directly your library but in case i will reuse any of your code i will take care to add a mention. Thank you)

danifus commented 3 years ago

Hi,

Both implementations were derived from zipfile.py at some point so there are a lot of similarities. Having a quick look at zipstream, I think it would be be pretty straight forward to integrate. Keep in mind that winzip's AES encryption (which pyzipper implements) doesn't encrypt the filenames. Let me know if you run into any problems integrating it.

Cheers, Dan

evilaliv3 commented 3 years ago

Thank you @danifus for your feedback.

I've two questions actually:

danifus commented 3 years ago

The ability to decrypt the winzip files is not natively supported by any OS as far as I can tell. 7zip is an open source tool that I recommend for handling these files. It is available for windows, mac and linux. There is also Winzip but it requires a purchase and there are probably other programs that can handle these files too.

I haven't looked into encrypting the filenames. I primarily wrote pyzipper because I was receiving files with the winzip AES encryption. 7zip has a few additional encryption methods. One of those may do that but I haven't checked.

elbill commented 3 years ago

I also believe this is a useful feature. So far I instruct users to decompress and compress with 7zip when they need to send encrypted report exports, which involves a few steps in their workflow and sometimes they may not comply and may send unencrypted files over email or non secure channels.