先决条件 – 分组密码操作模式
块密码和流密码都属于对称密钥密码。这两种分组密码和流密码是用于将明文转换为密文的方法。
分组密码和流密码的主要区别在于分组密码转换通过一次取明文的块将明文转换为密文。而流密码通过每次取1个字节的明文将明文转换为密文。
让我们看看它们之间的区别:
S.NO | Block Cipher | Stream Cipher |
---|---|---|
1. | Block Cipher Converts the plain text into cipher text by taking plain text’s block at a time. | Stream Cipher Converts the plain text into cipher text by taking 1 byte of plain text at a time. |
2. | Block cipher uses either 64 bits or more than 64 bits. | While stream cipher uses 8 bits. |
3. | The complexity of block cipher is simple. | While stream cipher is more complex. |
4. | Block cipher Uses confusion as well as diffusion. | While stream cipher uses only confusion. |
5. | In block cipher, reverse encrypted text is hard. | While in stream cipher, reverse encrypted text is easy. |
6. | The algorithm modes which are used in block cipher are: ECB (Electronic Code Book) and CBC (Cipher Block Chaining). | The algorithm modes which are used in stream cipher are: CFB (Cipher Feedback) and OFB (Output Feedback). |
7. | Block cipher works on transposition techniques like Caesar cipher, polygram substitution cipher, etc. | While stream cipher works on substitution techniques like rail-fence technique, columnar transposition technique, etc. |
8. | Block cipher is slow as compared to stream cipher. | While stream cipher is fast in comparison to block cipher. |