Skip to content

Repository files navigation

dDocs & dSheets Walkaway

About

How dDocs & dSheets pass the walkaway test with love 💛.

An open-source static page to recover and decrypt documents & spreadsheets locally, without depending on Fileverse or centralized servers.

Intro

This repo contains the code to independently recover documents and spreadsheets tied to your ddocs.new and dsheets.new account using your backup keys, in case the main apps are down. It’s designed to help you keep end-to-end control of your files, without depending on centralized servers.

Prerequiste

Setup

  1. Clone the repository:

    git clone https://github.com/fileverse/walk-away-ddocs.git
    
  2. Install it dependencies:

    npm install

Configure Environment Variables

Copy the .env.example file to .env in the root directory:

cp .env.example .env

Update with config values

Run the App

Start the development server:

  npm run dev

Dependencies

Back-up Keys and Data Encryption

Overview of the Backup Keys

Your portal keys consist of :

  • Portal Address – The contract address that manages your ddocs and dsheets files.
  • Owner Public Key -  An RSA-generated public key used by the portal owner to encrypt ddocs and dsheets file data.
  • Owner Private Key - An RSA-generated private key used by the portal owner to decrypt their ddocs and dsheets file data.
  • Portal Public Key - An RSA-generated public key used by collaborators to encrypt ddocs and dsheets file data shared with the portal.
  • Portal Private Key -  An RSA-generated private key used by collaborators to decrypt ddocs and dsheets file data shared with the portal.
  • Member Public Key -  An RSA-generated public key used by portal members to encrypt their own ddocs and dsheets file data.
  • Member Private Key - An RSA-generated private key used by portal members to decrypt their own ddocs and dsheets file data.

How are files linked to a portal ?

Files are linked to a portal by the portal address and the fileID.

How is a file encrypted?

Files are encrypted using an AES key, which is generated by encrypting the file through Penumbra. This AES key is then further encrypted to create different access locks:

  • Portal Lock – Created by encrypting the file key with the portal public key.
  • Owner Lock – Created by encrypting the file key with the owner's encryption key.
  • Link Lock - Created by encrypting the file key with a link key. Link keys are unique, randomly generated AES keys for each file, which are stored in an encrypted format using the owner’s public key. They are are used for sharing files via a link.

How is a file decrypted?

Files can be decrypted using any of the available locks:

  • Portal Lock – Contains the encrypted file key, which is decrypted using the portal private key.
  • Owner Lock – Contains the encrypted file key, which is decrypted using the owner's private key.
  • Link Lock – Contains the encrypted file key, which is decrypted using the link key.

You can refer to this code for more

How is a Comment Decrypted?

A comment and its data are decrypted using the comment key, which is retrieved from the owner, portal, or link locks. The corresponding lock is decrypted using its associated key.

About

How dDocs.new and dSheets.new pass the walk away test, with love. Recover your encrypted docs and sheets.

Resources

Stars

11 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages