Saltar al contenido
uencoder

Stream Cifrador Referencia Guía

General referencia para stream cifrador design principios, modos de operación, y seguridad requirements.

Design Principles

A stream cipher generates a pseudorandom keystream that is XORed with the plaintext to produce ciphertext. The keystream must be computationally indistinguishable from random for security. Most modern stream ciphers use ARX (add-rotate-xor) or NLFSR constructions for speed and side-channel resistance. The nonce must never be reused with the same key, or security is catastrophically lost.

keystream
Pseudorandom output XORed with data
C = P XOR KS
nonce
Must be unique per key
reuse is fatal
state
Updated each block
counter or LFSR

Security Requirements

Stream ciphers require unique nonces and sufficiently long key sizes to resist brute force. The keystream period must exceed the maximum message length. Modern designs like ChaCha20 and AES-CTR provide provable security reductions to the underlying primitive. Initialization vectors must be generated with a cryptographically secure random source.

nonce reuse
Causes two-time-pad attack
XOR of plaintexts leaks
key length
At least 128 bits
256 recommended
period
Must exceed message length
2^128 typical

Herramientas relacionadas

参考链接