Week 1 - Stream + Block Cypher Flashcards
What is a Stream Cypher?
A cypher than encrypts/decrypts data on a stream of data
How does a stream cipher perform encryption?
using bitewise operation (XOR) with the data and a key
e.g
D = 1101101101
K = 1100010101
Ek(D) = 0001111000
use same method to decrypt
Why use a stream cipher?
generally faster and better suited for applications with continuous data streams.
e.g
- data is transmitted in real-time
- secure communications
What is Block cypher?
encrypts/decrypts on a block of data before moving onto next block.
How does a block cipher perform encryption?
For Each block:
1. Split into 2
2. Swap halves
3. Apply XOR operation
e.g
- 1 = 0110 2= 0010 key = 0110
- 2 = 0010 1 = 0110
- 0110 0110
- Ek(P) = 0100 0000
What happens when a message is not a multiple of the key?
Padding is added to expand the message length
e.g key is 8 bytes , message is 12 bytes, 4 padding bytes are added
Why are block ciphers important?
a secure way to encrypt larger data sets by breaking them into manageable, fixed-size blocks.