Aller au contenu
uencoder

Chiffrer data with the ChaCha20 stream cipher

ChaCha20 est un high-speed ARX-based stream chiffre designed par Daniel J. Bernstein, utilisé en TLS et comme un mobile-friendly alternative en AES.

  1. 1

    ChaCha20 is a 256-bit key, 96-bit nonce stream cipher built from add-rotate-xor (ARX) operations. It needs no hardware acceleration to achieve high speed, making it ideal for mobile devices. We demonstrate the stream cipher workflow with RC4 (the legacy stream cipher) to illustrate the same operational pattern.

  2. 2
    Chiffreur RC4 →

    Chiffrer data with RC4 to see the stream cipher interface: provide a key and plaintext, receive ciphertext of the same length. ChaCha20 uses the same API but with a 96-bit nonce instead of RC4's stateful initialization.

  3. 3
    Déchiffreur RC4 →

    Déchiffrer with the same key to recover plaintext. Stream ciphers are symmetric: encryption and decryption use the same operation (XOR with the keystream).

  4. 4

    Critical difference: RC4 is broken and must never be used in production. ChaCha20-Poly1305 (the authenticated variant) is the modern choice. The workflow above demonstrates the stream cipher API pattern, not RC4's security.

Questions fréquentes

Why use ChaCha20 instead of AES?
On devices without AES hardware acceleration (AES-NI), ChaCha20 is faster and constant-time by design, avoiding timing side-channels. It is the default in Google Chrome TLS on ARM Android.
What is ChaCha20-Poly1305?
It is the authenticated encryption combination of ChaCha20 (confidentiality) and Poly1305 (integrity). It is standardized as RFC 8439 and used in TLS 1.3. Never use ChaCha20 alone without authentication.

Workflows résolvant cette tâche

Outils associés