ovunto-security 0.1.13

A library for secure end-to-end communication between clients through a server.
Documentation
# 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`

```toml
[dependencies]
ovunto-security = "0.1.0"
```

## Usage

```rust
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](https://docs.rs/ovunto-security).

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.