Project Page: github/offline-decrypt

A while ago I created for storing encrypted files in Google Drive with client-side encryption.

One of the fears for using such a system is what happens if 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

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:

File ID

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.

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

Just run node . to decrypt the file