How to decrypt rclone-uncrypted data downloaded from the Google Drive front-end (website)

Hello,
I’m successfully using rclone with an encrypted Google Drive remote. I can upload to it, download from it etc, etc…
However, I sometimes use the front end of Google Drive: https://drive.google.com/. I can see all my encrypted files and folders. But I would like to download them on-the-go from my browser and then decrypt them to read them on my laptop.

How could I do that?

Thanks in advance for your help.

You’d install rclone on your laptop and use rclone.

You can rclone copy remote: local to move files from your encrypted mount to the local machine.

Thank you for your answer. However, I know I can do it from the rclone CLI, and I know how to do it. What I was asking was if there was a way or a tool to decrypt rclone-encrypted files locally?

To my knowledge it does not work like that. You can’t decrypt a local file.

You’d have to use the tool and copy as I shared the command for.

You can point the rclone config to a local path and browse it via the mount if that is what you’re asking.

[local]
type = local
nounc =

[local-crypt]
type = crypt
remote = local:
filename_encryption = standard
password = removed
password2 = removed

What would the mount look like?

I dropped an encrypted file into my

/test folder and I want to mount that to get decrypted. What would it look like?

Just a simple mount…

rclone mount local-crypt:/path/to/files /some/place/

Once you do that, you can read the files like a normal virtual file system decrypted.

Hmm, tried that and doesn’t work on my mac. Not sure if it is a mac thing or not. Let me play around a bit.

notebook2:~/test$ rclone lsl local-crypt:
400376 2014-04-01 09:47:14.547000000 JewelersOnTime_com.mht
notebook2:~/test$ ls -l
total 392
-rw-rw-r-- 1 xxxxx xxxxx 400520 Apr 1 2014 3kq5hmobineto49g2kid4tco3tf1juolde3uif3vsp258lqbflo0

It will walk the directory based on the definition in the config config

[local]
type = local
nounc =

[local-crypt]
type = crypt
remote = local:
filename_encryption = standard
password = *****
password2 = *****

The path will be relative with the above setup to my current directory. Or you can specify a absolute path like this:

[local]
type = local
nounc =

[local-crypt]
type = crypt
remote = local:/home/xxxx/test
filename_encryption = standard
password = *****
password2 = *****

technically you don’t even need a mount. You can use ‘cat’ or any other rclone directive.

Awesome.

Yes, I got it working now as well.

Thank you for the advice, I’ll give a try soon but this looks promising!

Now suppose I want to share those files with the built-in share functionality of Google Drive. To share my encryption password with someone is one thing, but the full control of my Drive remote is another (through the conf file or whatever).

Isn’t there a documentation material I can get to understand how the rclone encryption is working? So then I might come up with a script or something like this that recursively uncrypt the files just using my password and ship it to my friend’s.

Again, thanks for your time and knowledge sharing.

The source is available and the docs have some detail. You’d have to go through them. I don’t know why you wouldn’t just use rclone though to decrypt them.

Would it be possible to create an extension for i.e Google Chrome that took your rclone settings and “decrypted” the files locally on your computer (i.e “translated” the encrypted filenames in the browser)?

I understand your question, the fact is that not everybody in my relatives is tech-savvy and the idea of a UNIX terminal makes them sick (in the eventuality that they own a UNIX based system!)… @nle 's idea could be perfect but even a simple one click script could help. However I don’t know where to look for the encryption tool that rclone is using… Is it NACL? Can we decrypt the files using another language (one I could be familiar with) and the sole password I entered in rclone?

All the source code is on github so you can look/find anything you need.

I believe all the code for the crypt part is here:

I don’t think that folks don’t want to do what you are asking, just that there is only so much time and the goal is to make rclone as best as possible. The more things added that aren’t “core”, the less time folks have. While it sounds nice, I don’t think it’s realistic that the rclone folks will write a chrome extension.

I agree and understand what you’re asking but rclone is the same as another tool but a browser extension would be great too. Anything could be written…

In my space, I also share with my family but i’ve created a service that does the work for them. I host a webdav server on a VPS in the cloud and they can browse using many different tools like an end user should. That may be an option. There is a multitude of ways that you can ‘service’ the files that are stored in google drive. You’d just need to pick the right option for you and implement it for them or alternatively write your own based on the source.

There was some work on this

I haven’t tried it personally though.

I'm attempting to replicate this process and not having any luck. Could someone give me a hand?

Downloaded encrypted directory from Gdrive.
Created a local remote
Created a local crypt for that remote
My config looks very similar:

[loc]
type = local

[locS]
type = crypt
remote = loc:/Users/username/local-DeCrypt
filename_encryption = off
directory_name_encryption = false
password = ***********
password2 = *********

Command Used:
rc mount locS:/Users/username/chapter06 /Users/username/test

Where chapter06 is the downloaded gdrive directory(files end with .bin)

All you need to do is change copy the section that connects to your google drive encrypted volume and paste it into your config for the 'LocS' one. You'll need the password, password2, and filename_encryption set properly. It sounds like your filename_encryption variable isn't correct since you're seeing 'bin' files.

In the future please don't bump year old threads. Open a new one with your questions.

1 Like

Thanks for the reply. That worked! Will create new threads in the future.

1 Like