Symmetric-Key Cryptography CS 161: Computer Security Prof. Raluca Ada Popa Sept 13, 2016.

Slides:



Advertisements
Similar presentations
DES The Data Encryption Standard (DES) is a classic symmetric block cipher algorithm. DES was developed in the 1970’s as a US government standard The block.
Advertisements

“Advanced Encryption Standard” & “Modes of Operation”
CS 483 – SD SECTION BY DR. DANIYAL ALGHAZZAWI (3) Information Security.
Cryptography1 CPSC 3730 Cryptography Chapter 6 Triple DES, Block Cipher Modes of Operation.
Block Ciphers 1 Block Ciphers Block Ciphers 2 Block Ciphers  Modern version of a codebook cipher  In effect, a block cipher algorithm yields a huge.
CMSC 414 Computer and Network Security Lecture 3 Jonathan Katz.
Kemal AkkayaWireless & Network Security 1 Department of Computer Science Southern Illinois University Carbondale CS 591 – Wireless & Network Security Lecture.
EEC 693/793 Special Topics in Electrical Engineering Secure and Dependable Computing Lecture 5 Wenbing Zhao Department of Electrical and Computer Engineering.
Overview of Cryptography and Its Applications Dr. Monther Aldwairi New York Institute of Technology- Amman Campus INCS741: Cryptography.
Lecture 23 Symmetric Encryption
Encryption Schemes Second Pass Brice Toth 21 November 2001.
Kevin Orr JT Schratz AES ENCRYPTION. OVERVIEW History Algorithm Uses Brute Force Attack.
Modes of Operation. Topics  Overview of Modes of Operation  EBC, CBC, CFB, OFB, CTR  Notes and Remarks on each modes.
Chapter 20 Symmetric Encryption and Message Confidentiality.
Chapter 20 Symmetric Encryption and Message Confidentiality.
CS555Spring 2012/Topic 111 Cryptography CS 555 Topic 11: Encryption Modes and CCA Security.
Cryptography Chapter 7 Part 2 Pages 781 to 812. Symmetric Cryptography Secret Key Figure 7-10 on page 782 Key distribution problem – Secure courier Many.
CMSC 414 Computer and Network Security Lecture 5 Jonathan Katz.
Shambhu Upadhyaya Security – AES-CCMP Shambhu Upadhyaya Wireless Network Security CSE 566 (Lecture 13)
Modes of Usage Dan Fleck CS 469: Security Engineering These slides are modified with permission from Bill Young (Univ of Texas) 11 Coming up: Modes of.
Lecture 23 Symmetric Encryption
Part 1  Cryptography 1 Integrity Part 1  Cryptography 2 Data Integrity  Integrity  detect unauthorized writing (i.e., modification of data)  Example:
1 CPCS425: Information Security (Topic 5) Topic 5  Symmetrical Cryptography  Understand the principles of modern symmetric (conventional) cryptography.
1 Introduction to Cryptography Chapter-4. Definitions  Cryptography = the science (art) of encryption  Cryptanalysis = the science (art) of breaking.
Block Cipher Modes Last Updated: Aug 25, ECB Mode Electronic Code Book Divide the plaintext into fixed-size blocks Encrypt/Decrypt each block independently.
Modes of Operation block ciphers encrypt fixed size blocks – eg. DES encrypts 64-bit blocks with 56-bit key need some way to en/decrypt arbitrary amounts.
Block Cipher Encrypting a large message Electronic Code Book (ECB) message m1 m2 m3 m4 m5 m6 c1 c2 c3 c4 c5 c6 E E E Secret.
Practical Aspects of Modern Cryptography Josh Benaloh & Brian LaMacchia.
CS480 Cryptography and Information Security
Computer and Network Security
Symmetric Cryptography
Triple DES.
CSCE 715: Network Systems Security
What is network security?
HEY DOUG HOW ARE YOU? NKE JUAM NUC GXK EUA. HEY DOUG HOW ARE YOU? NKE JUAM NUC GXK EUA.
Encryption
Basic Network Encryption
Cryptography.
PRPs and PRFs CS255: Winter 2017
Introduction to modern cryptology
Block Cipher Modes CS 465 Make a chart for the mode comparisons
Cryptography Lecture 12.
Cryptography Basics and Symmetric Cryptography
مروري برالگوريتمهاي رمز متقارن(كليد پنهان)
Cryptography Lecture 10.
Block cipher and modes of encryptions
Introduction to Symmetric-key and Public-key Cryptography
Cryptography Lecture 11.
Foundations of Network and Computer Security
Security Of Wireless Sensor Networks
Block vs Stream Ciphers
ADVANCED ENCRYPTION STANDARDADVANCED ENCRYPTION STANDARD
Foundations of Network and Computer Security
SOFTWARE IMPLEMENTATION OF OCB MODE
Block Ciphers (Crypto 2)
Security of Wireless Sensor Networks
DISSERTATION ON CRYPTOGRAPHY.
Cryptography Lecture 11.
Cryptography Lecture 9.
Cryptography Lecture 12.
Padding Oracle Attacks
Topic 13: Message Authentication Code
Basic Network Encryption
Cryptography Lecture 9.
Cryptography Lecture 11.
Cryptography Lecture 10.
Secret-Key Encryption
Presentation transcript:

Symmetric-Key Cryptography CS 161: Computer Security Prof. Raluca Ada Popa Sept 13, 2016

Announcements Project due Sept 20

Special guests Alice Bob The attacker (Eve - “eavesdropper”, Malice) Sometimes Chris too

Cryptography Narrow definition: secure communication over insecure communication channels Broad definition: a way to provide formal guarantees in the presence of an attacker

Three main goals Confidentiality: preventing adversaries from reading our private data, Integrity: preventing attackers from altering some data, Authenticity: determining who created a given document

Modern Cryptography Symmetric-key cryptography –The same secret key is used by both endpoints of a communication Public-key (asymmetric-key) cryptography –Sender and receiver use different keys = =

Today: Symmetric-key Cryptography Whiteboard & notes: -Symmetric encryption definition -Security definition -One time pad (OTP) -Block cipher

Advanced Encryption Standard (AES) -Block cipher developed in 1998 by Joan Daemen and Vincent Rijmen -Recommended by US National Institute for Standard and Technology (NIST) -Block length n = 128, key length k = 256

AES ALGORITHM 14 cycles of repetition for 256-bit keys. AES slides, credit Kevin Orr

Algorithm Steps - Sub bytes each byte in the state matrix is replaced with a SubByte using an 8-bit substitution box b ij = S(a ij )

Shift Rows Cyclically shifts the bytes in each row by a certain offset The number of places each byte is shifted differs for each row

Uses Government Standard –AES is standardized as Federal Information Processing Standard 197 (FIPS 197) by NIST –To protect classified information Industry –SSL / TLS –SSH –WinZip –BitLocker –Mozilla Thunderbird –Skype But used as part of symmetric-key encryption or other crypto tools

Symmetric-key encryption from block ciphers

Why block ciphers not enough for encryption by themselves? Can only encrypt messages of a certain size If message is encrypted twice, attacker knows it is the same message

Original image

Eack block encrypted with a block cipher

Later (identical) message again encrypted

Symmetric key encryption scheme Can be reused (unlike OTP) Builds on block ciphers: –Can be used to encrypt long messages –Wants to hide that same block is encrypted twice Uses block ciphers in certain modes of operation

Electronic Code Book (ECB)

P1P1 P2P2 P3P3 C1C1 C2C2 C3C3 Encryption

P1P1 P2P2 P3P3 C1C1 C2C2 C3C3 Decryption What is the problem with ECB?

Does this achieve IND-KPA? No, attacker can tell if P i =P j

Original image

Encrypted with ECB

Later (identical) message again encrypted with ECB

P1P1 P2P2 P3P3 C1C1 C2C2 C3C3 CBC: Encryption IV may not repeat for messages with same P 1, choose it at random

P1P1 P2P2 P3P3 C1C1 C2C2 C3C3 CBC: Decryption

Original image

Encrypted with CBC

CBC Popular, still widely used Achieves IND-KPA, and more (IND-CPA) Caveat: sequential encryption, hard to parallelize CTR mode gaining popularity

Nonce is similar to IV for CBC, one should not use the same nonce for two messages; choose it at random C1C1 C2C2 C3C3 P1P1 P2P2 P3P3 CTR: Encryption

Note, CTR decryption uses block cipher’s encryption, not decryption C1C1 C2C2 C3C3 P1P1 P2P2 P3P3 CTR: Decryption

Speed: Both modes require the same amount of computation, but CTR is parallelizable Security: Both IND-KPA, and even IND-CPA If you ever reuse the same nonce, CBC might leak some information about the initial plaintext blocks up to a first difference between two messages. CTR can leak information about various blocks in the message. CBC vs CTR

Summary Encryption protects confidentiality IND-KPA is a security game expressing message indistinguishability OTP is secure if used only once Block ciphers help build symmetric-key encryption schemes with reusable sizes and arbitrary message lengths by chaining them in cipher modes