Background Info
Git Repositories
medusa-network/medusa - Code that implements the threshold network/protocol; medusa nodes run this. Currently Private
medusa-network/medusa-contracts - Code that implements a protocol to interact with Medusa via EVM chains
medusa-network/medusa-sdk - A Typescript/Javascript SDK to interact with Medusa contracts from a frontend application
medusa-network/medusa-app - A demo application built with Medusa
A note on the meaning of “Ciphertext”
We use “ciphertext” interchangeably to refer to a few different encrypted things depending on the context. This can get a bit confusing. Here’s an explanation:
There are three distinct things that can be a ciphertext:
- Encrypted Content - this is what your users care about and usually what you care about when building an application. This is usually a file or some sort of long-form content. Medusa does not operate on this, care about this, or even know about this. A user’s content is encrypted symmetrically on their own machine and uploaded to an external storage, such as Filecoin.
- Encrypted key (encrypted with Medusa’s public key) - this is what Medusa refers to as “Ciphertext”. After a user encrypts and uploads their content, they will have a symmetric encryption key. This key is then encrypted with Medusa’s public key to form a “ciphertext”. The resulting ciphertext should be 32 bytes and will be sent when submitting ciphertext to the Medusa oracle contract. The Medusa nodes will operate on (reencrypt) this ciphertext.
- Reencrypted key (encrypted with the user’s public key) - the Medusa contracts and nodes also refer to this as “Ciphertext”. A reencrypted key is the result of a successful request/response to Medusa. Your application receives this key in a callback from Medusa and your user retrieves this key through your frontend by listening for events emitted by your application smart contract. A user can decrypt this key with their private key and then use it to ultimately decrypt the Encrypted Content that they care about.
Development Environment
Local Development
Developing locally with Medusa is not fully supported at the moment.
We have a readme to run a Medusa cluster locally, but there is still a small bit of work needed to expose the blockchain RPC from the private kubernetes network to the local network of your computer. This is needed to connect to the RPC from your browser
TODO:
- [ ] Expose blockchain from private cluster to local machine
Arbitrum Goerli Development