Expand description
XChaCha20-Poly1305 authenticated encryption of the payload.
The payload is compressed before it is encrypted, never the other way round: ciphertext is indistinguishable from random and therefore incompressible, so compressing afterwards would cost time and save nothing. Compressing first also shrinks what has to be embedded, which directly lowers the bits per pixel the embedding layer needs — the single most important factor in staying invisible to steganalysis.
Structs§
- XCha
Cha20 Poly1305 Cipher - The production cipher: XChaCha20-Poly1305.
Enums§
- AEAD
Error - Failures of the authenticated encryption primitive.
- Crypto
Error - Failures of the combined compression and encryption stages.
Traits§
- AEAD
Cipher - Authenticated encryption with associated data.
Functions§
- compress_
and_ encrypt - Compresses
plaintextwith Zstandard and then encrypts the result. - decrypt_
and_ decompress - Decrypts
ciphertextand decompresses the authenticated result.