Principle

A persistently encrypted storage within a peer to peer network.

Abstract

mystik>p2p enables a user or agent to store an encrypted file while adding file’s hashed metadata.
As the network does not know the content of the file and its metadata, another user (or agent) who would like to request the file would need to know the corresponding plaintext metadata.

This development is based on Protocol Labs’ open-source library: libp2p and written in Rust.
As a reminder, the mechanism of the well-known IPFS is also based on libp2p.

Mechanism (sum up)
  • Storing files
    • A user/agent uploads a plaintext file which creates a CID (content ID) of its encrypted version.
    • At the same time the user/agent adds metadata (e.g., FileName, FileType, Secret), which are included as leaves of a Merkle tree. It creates a MID (metadata ID).
    • The local node stores the MID / CID pair and publishes the MID to the peer-to-peer network.
  • Requesting files
    • A user/agent provides the plaintext metadata of the desired file.
    • The local node computes the MID and makes a request to the peer to peer network.
    • A remote node which has the MID accepts the request and sends the encrypted file.

To observe a high level of privacy, the private_key and nonce generated at encryption can be transmitted via external means to the new user of the file.