Skip to content

gabrieldemian/minerva-contract

Repository files navigation

About

This is the blockchain contract of a project of mine, named "Minerva". An end-to-end encrypted email service powered by Solana blockchain.

I did this project mostly to learn how to implement end-to-end encryption.

Encryption

The frontend is responsible for encrypting and decrypting data, while the blockchain is only used to store public information about the encryption, key exchange, and the email itself.

I used AES-256 bit with Counter Mode.

Key Exchange

I used diffie-helmann algorithm for the key exchange, each user get a public an private key at the registration moment. Only the public key is stored on the blockchain.

Run the project

First of all, open /Anchor.toml and make sure that it is pointing to your wallet and the cluster that you want to run on.

Run the following commands on your terminal, at the root of the project:

yarn
anchor build
anchor test

Architecture

... ├─ src
│ ├─ context.rs -> structs used on my instructions arguments
│ ├─ error.rs -> error structs
│ ├─ lib.rs -> my entrypoint, processor, and register modules
│ ├─ state.rs -> state structs
│ ├─ utils.rs -> helpers functions
...

About

An end-to-end encrypted email service powered by Solana blockchain

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published