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
[Feature] Filename decryption in the browser + File decryption #1452
Comments
Sounds interesting. If you are not using the built in crypto API ( which I think is only good for generating random values anyway) I would recommend using SJCL It seem to be the only library made by professionals. I only compared it to CryptoJS ( which you should never use any way) and the performance were much better. |
That is fun! Webassembly suport for go would probably be the best way of approaching this in the long run. What are your plans for this? Are you planning to develop this further? |
My initial idea was to just make a little script that would decrypt all names in the browser. This could be used as a user script to improve browsing experiences on acd/gdrive. The current implementation is to slow for that. I will try to implement it using pure JS next.
Step 1. and 2. are done. I did not find a suitable way to use EME with sjcl. Maybe this needs to be ported from here. Edit: It is working! |
I did a port of the EME go module to javascript. The whole think got quite fast with just a few performance tricks. Generating the key using scrypt is the slowest but that part can be cached for the userscript I have in mind. Here is a new little web app. The js used is approx. 40kb. This is only currently tested in latest Chrome. I do think it would be possible to build a streaming decrypter for decrypting files in the web browser but I did not look into it much further. |
Looks promising! Would indeed be great to have an extension/userscript to automatically decrypt file names. |
Any update on this? |
there is certainly demand |
How are you progressing on this? Anything you can share, so we can try to help you on this? |
Any progress on this? |
Sorry for the long delay, I had some time to work on this and got video streaming and general file handling working. Currently this is only working for local files (drag and drop) but I hope I can make this work for streaming files over http too. I made a little video seeing it in action: You can try it for yourself here but be aware that all browsers are very picky in what they take as input files. If the browser can't play the decrypted file it can't play an encrypted file. |
@FWeinb looks great! I've been interested in gopherjs too recently so I have a branch where rclone completely compiles with gopherjs. It doesn't run though ;-) Not quite sure where I'm going, but having rclone run in the browser would be interesting. Do you have code for your experiment you can show? |
I threw a Chrome extension together to decrypt filenames on gdrive using @FWeinb 's work. Check it out and let me know how it works for you. I'll publish it if I can get a couple people to test it. |
noob-alert |
Grab a copy either by cloning the repository or by downloading and extracting the zip file. |
@sscotth The button is there now, but it doesn't decrypt the filenames nor foldernames. |
@sscotth that is very cool - and great job @FWeinb making a reusable library. I could put a link to both projects in the crypt documentation - what do you think? Fancy sending a PR? |
Sorry for the necropost but it's sad to see that solution for online filename decryption have died. Could we get some renowned support for such a feature? |
@kamenoccc You can build a web ui with that. Integrating this with the web apis from google drive is up to the implementation I have not looked into that. |
This looks answered. Closing out. If you still have a question, please feel free to post on the forums. |
It would be great if it where possible to decrypt filenames using javascript in the browser. I made some initial tests using gopherjs to cross compile the
cipher.go
with some minimal wrapper code. You can see an example of it running in the browser here. This approach has some performance issues and the resulting javascript is very big (1MB bundle).This is actually my very first go code so maybe there could be some improvements.
An implementation using something like the Web Crypto API or one of these crypto libs would be much better I think. I will try to implement the decryption schema rclone is using in pure javascript.
The text was updated successfully, but these errors were encountered: