COMFIC- Stream Ciphers
Stream Ciphers
Encrypt each byte/bit in turn
Generate a pseudorandom key stream and use as key for XOR cipher
One time pad needs truly random key- so stream can be insecure
Based
a XOR cipher where key is as long as message
Synchronous stream ciphers
Password into stream cipher- outcome is long sequence of random numbers
Plaintext- same length as stream of random numbers generated
XOR these against each other to get cipher text
How to decrypt:
Generate stream from password, xor with ciphertext
Complicated version:
Plain text is series of packets
Encrypt by making stream cipher match
End up with encrypted packets
But packets can get lost, end up XORing with wrong stream, so wouldn’t get plain text
Synchronous as doesn’t handle lost messages
Avoid; tag each
Stream cipher per packet, seq number, password would be gareth1, gareth2 for example
LSFR
With known plaintext and LSFR can calculate state and hence future steam
If unkown LFSR, Berlekamp-Massey algorithm
Linear Feedback Shift Register
Used for GSM phone calls- 2g
RC4
Pass phrase dictates how you “shuffle deck”
Tells you what to swap based on passphrase for each “card in deck”
Swap 2 cards, add together, use index for next swap
Weakness
Sometimes uses same key
First 3 bytes of keysteam corelated to just the first 3 bytes of key
Second output byte is biased to zero with probability of 1/128
WEP
Packets encrypted with RC4
Sequence number in WEP is 24 bits
Keys relate, so a number of packets means it Is vulnerable
Goals of a cipher
Complex relationship between plain text and cipher text
Shouldn’t be a one to one mapping of plain to cipher
Comments
Post a Comment