feat: add XChaCha20-Poly1305 and XSalsa20-Poly1305 cipher support #908
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.


Summary
Adds XChaCha20-Poly1305 and XSalsa20-Poly1305 AEAD cipher support via libsodium. These are extended-nonce variants (24 bytes vs 12 bytes) that enable safe random nonce generation for high-volume encryption scenarios.
Changes
New Ciphers
xchacha20-poly1305- AEAD with 24-byte nonce and AAD supportxsalsa20-poly1305- Authenticated encryption (NaCl secretbox style, no AAD)C++ Implementation
XChaCha20Poly1305Cipher.cpp/.hpp- Full AEAD implementation using libsodiumXSalsa20Poly1305Cipher.cpp/.hpp- Secretbox-style authenticated encryptionsodium_memzero()for keys, nonces, tags, and buffersTests
Documentation
cipher.mdxwith algorithm tables and usage examplesimplementation-coverage.mdwith new cipher supportRequirements
These ciphers require
SODIUM_ENABLED=1on both iOS and Android.Testing
Tests are included in the example app test suite:
xchacha20_poly1305_tests.tsxsalsa20_poly1305_tests.tsCloses #885