Offline Decrypt of Google Drive Encrypted Files
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
npm installin the checkout dir to install crypto-js
Get the File
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.
Get the Encryption Parameters
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:
q parameter to match the name of your
.enc file and press execute. Copy the
file ID from the response
file ID parameter to match the output of the previous request, then execute and note the properties returned for the file.
Apply the parameters
Edit index.js and set the filename and matching encryption parameters based on the results of the request above
Run the Decryption
node . to decrypt the file