# firecloud-crypto
Encryption and key management for the FireCloud distributed storage system.
## Overview
Provides cryptographic primitives for secure file sharing and messaging:
- **Key generation**: Ed25519 identity keys, X25519 encryption keys
- **Encryption**: ChaCha20-Poly1305 AEAD cipher
- **Key derivation**: Argon2 password hashing
- **Key exchange**: X25519 Diffie-Hellman
## Usage
```rust
use firecloud_crypto::{KeyPair, encrypt_data, decrypt_data};
// Generate identity keypair
let keypair = KeyPair::generate();
// Encrypt data
let ciphertext = encrypt_data(&plaintext, &recipient_pubkey)?;
```
## Features
- Memory-safe key handling with `zeroize`
- Modern cryptographic algorithms
- Random key generation with `rand`
## Security
This crate uses well-audited cryptographic libraries:
- `chacha20poly1305` for authenticated encryption
- `ed25519-dalek` for signatures
- `x25519-dalek` for key exchange
- `blake3` for hashing
- `argon2` for password derivation
## License
Licensed under either of:
- Apache License, Version 2.0 ([LICENSE-APACHE](../../LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license ([LICENSE-MIT](../../LICENSE-MIT) or http://opensource.org/licenses/MIT)
at your option.