page | title | tags | date |
---|---|---|---|
Offline Decrypt of Google Drive Encrypted Files |
nodejs, encryption |
2020-01-02 |
A while ago I created https://drive-encrypt.com for storing encrypted files in Google Drive with client-side encryption.
One of the fears for using such a system is what happens if https://drive-encrypt.com went offline. This repository is the answer to that fear.
- Install NodeJS and NPM
- Clone this repository
- Run
npm install
in the checkout dir to install crypto-js
Download your encrypted file (with a .enc
extension) from Google Drive to the checkout directory.
You can also download elsewhere, but will need to worry more about input and output paths.
Metadata is stored along with each file which contains crutial parameters for encryption. The easiest way to get them manually is with the Google Drive API Explorer:
First we need the file ID:
Edit the q
parameter to match the name of your .enc
file and press execute. Copy the file ID
from the response
Edit the file ID
parameter to match the output of the previous request, then execute and note the properties returned for the file.
Edit index.js and set the filename and matching encryption parameters based on the results of the request above
Just run node .
to decrypt the file