Structs§
- Encryption
Service - Manages encryption keys and provides XChaCha20-Poly1305 encryption/decryption
Enums§
Constants§
- CHUNK_
SIZE - 64KB plaintext chunks
- ENCRYPTED_
CHUNK_ SIZE - Each encrypted chunk: plaintext + 16-byte auth tag
- NONCE_
SIZE - XChaCha20-Poly1305 nonce size (24 bytes).
- TAG_
SIZE - Poly1305 auth tag size (16 bytes).
Functions§
- encrypted_
chunk_ range - Calculate the encrypted byte range for a plaintext byte range.
- generate_
random_ key - Generate a random 32-byte key.