Expand description
§Encryption Module - Data Encryption Primitives
Provides encryption for data in transit and at rest using:
- ChaCha20-Poly1305: AEAD symmetric encryption
- X25519: Diffie-Hellman key exchange
- HKDF-SHA256: Key derivation
§Encryption Layers
| Layer | Scope | Key Type |
|---|---|---|
| Transport | Peer-to-peer connections | Session keys (DH) |
| Storage | At-rest documents | Device key |
| Cell Broadcast | Cell-wide messages | Group key |
Structs§
- Encrypted
Cell Message - Encrypted message for cell broadcast
- Encrypted
Data - Encrypted data with nonce
- Encrypted
Document - Encrypted document for at-rest storage
- Encryption
Keypair - X25519 keypair for key exchange
- Encryption
Manager - Encryption manager for secure communications
- Group
Key - Group key for cell broadcast encryption
- Secure
Channel - Secure channel between two peers
- Symmetric
Key - Symmetric key for encryption/decryption
Constants§
- NONCE_
SIZE - Size of encryption nonce in bytes (96 bits for ChaCha20-Poly1305)
- SYMMETRIC_
KEY_ SIZE - Size of symmetric key in bytes (256 bits)
- X25519_
PUBLIC_ KEY_ SIZE - Size of X25519 public key in bytes