SlideShare a Scribd company logo
Introduction to Symmetric
Block Cipher
Jing Deng
Based on
Prof. Rick Han’s Lecture Slides
Dr. Andreas Steffen’s Security
Tutorial
Cryptography
• Encryption algorithm also called a cipher
• Cryptography has evolved so that modern
encryption and decryption use secret keys
• Cryptographic algorithms can be openly published
• Only have to protect the keys
Encryption Decryption
plaintext ciphertext plaintext
Encryption Decryption
plaintext ciphertext plaintext
Key KA Key KB
Symmetric-Key Cryptography
• Both sender and receiver keys are the same: KA=KB
• The keys must be kept secret and securely
distributed
• Thus, also called “Secret Key Cryptography”
• Data Encryption Standard (DES)
Encryption Decryption
plaintext ciphertext plaintext
Key KA Key KB=KA
Secure Key Distribution
Cryptanalysis
• Brute force: try every key
• Ciphertext-only attack:
• Attacker knows ciphertext of several messages encrypted
with same key (but doesn’t know plaintext).
• Possible to recover plaintext (also possible to deduce key) by
looking at frequency of ciphertext letters
• Known-plaintext attack:
• Attackers observes pairs of plaintext/ciphertext encrypted
with same key.
• Possible to deduce key and/or devise algorithm to decrypt
ciphertext.
Cryptanalysis (2)
• Chosen-plaintext attack:
• Attacker can choose the plaintext and look at the paired
ciphertext
• Attacker has more control than known-plaintext attack and
may be able to gain more info about key
• Adaptive Chosen-Plaintext attack:
• Attacker chooses a series of plaintexts, basing the next
plaintext on the result of previous encryption
• Examples
• Differential cryptanalysis – DES is resistant it
• Linear cryptanalysis
• Cryptanalysis attacks often exploit the
redundancy of natural language
• Lossless compression before encryption removes
redundancy
Examples
• Simple and non-secure ciphers
– Shift Cipher – Caesar Cipher
– Affine Cipher
– Vigenere Cipher
– Hill Cipher
• Information-secure cipher
– One-Time Pad
Confusion and Diffusion
• Terms courtesy of Claude Shannon, father of
Information Theory
• “Confusion” = Substitution
• a -> b
• Caesar cipher
• “Diffusion” = Transposition or Permutation
• abcd -> dacb
• DES
Encryption Decryption
plaintext ciphertext plaintext
Key KA Key KB
Confusion and Diffusion (2)
• Modern substitution ciphers take in N bits and
substitute N bits using lookup table: called S-
Boxes
• “Confusion” : a classical Substitution Cipher
Courtesy:
Andreas
Steffen
Confusion and Diffusion (3)
• “Diffusion” : a classical Transposition cipher
• modern Transposition ciphers take in N bits and
permute using lookup table : called P-Boxes
Courtesy:
Andreas
Steffen
Block Cipher
• Divide input bit stream into n-bit sections, encrypt
only that section, no dependency/history between
sections
• In a good block cipher, each output bit is a function
of all n input bits and all k key bits
Courtesy:
Andreas
Steffen
Example: DES
• Data Encryption Standard (DES)
• Encodes plaintext in 64-bit chunks using a 64-bit
key (56 bits + 8 bits parity)
• Uses a combination of diffusion and confusion to
achieve security
• Was cracked in 1997
• Parallel attack – exhaustively search key space
• Decryption in DES – it’s symmetric! Use KA again as
input and then the same keys except in reverse
order
Example: DES (2)
• DES
• 64-bit input is permuted
• 16 stages of identical
operation
• differ in the 48-bit
key extracted from
56-bit key - complex
• R2= R1 is encrypted
with K1 and XOR’d
with L1
• L2=R1, …
• Final inverse permutation
stage
Example: DES (3)
Beyond DES
• Triple-DES: put the output of DES back as
input into DES again with a different key,
loop again: 3*56 = 168 bit key
• Advanced Encryption Standard (AES)
– Requirements:
• shall be designed so that the key length may be
increased as needed.
• block size n = 128 bits, key size k = 128, 192, 256 bits
– Candidates: MARS, twofish, RC6, Serpent,
Rijndael
– successor (Rijndael)
Encryption Mode (ECB)
• Electronic Code Book (ECB) mode for block
ciphers of a long digital sequence
• Vulnerable to replay attacks: if an attacker thinks block
C2 corresponds to $ amount, then substitute another Ck
• Attacker can also build a codebook of <Ck, guessed Pk>
pairs
Encryption Mode (CBC)
• Cipher Block Chaining (CBC) mode for block
ciphers
• Inhibits replay attacks and codebook building: identical
input plaintext Pi =Pk won’t result in same output code due
to memory-based chaining
• IV = Initialization Vector – use only once
Stream Cipher
• Stream ciphers
• Rather than divide bit stream into discrete blocks, as
block ciphers do, XOR each bit of your plaintext
continuous stream with a bit from a pseudo-random
sequence
• At receiver, use same symmetric key, XOR again to
extract plaintext
Encryption Mode (OFB)

More Related Content

PPTX
Cryptography & Steganography
PDF
CNIT 141: 4. Block Ciphers
PDF
CNIT 141: 4. Block Ciphers
PPT
Classical Encryption Techniques in Network Security
PPT
Cns 13f-lec03- Classical Encryption Techniques
PPTX
Cryptography-101
PPTX
PPTX
Cryptography & Steganography
CNIT 141: 4. Block Ciphers
CNIT 141: 4. Block Ciphers
Classical Encryption Techniques in Network Security
Cns 13f-lec03- Classical Encryption Techniques
Cryptography-101

Similar to Cryptography.ppt (20)

PDF
CNIT 141: 4. Block Ciphers
PDF
4. Block Ciphers
PPT
overview of cryptographic techniques
PDF
CNIT 141: 4. Block Ciphers
PPTX
Cryptography and network security Nit701
PPTX
Modern symmetric cipher
PPTX
IANSunit 1_cryptography_2.pptxv xvxvxvxv
PPTX
Cryptography
PPTX
Cybersecurity cyberlab3
PPTX
619cb9e9-b273-4ed7-9181-937ba84734ab-.pptx
PPT
Computer systems security 7-cryptography.ppt
PDF
Modern Cryptography
PPT
15_526_topic02.ppt
PPTX
Cryptography
PPTX
NS UNIT 1 Advanced Encryption Standard& RSA
PPT
encryptcryptographyyyyyyyyyyyyyyyyyy.ppt
PPT
ICSE6104 Lecture bbbbbbbbbbbbbbbbbbbb 2.ppt
PPTX
Classical$ nn Encryption Techniques.pptx
PPT
cryptography.ppt
PPT
CryptographyCryptographyCryptography.ppt
CNIT 141: 4. Block Ciphers
4. Block Ciphers
overview of cryptographic techniques
CNIT 141: 4. Block Ciphers
Cryptography and network security Nit701
Modern symmetric cipher
IANSunit 1_cryptography_2.pptxv xvxvxvxv
Cryptography
Cybersecurity cyberlab3
619cb9e9-b273-4ed7-9181-937ba84734ab-.pptx
Computer systems security 7-cryptography.ppt
Modern Cryptography
15_526_topic02.ppt
Cryptography
NS UNIT 1 Advanced Encryption Standard& RSA
encryptcryptographyyyyyyyyyyyyyyyyyy.ppt
ICSE6104 Lecture bbbbbbbbbbbbbbbbbbbb 2.ppt
Classical$ nn Encryption Techniques.pptx
cryptography.ppt
CryptographyCryptographyCryptography.ppt
Ad

Recently uploaded (20)

PPTX
Geodesy 1.pptx...............................................
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
Sustainable Sites - Green Building Construction
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PPT
Mechanical Engineering MATERIALS Selection
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PDF
Arduino robotics embedded978-1-4302-3184-4.pdf
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PPTX
web development for engineering and engineering
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
DOCX
573137875-Attendance-Management-System-original
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
Lesson 3_Tessellation.pptx finite Mathematics
PDF
Structs to JSON How Go Powers REST APIs.pdf
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Geodesy 1.pptx...............................................
UNIT-1 - COAL BASED THERMAL POWER PLANTS
Sustainable Sites - Green Building Construction
Embodied AI: Ushering in the Next Era of Intelligent Systems
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Mechanical Engineering MATERIALS Selection
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
Arduino robotics embedded978-1-4302-3184-4.pdf
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
web development for engineering and engineering
CYBER-CRIMES AND SECURITY A guide to understanding
573137875-Attendance-Management-System-original
OOP with Java - Java Introduction (Basics)
Internet of Things (IOT) - A guide to understanding
Lesson 3_Tessellation.pptx finite Mathematics
Structs to JSON How Go Powers REST APIs.pdf
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Ad

Cryptography.ppt

  • 1. Introduction to Symmetric Block Cipher Jing Deng Based on Prof. Rick Han’s Lecture Slides Dr. Andreas Steffen’s Security Tutorial
  • 2. Cryptography • Encryption algorithm also called a cipher • Cryptography has evolved so that modern encryption and decryption use secret keys • Cryptographic algorithms can be openly published • Only have to protect the keys Encryption Decryption plaintext ciphertext plaintext Encryption Decryption plaintext ciphertext plaintext Key KA Key KB
  • 3. Symmetric-Key Cryptography • Both sender and receiver keys are the same: KA=KB • The keys must be kept secret and securely distributed • Thus, also called “Secret Key Cryptography” • Data Encryption Standard (DES) Encryption Decryption plaintext ciphertext plaintext Key KA Key KB=KA Secure Key Distribution
  • 4. Cryptanalysis • Brute force: try every key • Ciphertext-only attack: • Attacker knows ciphertext of several messages encrypted with same key (but doesn’t know plaintext). • Possible to recover plaintext (also possible to deduce key) by looking at frequency of ciphertext letters • Known-plaintext attack: • Attackers observes pairs of plaintext/ciphertext encrypted with same key. • Possible to deduce key and/or devise algorithm to decrypt ciphertext.
  • 5. Cryptanalysis (2) • Chosen-plaintext attack: • Attacker can choose the plaintext and look at the paired ciphertext • Attacker has more control than known-plaintext attack and may be able to gain more info about key • Adaptive Chosen-Plaintext attack: • Attacker chooses a series of plaintexts, basing the next plaintext on the result of previous encryption • Examples • Differential cryptanalysis – DES is resistant it • Linear cryptanalysis • Cryptanalysis attacks often exploit the redundancy of natural language • Lossless compression before encryption removes redundancy
  • 6. Examples • Simple and non-secure ciphers – Shift Cipher – Caesar Cipher – Affine Cipher – Vigenere Cipher – Hill Cipher • Information-secure cipher – One-Time Pad
  • 7. Confusion and Diffusion • Terms courtesy of Claude Shannon, father of Information Theory • “Confusion” = Substitution • a -> b • Caesar cipher • “Diffusion” = Transposition or Permutation • abcd -> dacb • DES Encryption Decryption plaintext ciphertext plaintext Key KA Key KB
  • 8. Confusion and Diffusion (2) • Modern substitution ciphers take in N bits and substitute N bits using lookup table: called S- Boxes • “Confusion” : a classical Substitution Cipher Courtesy: Andreas Steffen
  • 9. Confusion and Diffusion (3) • “Diffusion” : a classical Transposition cipher • modern Transposition ciphers take in N bits and permute using lookup table : called P-Boxes Courtesy: Andreas Steffen
  • 10. Block Cipher • Divide input bit stream into n-bit sections, encrypt only that section, no dependency/history between sections • In a good block cipher, each output bit is a function of all n input bits and all k key bits Courtesy: Andreas Steffen
  • 11. Example: DES • Data Encryption Standard (DES) • Encodes plaintext in 64-bit chunks using a 64-bit key (56 bits + 8 bits parity) • Uses a combination of diffusion and confusion to achieve security • Was cracked in 1997 • Parallel attack – exhaustively search key space • Decryption in DES – it’s symmetric! Use KA again as input and then the same keys except in reverse order
  • 12. Example: DES (2) • DES • 64-bit input is permuted • 16 stages of identical operation • differ in the 48-bit key extracted from 56-bit key - complex • R2= R1 is encrypted with K1 and XOR’d with L1 • L2=R1, … • Final inverse permutation stage
  • 14. Beyond DES • Triple-DES: put the output of DES back as input into DES again with a different key, loop again: 3*56 = 168 bit key • Advanced Encryption Standard (AES) – Requirements: • shall be designed so that the key length may be increased as needed. • block size n = 128 bits, key size k = 128, 192, 256 bits – Candidates: MARS, twofish, RC6, Serpent, Rijndael – successor (Rijndael)
  • 15. Encryption Mode (ECB) • Electronic Code Book (ECB) mode for block ciphers of a long digital sequence • Vulnerable to replay attacks: if an attacker thinks block C2 corresponds to $ amount, then substitute another Ck • Attacker can also build a codebook of <Ck, guessed Pk> pairs
  • 16. Encryption Mode (CBC) • Cipher Block Chaining (CBC) mode for block ciphers • Inhibits replay attacks and codebook building: identical input plaintext Pi =Pk won’t result in same output code due to memory-based chaining • IV = Initialization Vector – use only once
  • 17. Stream Cipher • Stream ciphers • Rather than divide bit stream into discrete blocks, as block ciphers do, XOR each bit of your plaintext continuous stream with a bit from a pseudo-random sequence • At receiver, use same symmetric key, XOR again to extract plaintext