ecies-ed25519-morus

Experimental ECIES on Twisted Edwards Curve25519 and MORUS-1280-128

Notes

Example

```rust use randcore::RngCore; use eciesed25519morus::{encryptinto, decrypt_into};

const BUFFERSIZE: usize = 512 * 1024; // avoid higher than this to prevent stackoverflow let mut rng = randcore::OsRng::default(); let senderkeypair = ed25519dalek::SigningKey::generate(&mut rng); let receiverkeypair = ed25519dalek::SigningKey::generate(&mut rng); let senderpublic = senderkeypair.verifyingkey(); let receiverpublic = receiverkeypair.verifyingkey(); let mut randommessage = [0u8; BUFFERSIZE]; let mut decryptedmessage = [0u8; BUFFERSIZE]; let mut ciphertext = [0u8; BUFFERSIZE]; rng.fillbytes(&mut random_message);

let decryptmaterials = encryptinto( &senderkeypair, &receiverpublic, &mut rng, &randommessage[..], &mut ciphertext[..], ) .unwrap(); decryptinto( &receiverkeypair, &senderpublic, &decryptmaterials, &ciphertext[..], &mut decryptedmessage[..], ) .unwrap();

asserteq!(randommessage, decryptedmessage); assertne!(senderpublic, receiverpublic); ```

Features

bash cargo add ecies-ed25519-morus --no-default-features --features="pure"

bash cargo add ecies-ed25519-morus

bash cargo add ecies-ed25519-morus --features="aarch64-optimizations"

Inspirations

This work is heavily inspired by:

Future Works