Skip to content

552020/wetkeys

Repository files navigation

Droplocked - VetKey Encrypted File Storage

Welcome to Droplocked, a secure, decentralized file storage system built on the Internet Computer with vetKey encryption. This project provides end-to-end encrypted file storage where encryption is completely invisible to users.

Features

  • 🔐 VetKey Encryption: Automatic file encryption using verifiable encrypted threshold keys
  • 👤 User Authentication: Internet Identity integration for secure authentication
  • 📁 File Management: Upload, download, and manage files with automatic encryption
  • 🦭 Walrus Integration: Optional integration with Walrus for decentralized storage
  • 🔒 Privacy First: Files are never stored in plain text
  • 🚀 Invisible Security: No key management required from users

Architecture

Droplocked uses vetKeys to provide end-to-end encryption:

  1. Upload: Files are automatically encrypted using vetKeys before storage
  2. Storage: Only encrypted content is stored on-chain
  3. Download: Files are automatically decrypted for authorized users
  4. Security: Encryption is completely transparent to users

Quick Start

To get started, you might want to explore the project directory structure and the default configuration file. Working with this project in your development environment will not affect any production deployment or identity tokens.

To learn more before you start working with vtk, see the following documentation available online:

If you want to start working on your project right away, you might want to try the following commands:

cd vtk/
dfx help
dfx canister --help

Running the project locally

If you want to test your project locally, you can use the following commands:

# Starts the replica, running in the background
dfx start --background

# Deploys your canisters to the replica and generates your candid interface
dfx deploy

Once the job completes, your application will be available at http://localhost:4943?canisterId={asset_canister_id}.

If you have made changes to your backend canister, you can generate a new candid interface with

npm run generate

at any time. This is recommended before starting the frontend development server, and will be run automatically any time you run dfx deploy.

If you are making frontend changes, you can start a development server with

npm start

Which will start a server at http://localhost:8080, proxying API requests to the replica at port 4943.

Note on frontend environment variables

If you are hosting frontend code somewhere without using DFX, you may need to make one of the following adjustments to ensure your project does not fetch the root key in production:

  • setDFX_NETWORK to ic if you are using Webpack
  • use your own preferred method to replace process.env.DFX_NETWORK in the autogenerated declarations
    • Setting canisters -> {asset_canister_id} -> declarations -> env_override to a string in dfx.json will replace process.env.DFX_NETWORK with the string in the autogenerated declarations
  • Write your own createActor constructor

VetKey Encryption

Droplocked uses vetKeys for automatic file encryption. The encryption is completely transparent to users:

  • Automatic Encryption: Files are encrypted before storage using vetKeys
  • Automatic Decryption: Files are decrypted on-demand for authorized users
  • No Key Management: Users don't need to manage encryption keys
  • Privacy Preserving: File content is never stored in plain text

For more details, see VetKey Integration Documentation.

Walrus Development Setup

To use the Walrus file upload feature, you need to set up a Sui development keypair:

  1. Generate a keypair (run this in your browser console or a Node.js script):

    import { Ed25519Keypair } from "@mysten/sui/keypairs/ed25519";
    const keypair = Ed25519Keypair.generate();
    console.log(Array.from(keypair.export().privateKey));
  2. Create a .env file in the project root and add:

    VITE_SUI_SECRET_KEY=123,456,789,...
    

    Replace the numbers with the output from step 1.

  3. Fund the wallet with testnet SUI and WAL tokens for testing.

Note: This is for development only. In production, use real wallet integration.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •