Xconfess/Xconfess
[Wave 6] Add E2E encryption round-trip test suite (rotation + malformed payload cases)
Open
#1,669 opened on Jul 28, 2026
Backendhelp wantedsecuritytest
Repository metrics
- Stars
- (14 stars)
- PR merge metrics
- (PR metrics pending)
Description
Problem
The private messaging E2E encryption (X25519 / HKDF-SHA256 / AES-256-GCM) has no dedicated round-trip test suite covering key rotation or malformed-payload handling — only implicit coverage via feature tests.
Tasks
- Add a dedicated encryption test suite: encrypt/decrypt round trip for standard payloads
- Add malformed-payload cases: truncated ciphertext, wrong nonce length, tampered auth tag (should fail decryption, not throw an unhandled exception)
- Add a key-rotation case: message encrypted under an old ephemeral key still decrypts correctly on the recipient side
- Add a large-payload case (near any message size limit) to catch buffer-handling bugs
Acceptance Criteria
- All new tests pass in pm run backend:test
- Tampered ciphertext/auth tag produces a clean, typed error rather than a crash
- Test suite is referenced in xconfess-backend/README.md under testing
Labels
Backend, security, test, help wanted, Stellar Wave