#secure-communication #encryption-key #random-key #aes-gcm #clients #chains #client-server

ovunto-security

A library for secure end-to-end communication between clients through a server

13 releases

new 0.1.13 Apr 28, 2024
0.1.12 Apr 26, 2024
0.1.3 Mar 19, 2024

#956 in Cryptography

Download history 164/week @ 2024-02-24 116/week @ 2024-03-02 39/week @ 2024-03-09 188/week @ 2024-03-16 12/week @ 2024-03-23 28/week @ 2024-03-30 6/week @ 2024-04-06 121/week @ 2024-04-13 385/week @ 2024-04-20

540 downloads per month

MIT license

74KB
1K SLoC

Ovunto Security

Ovunto Security is a Rust library for secure end-to-end communication between clients through a server. It provides functionality for encrypting and decrypting messages, managing keys, and constructing cryptographic chains.

Features

  • Encryption: Encrypt and decrypt messages using AES-GCM encryption.
  • Key Management: Derive keys from passwords and salts, manage keyrings, and generate random keys. Chain Construction: Build cryptographic chains for secure communication between clients.

Installation

Add this crate to your Cargo.toml

[dependencies]
ovunto-security = "0.1.0"

Usage

use ovunto_security::{Error, Keyring, Salt};
fn main() -> Result<(), Error> {
    let (username, password) = form().map_err(|_| Error)?;
    let salt = Salt::random();
    let keyring = Keyring::derive_from(password, &salt)?;
    let mut sender_chain = keyring.into_chain();

    let cipher1 = sender_chain.add(format!("{username} initiated a chain"))?;
    let cipher2 = sender_chain.add("Some cookies!".to_owned())?;

    let mut receiver_chain = keyring.into_chain();
    let change1 = receiver_chain.decrypt(cipher1.clone())?;
    let change2 = receiver_chain.decrypt(cipher2.clone())?;

    println!("{:?}", (cipher1, cipher2));
    println!("{:?}", (change1, change2));

    Ok(())
}

Documentation

API documentation for this crate can be found on docs.rs.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Dependencies

~13MB
~221K SLoC