Git Product home page Git Product logo

dessi's Introduction

Deterministic Encryption and Storage via Snap and IPFS

Background

For dapps to evolve, data needs to be stored in a way that is controlled by the user. There are several solutions to storing a user's data, including IPFS, however these solutions do not have guarantees of security and privacy which are necessary when it comes to user data. Dapps are evolving to use the user's wallet as their main identifier, but there are other powerful use cases lurking and the goal of this snap is to unlock on of them: user-controlled encryption and storage.

EIP-5630 defines a specification for encryption and decryption using deterministically derived, pseudorandom keys for wallets to implement. This snap implements the specification and provides a simple interface for encrypting and decrypting data. This include two methods: eth_getEncryptionPublicKey and eth_decrypt

Example Flow

sequenceDiagram
    participant User
    participant Wallet
    participant Dapp
    participant Storage as Storage/IPFS

    note over User, Storage: Get Key, Encrypt and Store Flow

    Dapp->>Wallet: eth_getEncryptionPublicKey()
    User->>Wallet: Approve
    Wallet->>Wallet: Derive Encryption Key from Wallet Private Key
    Wallet->>Dapp: Return Encryption Public Key
    User->>Dapp: Provide Private Data
    Dapp->>Dapp: Encrypt Data
    Dapp->>Storage: Encrypted Data

    note over User, Storage: Retrieve and Decrypt Flow


    Storage->>Dapp: Encrypted Data
    Dapp->>Wallet: eth_decrypt()
    User->>Wallet: Approve
    Wallet->>Wallet: Derive Encryption Key from Wallet Private Key
    Wallet->>Wallet: Decrypt Data
    Wallet->>Dapp: Return Decrypted Data
    Dapp->>User: Show Decrypted Data

Loading

To run

yarn && yarn start

dessi's People

Contributors

skgbafa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.