ทั้ง Block และ Stream cipher เป็นวิธีการเข้ารหัส (Encryption) ที่ใช้แปลง plain text เป็น cipher text โดยตรง และอยู่ในกลุ่ม symmetric key ciphers
ความแตกต่างสำคัญระหว่าง Block Cipher และ Stream Cipher มีดังนี้:
| Sr. No. | Key | Block Cipher | Stream Cipher |
|---|---|---|---|
| 1 | Definition (นิยาม) | Block Cipher คือประเภทการเข้ารหัสที่แปลง plain text โดยรับ block ทีละ block | Stream Cipher คือประเภทการเข้ารหัสที่แปลง plain text โดยรับทีละ byte ของ plain text |
| 2 | Conversion of Bits (การแปลงบิต) | เนื่องจาก Block Cipher รับ block ทีละครั้ง จึงแปลงบิตได้มากกว่า Stream Cipher โดยเฉพาะ 64 บิตหรือมากกว่านั้นในครั้งเดียว | ใน Stream Cipher แปลงได้สูงสุด 8 บิตในครั้งเดียว |
| 3 | Principle (หลักการ) | Block Cipher ใช้หลักการ confusion และ diffusion ทั้งคู่สำหรับการแปลงที่ต้องการในการเข้ารหัส | Stream Cipher ใช้หลักการ confusion เพียงอย่างเดียว |
| 4 | Algorithm (อัลกอริทึม) | สำหรับเข้ารหัส plain text Block Cipher ใช้ Electronic Code Book (ECB) และ Cipher Block Chaining (CBC) algorithm | Stream Cipher ใช้ CFB (Cipher Feedback) และ OFB (Output Feedback) algorithm |
| 5 | Decryption (ถอดรหัส) | เนื่องจากบิตมากกว่าถูกเข้ารหัสใน Block Cipher การถอดรหัส (reverse encryption) ซับซ้อนกว่า Stream Cipher | Stream Cipher ใช้ XOR สำหรับเข้ารหัส ซึ่งสามารถกลับคืนเป็น plain text ได้ง่าย |
| 6 | Implementation (การนำไปใช้) | Implementation หลักของ Block Cipher คือ Feistel Cipher | Implementation หลักของ Stream Cipher คือ Vernam Cipher |