Module encryption

Module encryption 

Source

Structs§

EncryptionService
Manages encryption keys and provides XChaCha20-Poly1305 encryption/decryption

Enums§

EncryptionError

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.