- Notifications
You must be signed in to change notification settings - Fork653
Closed
Labels
Description
Use AEADs to replace stream cipher + OTA. Previous discussion:#29.
Proposed AEAD algorithms:
- ChaCha20-Poly1305 (see also:xSocks)
- XChaCha20-Poly1305
- Salsa20-Poly1305
- AES-256-GCM (faster but not low-end-box-friendly)
Update: The following shows an example of TCP stream in chacha20-ietf-poly1305 mode (original idea by@breakwa11 and@Noisyfox). Other AEAD should follow the similar format.
Cipher: chacha20-ietf-poly1305TCP request (after encryption, *ciphertext*)+--------+----------------+--------------+--------------+---------------+| NONCE | PayloadLen_TAG | *PayloadLen* | Payload_TAG | *Payload* |+--------+----------------+--------------+--------------+---------------+| 12 | 16 | 2 | 16 | Variable |+--------+----------------+--------------+--------------+---------------+TCP Chunk (after encryption, *ciphertext*)+--------------+------------+-----------+----------+| DATA_LEN_TAG | *DATA_LEN* | DATA_TAG | *DATA* |+--------------+------------+-----------+----------+| 16 | 2 | 16 | Variable |+--------------+------------+-----------+----------+