SlideShare a Scribd company logo
2
Most read
3
Most read
4
Most read
Stream Ciphers CS 519 Cryptography and Network Security Instructor: Ali Aydin Selcuk CS519, © A.Selcuk Stream Ciphers
Stream Ciphers Generate a  pseudo-random  key stream & xor to the plaintext.  Key:  The seed of the PRNG Traditional PRNGs (e.g. those used for simulations) are not secure. E.g., the linear congruential generator:  X i   =  a X i-1  + b  mod m for some fixed a, b, m. It passes the randomness tests, but it is predictible. CS519, © A.Selcuk Stream Ciphers
Linear Feedback Shift Registers Feedback shift register: (“register”, “feedback”, “shift”) LFSR:  Feedback fnc. is linear over Z 2   (i.e., an xor): Very compact & efficient in hardware. CS519, © A.Selcuk Stream Ciphers x n x n-1 x 1 . . . . . . . feedback fnc. output bits  . . . . x n x n-1 x 1 . . . . . . . . . . . 
Stream Ciphers from LFSRs Desirable properties of f: high non-linearity long “cycle period”  (~2 n1+n2+...+nk ) low correlation with the input bits CS519, © A.Selcuk Stream Ciphers key stream  . . . . LFSR 1 LFSR 2 LFSR k f . . .
Example LFSR-Based Ciphers Geffe Generator: Three LFSRs LFSR 1  is used to choose between LFSR 2  & LFSR 3 :  y = (x (1)     x (2) )    (  x (1)     x (3) ) Correlation problem: P(y = x (2) ) = 0.75  (or, P(y = x (3) )) Stop-and-Go Generators: One (or more) LFSR is used to clock the others E.g.: The alternating stop-and-go generator: Three LFSRs. If x (1)  is 0, LFSR 2  is forwarded; otherwise LFSR 3 . Output is  x (2)     x (3) . CS519, © A.Selcuk Stream Ciphers
LFSR-Based Ciphers (cont’d) The Shrinking Generator: Two LFSRs If x (1)  is 1, output x (2) . Else, discard both x (1)  & x (2) ; forward the LFSRs. A5  (the GSM standard): Three LFSRs; 64 bits in total. Designed secretly. Leaked in 1994. A5/2 is completely broken. (Barkan et al., 2003) E0  (Bluetooth’s standard encryption) Four LFSRs; 128 bits in total. CS519, © A.Selcuk Stream Ciphers
GSM A5/1 The A5/1 stream cipher uses three LFSRs.  A register is clocked if its clocking bit (orange) agrees with one or both of the clocking bits of the other two registers. (majority match) CS519, © A.Selcuk Stream Ciphers
Software-Oriented Stream Ciphers LFSRs slow in software Alternatives: Block ciphers (or hash functions) in  CFB, OFB, CTR modes. Stream ciphers designed for software: RC4 SEAL CS519, © A.Selcuk Stream Ciphers
RC4 (Rivest, 1987) Simple, byte-oriented, fast in s/w. Popular:  MS-Windows, Netscape, Apple,  Oracle Secure SQL, WEP, etc. Algorithm: Works on n-bit words.  (typically, n = 8) State of the cipher: A permutation of {0,1,...,N-1}, where N = 2 n , stored at S[0,1,...,N-1]. Key schedule:  Expands the key (40-256 bits) into the initial state table S. CS519, © A.Selcuk Stream Ciphers
RC4 (cont’d) The encryption (i.e., the PRNG) algorithm: i ← 0 j ← 0 loop: { i ← i + 1 j ← j + S[i] S[i] ↔ S[j] output S[S[i] + S[j]] } CS519, © A.Selcuk Stream Ciphers
SEAL Software-Optimized Encryption Algorithm Rogaway & Coppersmith, 1992, IBM Extremely fast in software Speed comparisons:  (from Crypto++ 5.1 benchmarks, on a 2.1 GHz P4): CS519, © A.Selcuk Stream Ciphers Algorithm Speed  (MByte/s.) DES 22 AES 62 RC5-32/12 79 RC4 111 SEAL 920 MD5 205
RC4  &  WEP WEP: Wired Eqv. Privacy  (802.11 encryption prot.) RC4 encryption, with 40–104 bit keys. 24-bit IV is prepended to the key; RC4(IV || k). IV is changed for each packet. Integrity protection: By encrypted CRC-32 checksum. (What are some obvious problems so far?) Key management not specified. (Typically, a key is shared among an AP and all its clients.) Design process:  Not closed-door, not very public either. CS519, © A.Selcuk Stream Ciphers
Attacks on WEP (Borisov, Goldberg, Wagner, 2000) Obvious problems: 24-bit IV too shot; recycles easily. (And in most systems, implemented as a counter starting from 0.) CRC is linear; not secure against modifications. Even worse: Using CRC with a stream cipher. Passive decryption attacks: Statistical frequency analysis can discover the plaintexts encrypted with the same IV. An insider can get the key stream for a packet he sent (i.e., by xoring plaintext and ciphertext); hence can decrypt anyone’s packet encrypted with the same IV. CS519, © A.Selcuk Stream Ciphers
Attacks on WEP  (cont’d) Authentication: challenge-response with RC4 server sends 128-bit challenge client encrypts with RC4 and returns server decrypts and compares Problem: attacker sees both the challenge & the response; can easily obtain a valid key stream & use it to respond to future challenges. CS519, © A.Selcuk Stream Ciphers
Attacks on WEP  (cont’d) An active attack: Since RC4 is a stream cipher, an attacker can modify the plaintext bits over the ciphertext and fix the CRC checksum accordingly. Parts of the plaintext is predictable (e.g., the upper-layer protocol headers).  Attacker sniffs a packet and  changes its IP address to his machine from the ciphertext.  (If the attacker’s machine is outside the firewall, the TCP port number could also be changed, to 80 for example, which most firewalls would not block.)  Hence, the attacker obtains the decrypted text without breaking the encryption. CS519, © A.Selcuk Stream Ciphers
Attacks on WEP  (cont’d) A table-based attack: An insider generates a packet for each IV. Extracts the key stream by xoring the ciphertext with the plaintext. Stores all the key streams in a table indexed by the IV. (Requires ~15GB in total.) Now he can decrypt any packet sent to that AP.  Note: All these attacks are practical. Some assume a shared key, which is realistic. CS519, © A.Selcuk Stream Ciphers
Attacks on WEP  (cont’d) The final nail in the coffin: (Fluhrer, Mantin, Shamir, 2001)  The way RC4 is used in WEP can be broken completely: When IV is known, it is possible to get k in RC4(IV || k). WEP2 proposal: 128-bit key, 128-bit IV. This can be broken even faster! CS519, © A.Selcuk Stream Ciphers
Replacements for WEP WPA (inc. TKIP) encryption: RC4, but with a complex IV-key mixing integrity: cryptographic checksum (by lightweight Michael algorithm) replay protection: 48-bit seq.no.; also used as IV WPA2 (long-term replacement, 802.11i std.) encryption: AES-CTR mode integrity: AES-CBC-MAC CS519, © A.Selcuk Stream Ciphers

More Related Content

PPT
block ciphers
PPT
Cryptography and Network Security William Stallings Lawrie Brown
PDF
Computer Security Lecture 2: Classical Encryption Techniques 1
PPT
Classical Encryption Techniques
PDF
Chapter 1 Introduction of Cryptography and Network security
PPTX
Symmetric encryption
PPTX
Topic1 substitution transposition-techniques
PDF
Block Ciphers and the Data Encryption Standard
block ciphers
Cryptography and Network Security William Stallings Lawrie Brown
Computer Security Lecture 2: Classical Encryption Techniques 1
Classical Encryption Techniques
Chapter 1 Introduction of Cryptography and Network security
Symmetric encryption
Topic1 substitution transposition-techniques
Block Ciphers and the Data Encryption Standard

What's hot (20)

PPTX
Cyber kill chain
PPTX
Blow fish final ppt
PPTX
Operating system security
PPT
12 symmetric key cryptography
PDF
2. Stream Ciphers
PPT
Message Authentication Code & HMAC
PPTX
Cryptographic algorithms
PPT
key distribution in network security
PPTX
Cloud Security
PDF
symmetric key encryption algorithms
PPTX
Elliptic Curve Cryptography
PDF
CS6701 CRYPTOGRAPHY AND NETWORK SECURITY
PDF
Network security - OSI Security Architecture
PDF
2. public key cryptography and RSA
PPTX
Network Security Architecture
PPT
Security models
PPTX
Lightweight cryptography
PPTX
RSA Algorithm
PPTX
Cryptography and Information Security
Cyber kill chain
Blow fish final ppt
Operating system security
12 symmetric key cryptography
2. Stream Ciphers
Message Authentication Code & HMAC
Cryptographic algorithms
key distribution in network security
Cloud Security
symmetric key encryption algorithms
Elliptic Curve Cryptography
CS6701 CRYPTOGRAPHY AND NETWORK SECURITY
Network security - OSI Security Architecture
2. public key cryptography and RSA
Network Security Architecture
Security models
Lightweight cryptography
RSA Algorithm
Cryptography and Information Security
Ad

Viewers also liked (20)

PDF
Block Cipher vs. Stream Cipher
PDF
Stream ciphers
PPTX
Presentation one-gsm
PDF
Project lfsr
PPTX
RC 4
PPT
5 stream ciphers
PPTX
Different types of Symmetric key Cryptography
PDF
Algorithme de chiffrement RC4, A5/1 & A5/2
PDF
Exploiting parallelism opportunities in non-parallel architectures to improve...
PPT
Ciphers
PDF
Cryptanalysis of the seal encryption algorithm
PDF
Reducing Silicon Real Estate and Switching Activity Using Low Power Test Patt...
PPT
Cryptography in GSM
PPTX
Low power project_presentation
PDF
An effective RC4 Stream Cipher
PPTX
Block Cipher
PPTX
Rc4 Research 2013
PDF
A short introduction to multimedia forensics the science discovering the hist...
Block Cipher vs. Stream Cipher
Stream ciphers
Presentation one-gsm
Project lfsr
RC 4
5 stream ciphers
Different types of Symmetric key Cryptography
Algorithme de chiffrement RC4, A5/1 & A5/2
Exploiting parallelism opportunities in non-parallel architectures to improve...
Ciphers
Cryptanalysis of the seal encryption algorithm
Reducing Silicon Real Estate and Switching Activity Using Low Power Test Patt...
Cryptography in GSM
Low power project_presentation
An effective RC4 Stream Cipher
Block Cipher
Rc4 Research 2013
A short introduction to multimedia forensics the science discovering the hist...
Ad

Similar to Stream ciphers presentation (20)

PDF
CNIT 141 5. Stream Ciphers
PDF
CNIT 141: 5. Stream Ciphers
PDF
Computer network (3)
PPTX
Information and data security pseudorandom number generation and stream cipher
PDF
Applied cryptanalysis - stream ciphers
PDF
5. Stream Ciphers
PPTX
«Applied cryptanalysis stream ciphers» by Vladimir Garbuz
PDF
03-VU-NetSec-Modern-Ciphers all important questions and answers
PDF
l_08png.pdf
PPTX
Complete explanation about Stream Ciphers-RC4 Algorithm.pptx
PPTX
Streamcipher its about stream ciphers we learnt it in class
PDF
CRYPTO Module 05.in.pdf
PDF
An exhaustive review of the stream ciphers and their performance analysis
PDF
PPTX
Chapter3-Stream_Ciphers nbmnb,jkbnm.pptx
PPTX
RC4 Algorithm4 information security pptx
PPTX
Topic20 The RC4 Algorithm.pptx
PPT
Block Ciphers Modes of Operation
PPT
Ron Rivest 4, Information and Network Security
CNIT 141 5. Stream Ciphers
CNIT 141: 5. Stream Ciphers
Computer network (3)
Information and data security pseudorandom number generation and stream cipher
Applied cryptanalysis - stream ciphers
5. Stream Ciphers
«Applied cryptanalysis stream ciphers» by Vladimir Garbuz
03-VU-NetSec-Modern-Ciphers all important questions and answers
l_08png.pdf
Complete explanation about Stream Ciphers-RC4 Algorithm.pptx
Streamcipher its about stream ciphers we learnt it in class
CRYPTO Module 05.in.pdf
An exhaustive review of the stream ciphers and their performance analysis
Chapter3-Stream_Ciphers nbmnb,jkbnm.pptx
RC4 Algorithm4 information security pptx
Topic20 The RC4 Algorithm.pptx
Block Ciphers Modes of Operation
Ron Rivest 4, Information and Network Security

More from degarden (20)

PDF
MICHELIN_-AGILIS-CrossClimate_GB
PDF
ABC 2021 Guia del vino
PDF
Audi-A3-Sportback-catalogo-es-1146
PDF
Why btrfs is the Bread and Butter of Filesystems
PDF
Toshiba X300 salessheet english-web_r2
PDF
Toshiba N300 salessheet english-web_r2
PDF
The 20 maps that will help you understand Spain - The Local
PDF
Toshiba X300 Performance Internal Hard Drive
PDF
Bronces
PDF
Sper Food Safety Thermometer with IR
PDF
Plarad Torque and tension systems
PDF
Plarad Hydraulikaggregate Hydraulic Power Packs
PDF
Hands-Free Profile 1.7
PDF
Fingerprinting Bluetooth-Low-Energy Devices Based on the Generic Attribute Pr...
PDF
Reverse Engineering BLE Devices Documentation
PDF
pWeb: A P2P Web Hosting Framework
PDF
¿Qué esconde tu teléfono? Adquisición forense de dispositivos Android
PDF
Bose NC 700 - User manual English
PDF
MICHELIN CrossCLIMATE+
PDF
Catálogo-Producto-Familia-A3-PI_MY17_Medidas-Semana-9_2017
MICHELIN_-AGILIS-CrossClimate_GB
ABC 2021 Guia del vino
Audi-A3-Sportback-catalogo-es-1146
Why btrfs is the Bread and Butter of Filesystems
Toshiba X300 salessheet english-web_r2
Toshiba N300 salessheet english-web_r2
The 20 maps that will help you understand Spain - The Local
Toshiba X300 Performance Internal Hard Drive
Bronces
Sper Food Safety Thermometer with IR
Plarad Torque and tension systems
Plarad Hydraulikaggregate Hydraulic Power Packs
Hands-Free Profile 1.7
Fingerprinting Bluetooth-Low-Energy Devices Based on the Generic Attribute Pr...
Reverse Engineering BLE Devices Documentation
pWeb: A P2P Web Hosting Framework
¿Qué esconde tu teléfono? Adquisición forense de dispositivos Android
Bose NC 700 - User manual English
MICHELIN CrossCLIMATE+
Catálogo-Producto-Familia-A3-PI_MY17_Medidas-Semana-9_2017

Recently uploaded (20)

PPTX
Cell Structure & Organelles in detailed.
PDF
Classroom Observation Tools for Teachers
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PPTX
History, Philosophy and sociology of education (1).pptx
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
LNK 2025 (2).pdf MWEHEHEHEHEHEHEHEHEHEHE
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
Computing-Curriculum for Schools in Ghana
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
PPTX
Cell Types and Its function , kingdom of life
PDF
Trump Administration's workforce development strategy
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
A systematic review of self-coping strategies used by university students to ...
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PDF
Updated Idioms and Phrasal Verbs in English subject
PDF
Complications of Minimal Access Surgery at WLH
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PPTX
master seminar digital applications in india
Cell Structure & Organelles in detailed.
Classroom Observation Tools for Teachers
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
History, Philosophy and sociology of education (1).pptx
Final Presentation General Medicine 03-08-2024.pptx
LNK 2025 (2).pdf MWEHEHEHEHEHEHEHEHEHEHE
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Computing-Curriculum for Schools in Ghana
Microbial disease of the cardiovascular and lymphatic systems
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
Cell Types and Its function , kingdom of life
Trump Administration's workforce development strategy
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
STATICS OF THE RIGID BODIES Hibbelers.pdf
A systematic review of self-coping strategies used by university students to ...
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Updated Idioms and Phrasal Verbs in English subject
Complications of Minimal Access Surgery at WLH
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
master seminar digital applications in india

Stream ciphers presentation

  • 1. Stream Ciphers CS 519 Cryptography and Network Security Instructor: Ali Aydin Selcuk CS519, © A.Selcuk Stream Ciphers
  • 2. Stream Ciphers Generate a pseudo-random key stream & xor to the plaintext. Key: The seed of the PRNG Traditional PRNGs (e.g. those used for simulations) are not secure. E.g., the linear congruential generator: X i = a X i-1 + b mod m for some fixed a, b, m. It passes the randomness tests, but it is predictible. CS519, © A.Selcuk Stream Ciphers
  • 3. Linear Feedback Shift Registers Feedback shift register: (“register”, “feedback”, “shift”) LFSR: Feedback fnc. is linear over Z 2 (i.e., an xor): Very compact & efficient in hardware. CS519, © A.Selcuk Stream Ciphers x n x n-1 x 1 . . . . . . . feedback fnc. output bits . . . . x n x n-1 x 1 . . . . . . . . . . . 
  • 4. Stream Ciphers from LFSRs Desirable properties of f: high non-linearity long “cycle period” (~2 n1+n2+...+nk ) low correlation with the input bits CS519, © A.Selcuk Stream Ciphers key stream . . . . LFSR 1 LFSR 2 LFSR k f . . .
  • 5. Example LFSR-Based Ciphers Geffe Generator: Three LFSRs LFSR 1 is used to choose between LFSR 2 & LFSR 3 : y = (x (1)  x (2) )  (  x (1)  x (3) ) Correlation problem: P(y = x (2) ) = 0.75 (or, P(y = x (3) )) Stop-and-Go Generators: One (or more) LFSR is used to clock the others E.g.: The alternating stop-and-go generator: Three LFSRs. If x (1) is 0, LFSR 2 is forwarded; otherwise LFSR 3 . Output is x (2)  x (3) . CS519, © A.Selcuk Stream Ciphers
  • 6. LFSR-Based Ciphers (cont’d) The Shrinking Generator: Two LFSRs If x (1) is 1, output x (2) . Else, discard both x (1) & x (2) ; forward the LFSRs. A5 (the GSM standard): Three LFSRs; 64 bits in total. Designed secretly. Leaked in 1994. A5/2 is completely broken. (Barkan et al., 2003) E0 (Bluetooth’s standard encryption) Four LFSRs; 128 bits in total. CS519, © A.Selcuk Stream Ciphers
  • 7. GSM A5/1 The A5/1 stream cipher uses three LFSRs. A register is clocked if its clocking bit (orange) agrees with one or both of the clocking bits of the other two registers. (majority match) CS519, © A.Selcuk Stream Ciphers
  • 8. Software-Oriented Stream Ciphers LFSRs slow in software Alternatives: Block ciphers (or hash functions) in CFB, OFB, CTR modes. Stream ciphers designed for software: RC4 SEAL CS519, © A.Selcuk Stream Ciphers
  • 9. RC4 (Rivest, 1987) Simple, byte-oriented, fast in s/w. Popular: MS-Windows, Netscape, Apple, Oracle Secure SQL, WEP, etc. Algorithm: Works on n-bit words. (typically, n = 8) State of the cipher: A permutation of {0,1,...,N-1}, where N = 2 n , stored at S[0,1,...,N-1]. Key schedule: Expands the key (40-256 bits) into the initial state table S. CS519, © A.Selcuk Stream Ciphers
  • 10. RC4 (cont’d) The encryption (i.e., the PRNG) algorithm: i ← 0 j ← 0 loop: { i ← i + 1 j ← j + S[i] S[i] ↔ S[j] output S[S[i] + S[j]] } CS519, © A.Selcuk Stream Ciphers
  • 11. SEAL Software-Optimized Encryption Algorithm Rogaway & Coppersmith, 1992, IBM Extremely fast in software Speed comparisons: (from Crypto++ 5.1 benchmarks, on a 2.1 GHz P4): CS519, © A.Selcuk Stream Ciphers Algorithm Speed (MByte/s.) DES 22 AES 62 RC5-32/12 79 RC4 111 SEAL 920 MD5 205
  • 12. RC4 & WEP WEP: Wired Eqv. Privacy (802.11 encryption prot.) RC4 encryption, with 40–104 bit keys. 24-bit IV is prepended to the key; RC4(IV || k). IV is changed for each packet. Integrity protection: By encrypted CRC-32 checksum. (What are some obvious problems so far?) Key management not specified. (Typically, a key is shared among an AP and all its clients.) Design process: Not closed-door, not very public either. CS519, © A.Selcuk Stream Ciphers
  • 13. Attacks on WEP (Borisov, Goldberg, Wagner, 2000) Obvious problems: 24-bit IV too shot; recycles easily. (And in most systems, implemented as a counter starting from 0.) CRC is linear; not secure against modifications. Even worse: Using CRC with a stream cipher. Passive decryption attacks: Statistical frequency analysis can discover the plaintexts encrypted with the same IV. An insider can get the key stream for a packet he sent (i.e., by xoring plaintext and ciphertext); hence can decrypt anyone’s packet encrypted with the same IV. CS519, © A.Selcuk Stream Ciphers
  • 14. Attacks on WEP (cont’d) Authentication: challenge-response with RC4 server sends 128-bit challenge client encrypts with RC4 and returns server decrypts and compares Problem: attacker sees both the challenge & the response; can easily obtain a valid key stream & use it to respond to future challenges. CS519, © A.Selcuk Stream Ciphers
  • 15. Attacks on WEP (cont’d) An active attack: Since RC4 is a stream cipher, an attacker can modify the plaintext bits over the ciphertext and fix the CRC checksum accordingly. Parts of the plaintext is predictable (e.g., the upper-layer protocol headers). Attacker sniffs a packet and changes its IP address to his machine from the ciphertext. (If the attacker’s machine is outside the firewall, the TCP port number could also be changed, to 80 for example, which most firewalls would not block.) Hence, the attacker obtains the decrypted text without breaking the encryption. CS519, © A.Selcuk Stream Ciphers
  • 16. Attacks on WEP (cont’d) A table-based attack: An insider generates a packet for each IV. Extracts the key stream by xoring the ciphertext with the plaintext. Stores all the key streams in a table indexed by the IV. (Requires ~15GB in total.) Now he can decrypt any packet sent to that AP. Note: All these attacks are practical. Some assume a shared key, which is realistic. CS519, © A.Selcuk Stream Ciphers
  • 17. Attacks on WEP (cont’d) The final nail in the coffin: (Fluhrer, Mantin, Shamir, 2001) The way RC4 is used in WEP can be broken completely: When IV is known, it is possible to get k in RC4(IV || k). WEP2 proposal: 128-bit key, 128-bit IV. This can be broken even faster! CS519, © A.Selcuk Stream Ciphers
  • 18. Replacements for WEP WPA (inc. TKIP) encryption: RC4, but with a complex IV-key mixing integrity: cryptographic checksum (by lightweight Michael algorithm) replay protection: 48-bit seq.no.; also used as IV WPA2 (long-term replacement, 802.11i std.) encryption: AES-CTR mode integrity: AES-CBC-MAC CS519, © A.Selcuk Stream Ciphers