
XChaCha20-Poly1305 decrypt
Decrypt a file produced by XChaCha20-Poly1305 encrypt, on your device.
XChaCha20-Poly1305 decrypt reverses XChaCha20-Poly1305 encrypt, reading the 16-byte salt and 24-byte nonce stored ahead of the ciphertext to rebuild the same PBKDF2 key. A file shorter than 56 bytes, salt, nonce and Poly1305 tag combined, is refused before decryption starts. A wrong password and a corrupted file produce the identical decryption-failed message, so neither cause is named.
Questions
What is the minimum valid file size?
56 bytes: 16 for the salt, 24 for the nonce, and 16 for the Poly1305 tag. Shorter files are refused up front.
Why did I get "decryption failed"?
Either the password does not match or the file is corrupted or not from XChaCha20-Poly1305 encrypt; the two causes are not distinguished.
How is the output named?
By stripping the .xchacha20p1305 suffix, or adding .dec if there is none.
Can I use this from the command line?
Yes, it runs the same on the page, the CLI and MCP.
What happens with the wrong nonce length?
Any file shorter than the required salt plus nonce plus tag length is refused before the key is even derived.