# Tag Info

4

You are correct. The $Update$ function is called after each invocation of the $Generate$ function, and this does mean that chunking affects the output. Changing both the key and the nonce of an $AES-CTR$ key stream generator to uniformly selected (pseudo) random values will, of course, make the resulting key stream uniformly independent from what it would ...

1

A stream cipher transforms a key and a nonce/IV into a stream of pseudorandom bits (a "keystream"). The keystream can be XOR'd with the plaintext to produce the ciphertext (encryption), or XOR'd with the ciphertext to produce the plaintext (decryption). So, stream ciphers generally define two operations, encryption and decryption (three if you count key ...

1

The best one is the most reputable one. That is, the one which had been widely used, studied, and standardized. If both fall into that class, choose the one which uses more secure or larger-state primitives under the hood. Example: when comparing the NIST-standard Hash-DRBG using SHA-256 versus HMAC-DRBG with SHA-1, I would personally choose the first due to ...

3

Using a CSPRNG to generate a pad is a stream cipher. However, that does not mean your question is without merit: if we could kill two birds with one stone by just designing CSPRNGs, that seems like a good idea. So why design dedicated stream ciphers? One reason is performance. The performance we require from encryption is greater than what most uses require ...

0

While SEJPM answered your question quite directly, please consider using stateless tokens instead. A token would be of the form identity_data||expiration_date, encrypted and authenticated using AES-GCM or perhaps ChaCha20-Poly1305. Your token is the nonce and cipher text concatenated and base64 encoded. Such a scheme prevents you from having to make a ...

10

Many stream ciphers work by transforming a short key (and optionally a nonce) into a long key-stream that's xor-ed into the plaintext to produce the ciphertext, which is exactly the construction you're proposing. Wikipedia calls these Synchronous stream ciphers. Most popular stream ciphers fall into this category, including block ciphers operated in CTR or ...

Top 50 recent answers are included