Score:2

Why is it impossible for asymetric ciphers to be stream ciphers?

tg flag

My studying material states that although symmetric ciphers can be either block or stream ciphers, it also states that asymmetric can only be block ciphers without further clarification.

kr flag
1) This question duplicates [following](https://security.stackexchange.com/questions/175512/does-the-terms-stream-and-block-ciphers-apply-to-both-symmetric-and-asymmetric-c). 2) This question, as well as the duplicated one, can be better answered at Crypto SE.
Maarten Bodewes avatar
in flag
Note that there were fewer questions migrated at that time, basically [security.se] considered it on topic on their site (and since cryptography is a subset, they were not wrong) and migration being problematic and hard. Nowadays we've got a better understanding between the two sites.
Maarten Bodewes avatar
in flag
When **it** states something then we desperately need a reference to **it**. Otherwise we cannot lookup the source and establish the context of the claim.
Score:3
ng flag

A stream cipher works by computing from the key a stream of pseudo-random data, and combining that stream with XOR (or similar group operation) with the plaintext to obtain the ciphertext. Decryption undoes that combination step. In a stream cipher, whoever can encrypt can compute the key stream, thus can also decrypt.

In asymmetric encryption, encryption uses the public key, but the public key must not allow decryption. Hence a public-key cipher can not consist only of a stream cipher.

Maarten Bodewes avatar
in flag
Yeah, I focused too much on the block cipher part. As long as it understood that an asymmetric cipher is not a block cipher either; probably best to keep that term for symmetric ciphers.
Score:1
in flag

I would not consider asymmetric cipher a block cipher.

Let's do some fun and ask ChatGPT the mathematical definition of a block cipher:

A block cipher is a type of symmetric key cipher that operates on a fixed-size block of plaintext and produces a block of ciphertext of the same size. Mathematically, a block cipher can be defined as a deterministic, invertible function f that takes as input a plaintext block $P$ and a key $K$, and produces a ciphertext block $C$ as output, such that:

$$C = f(P, K)$$

The function $f$ is designed to be reversible, so that the original plaintext block $P$ can be recovered from the ciphertext block $C$ by applying the inverse function $f^{-1}$ using the same key $K$:

$$P = f^{-1}(C, K)$$

The function $f$ is typically implemented using a combination of mathematical operations such as bitwise XOR, modular addition, and substitution using lookup tables. The key $K$ is typically a bit string of a certain length, and it is used to control the transformation applied to the plaintext.

In general, a block cipher can be defined as a tuple $(P, C, K, f)$, where $P$ and $C$ are the sets of possible plaintext and ciphertext blocks, respectively, $K$ is the set of possible keys, and f is the transformation function.

This is rather well generated and seems to comply with the definition given in Wikipedia. Note that the definition presumes in advance that the cipher is symmetric and uses the same key. As such, the whole notion that an asymmetric cipher can be a block cipher falls down.


So why are these sources indicating that an asymmetric cipher is a block cipher? Well, the idea is that the block cipher takes a message $P$ and then generates a ciphertext block $C$ of a specific size. That still breaks the definition of a block cipher, see the first sentence of the ChatGPT answer that we included. It is however similar in the sense that the $P$ has a maximum size and that the size of $C$ is usually predefined.

What asymmetric primitives generally do not do is to create a key stream. Nor do they generally operate on a message of indefinite length. So in that sense they are at least more like a block cipher than a stream cipher.


In the end though, the idea that an asymmetric cipher is a block cipher is a fallacy. It is a piss-poor attempt to assign some of the properties of a block cipher to an asymmetric cipher. And in general, the whole idea that an asymmetric cipher is a block cipher creates more confusion than it is worth.

The problem is exuberated when block cipher modes of operation are considered. These generally operate on the strict definition of a block cipher and they generally do not apply to asymmetric ciphers.

The statement should just read that asymmetric ciphers only operate on messages up to a specific size, and usually generate a ciphertext of a predefined size.

If you want to study asymmetric ciphers further I would suggest to read the PKCS#1 v1.5 specification for encryption on how the message is padded, then enciphered using modular exponentiation with the public key and finally is deliberately encoded as a ciphertext with the same size as the key (i.e. the size of the modulus) in bits.


Oh, had too much fun answering this and forgot about the title. Asymmetric ciphers are not stream ciphers because they do not operate on a stream of plaintext; they generally operate on messages of a predefined size. If they do depends on the definition of the cipher.

The mathematical problems on which they are based, such as the RSA problem do not make them well suited to act as stream ciphers. A stream cipher generally generates a key stream generated from a symmetric key and XOR's this with the plaintext. This is incompatible with the notion that the key used for encryption is public; you'd need the same public key to recreate the key stream and reverse the operation.

That, however, doesn't make them block ciphers either, as established above.

Maarten Bodewes avatar
in flag
Note that I cannot get it into ChatGPT's head that neither DH nor PGP are considered ciphers when it assumes that it needs to give examples of asymmetric ciphers. I guess that it is the combined stupidity of the Internet that is contained in that part of a Q/A. It can be very good to get a direction, but don't assume it is correct.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.