0

I'm trying to create a chrome extension that activates when it detects an encrypted zip file in Gmail. The encrypted zip contains an mp3 file. The password for the zip file will be known before hand. I want the chrome extension to decrypt the file using the known password and play it using Javascript.

This is my first time working with Chrome extensions but I believe I know how to code everything except the decryption of the zip file. After some research, I haven't been able to discover how to use existing libraries (like zip.js or jszip.js) to decrypt the zip file.

Any help would be appreciated. Thanks!

SILENT
  • 3,916
  • 3
  • 38
  • 57
  • This might be able to get you going in the right direction http://gildas-lormeau.github.io/zip.js/demos/demo2.html and https://github.com/gildas-lormeau/zip.js – David Corbin May 29 '14 at 17:49
  • @DavidCorbin Thanks for your reply but I tried zip.js. Still not sure how to decrypt the zip file. – SILENT May 30 '14 at 00:39
  • Here is a way to do it with Node but I'm not sure if it will help you. http://stackoverflow.com/questions/23926927/unzipping-a-password-protected-file-in-node-js – David Corbin May 30 '14 at 00:42
  • @DavidCorbin Thanks for the link. Will pursue it. – SILENT May 31 '14 at 01:10
  • Are there any other options to decrypt zip files or to decrypt encrypted mp3 files? – SILENT Jun 03 '14 at 18:03
  • 1
    Possibly this http://tutorialzine.com/2013/11/javascript-file-encrypter/ – David Corbin Jun 03 '14 at 22:38

1 Answers1

0

I ended up decrypting the file using CryptoJS on the client side. Its surprisingly effective, even with 6+ min audio clips.

SILENT
  • 3,916
  • 3
  • 38
  • 57
  • 1
    Can you share the code? Since I use CryptoJS to decode aes-encode file, but it always returns wordarray which length is 0. – alec.tu Oct 23 '15 at 07:15
  • @user3378223 Unfortunately, its been a while since I finished the project. I don't have access to the code presently. – SILENT Nov 01 '15 at 21:22
  • does CryptoJS worked to decrypt actual zip files or you decided to use CryptoJS in both ends? What I mean in the end is: can CryptoJS create zip files? – Absulit Oct 07 '16 at 15:26
  • @Absulit Encryption and Zip files are separate matters. You could encrypt a file and zip it up and do the reverse on the client side. However, last time I checked, it won't create encrypted zip files that can be unzipped by a standard zip program. – SILENT Oct 08 '16 at 16:22