跳到主要内容
uencoder

加密 data with the ChaCha20 stream cipher

ChaCha20 是高-速度 ARX-based 流式处理 cipher designed 通过 Daniel J. Bernstein, used 在 TLS 和 as mobile-friendly alternative 到 AES.

  1. 1

    ChaCha20 是 256-位键, 96-位 nonce 流式处理 cipher built 从添加-rotate-xor (ARX) 操作. 它 needs 否 hardware acceleration 到 achieve 高速度, making 它 ideal 为 mobile devices. 我们 demonstrate 流式处理 cipher workflow 具有 RC4 ( 遗留流式处理 cipher) 到 illustrate 相同 operational 模式.

  2. 2
    RC4 加密器 →

    加密 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
    RC4 解密器 →

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

  4. 4

    关键差集: RC4 是 broken 和必须从不是 used 在 production. ChaCha20-Poly1305 ( 已认证 variant) 是现代 choice. workflow 以上 demonstrates 流式处理 cipher API 模式, 不 RC4's 安全.

常见问题

为什么 use ChaCha20 而非 AES?
开 devices 无 AES hardware acceleration (AES-NI), ChaCha20 是 faster 和常量-时间通过设计, avoiding timing 边-channels. 它是 默认在 Google Chrome TLS 开 ARM Android.
什么是 ChaCha20-Poly1305?
它是 已认证加密组合的 ChaCha20 (保密性) 和 Poly1305 (完整性). 它是 standardized as RFC 8439 和 used 在 TLS 1.3. 从不 use ChaCha20 alone 无认证.

解决此任务的工作流

相关工具