# Are all block and stream ciphers symmetric?

I'm trying to categorize my knowledge. Can I place block ciphers and stream ciphers under symmetric with RSA/DH under asymmetric?

This is almost correct and in general these two classes of algorithms are distinct.

However, Simon Shepherd published a paper called Public Key Stream Ciphers in the IEE Colloquium on Security & Cryptography Applications to Radio Systems, London, 3 June 1994.

It proposes to essentially use the RSA setup and initial random seed $$x_0$$ from $$\mathbb{Z}_{pq}$$ and Blum Blum Shub type of squaring

$$x_{k+1}:=x_k^2~~in~~\mathbb{Z}_{pq}$$ with the keystream being $$z_k=LSB(x_k).$$ This can be used to (presumably transmit to the holder of the private key $$(p,q,d)$$ first the initial value $$x_k$$ encrypted with RSA, and then) the keystream $$a_k\oplus x_k,\quad k\geq 1.$$ Of course BBS pseudorandom sequence generation is older than this.

• It might be a good idea to point out that in general public-key cryptography and stream ciphers are not usually considered to be the same class of algorithm... – Ella Rose Jan 26 '19 at 3:43

Can I place block ciphers and stream ciphers under symmetric with RSA/DH under asymmetric?

This sounds like you are trying to categorize RSA/DH as block/stream ciphers, which is not accurate.

It is possible to model RSA encryption as a block cipher, but that's an uncommon notion. "Public-key encryption" and "block cipher" indicate different concepts, even if the public-key encryption operation in question happens to be a permutation of blocks it would still create confusion to talk of it as a "block cipher".

Diffie-Hellman is key agreement algorithm rather than an encryption algorithm, and as such is not any kind of cipher.

A better way to rephrase your statement might be:

Can I place block ciphers and stream ciphers under symmetric cryptography, with RSA/DH under asymmetric cryptography?

To which the answer would be "yes".

Are all block and stream ciphers symmetric?

Conventionally, yes. It is conceivably possible to define an asymmetric operation to combine the key stream. But this would be abnormal.

• Symmetry is defined as having the same keys during both the (encryption and decryption) operation, correct? Then how can you use an asymmetric primitive to combine the key stream? – Maarten Bodewes Jan 26 '19 at 3:02
• @MaartenBodewes A stream cipher will typically have the same operation for encryption and decryption, so you could use an asymmetric primitive in an encryption mode to perform both encryption and decryption as a (weird, non-standard) stream cipher. Consider encrypting a counter and using the ciphertext as keystream. – forest Jan 26 '19 at 3:04
• @MaartenBodewes You could use the key and nonce supplied to $\operatorname{encrypt}$/$\operatorname{decrypt}$ to generate an encryption and decryption exponent. It's a pedantic technicality, I don't advocate anyone do this, I was only noting that you could theoretically define such a monstrosity; It's not "impossible" for such a thing to exist, and I didn't want claim that it was only to have someone else provide such a counter-example. Actually see, kodlu's answer for an actual example of a "public-key stream cipher" – Ella Rose Jan 26 '19 at 3:40