Security: Principles & Symmetric Key Cryptography

Slides:



Advertisements
Similar presentations
Chapter 8 Network Security
Advertisements

Network Security7-1 Chapter 7 Network Security Computer Networking: A Top Down Approach Featuring the Internet, 2 nd edition. Jim Kurose, Keith Ross Addison-Wesley,
CS 483 – SD SECTION BY DR. DANIYAL ALGHAZZAWI (3) Information Security.
1 CS 854 – Hot Topics in Computer and Communications Security Fall 2006 Introduction to Cryptography and Security.
Network Security Hwajung Lee. What is Computer Networks? A collection of autonomous computers interconnected by a single technology –Interconnected via:
8: Network Security Security. 8: Network Security8-2 Chapter 8 Network Security A note on the use of these ppt slides: We’re making these slides.
8-1 What is network security? Confidentiality: only sender, intended receiver should “understand” message contents m sender encrypts message m receiver.
Network Security – Part 1 Spring 2005 V.T. Raja, Ph.D., Oregon State University.
Network Security understand principles of network security:
EECC694 - Shaaban #1 lec #16 Spring Properties of Secure Network Communication Secrecy: Only the sender and intended receiver should be able.
Computer Networking Lecture 21: Security and Cryptography Thanks to various folks from , semester’s past and others.
Review and Announcement r Ethernet m Ethernet CSMA/CD algorithm r Hubs, bridges, and switches m Hub: physical layer Can’t interconnect 10BaseT & 100BaseT.
Overview of Cryptography and Its Applications Dr. Monther Aldwairi New York Institute of Technology- Amman Campus INCS741: Cryptography.
Security Module – Part 1 Spring 2006 V.T. Raja, Ph.D., Oregon State University.
Lecture 24 Cryptography CPE 401 / 601 Computer Network Systems slides are modified from Jim Kurose and Keith Ross and Dave Hollinger.
8-1 Chapter 8 Security Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note on the use of these.
CPSC 441 TUTORIAL TA: FANG WANG NETWORK SECURITY.
Lecture 23 Cryptography CPE 401 / 601 Computer Network Systems Slides are modified from Jim Kurose & Keith Ross.
1-1 1DT066 Distributed Information System Chapter 8 Network Security.
Lecture 17 Network Security CPE 401/601 Computer Network Systems slides are modified from Jim Kurose & Keith Ross All material copyright J.F.
22-1 Last time □ SMTP ( ) □ DNS This time □ P2P □ Security.
Cryptography, Authentication and Digital Signatures
Network Security7-1 Chapter 8: Network Security Chapter goals: r understand principles of network security: m cryptography and its many uses beyond “confidentiality”
Chapter 8, slide: 1 ECE/CS 372 – introduction to computer networks Lecture 18 Announcements: r Final exam will take place August 13 th,2012 r HW4 and Lab5.
Day 37 8: Network Security8-1. 8: Network Security8-2 Symmetric key cryptography symmetric key crypto: Bob and Alice share know same (symmetric) key:
Cryptography Wei Wu. Internet Threat Model Client Network Not trusted!!
8-1 Chapter 8 Security Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
8-1 Chapter 8 Security Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 part 1: Principles of cryptography.
Network Security Introduction Light stuff – examples with Alice, Bob and Trudy Serious stuff - Security attacks, mechanisms and services.
Chapter 8 Network Security Thanks and enjoy! JFK/KWR All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Computer Networking:
1 Security and Cryptography: basic aspects Ortal Arazi College of Engineering Dept. of Electrical & Computer Engineering The University of Tennessee.
Introduction1-1 Data Communications and Computer Networks Chapter 6 CS 3830 Lecture 28 Omar Meqdadi Department of Computer Science and Software Engineering.
1 Network Security Basics. 2 Network Security Foundations: r what is security? r cryptography r authentication r message integrity r key distribution.
Network Security7-1 Today r Reminders m Ch6 Homework due Wed Nov 12 m 2 nd exams have been corrected; contact me to see them r Start Chapter 7 (Security)
+ Security. + What is network security? confidentiality: only sender, intended receiver should “understand” message contents sender encrypts message receiver.
 Last Class  Chapter 7 on Data Presentation Formatting and Compression  This Class  Chapter 8.1. and 8.2.
Chapter 8 Network Security Thanks and enjoy! JFK/KWR All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Computer Networking:
Cryptography services Lecturer: Dr. Peter Soreanu Students: Raed Awad Ahmad Abdalhalim
8: Network Security8-1 Chapter 8 Network Security A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students,
Network security 1. Security taxonomy Physical security Resource exhaustion - DDoS system/network vulnerabilities Key-based security.
Network security Cryptographic Principles
Chapter 8: Network Security
What is network security?
ECE/CS 372 – introduction to computer networks Lecture 16
Encryption
Basic Network Encryption
Cryptography.
Chapter 8: Network Security
Chapter 8: Network Security
CAP6135: Malware and Software Vulnerability Analysis Basic Knowledge on Computer Network Security Cliff Zou Spring 2010 Network Security 1.
CAP6135: Malware and Software Vulnerability Analysis Basic Knowledge on Computer Network Security Cliff Zou Spring 2009 Network Security 1.
ECE 4450:427/527 - Computer Networks Spring 2017
Network Security Basics
Mumtaz Ali Rajput +92 – INFORMATION SECURITY – WEEK 2 Mumtaz Ali Rajput +92 – 301-
PART VII Security.
1DT057 Distributed Information System Chapter 8 Network Security
Review and Announcement
Encryption INST 346, Section 0201 April 3, 2018.
ADVANCED ENCRYPTION STANDARDADVANCED ENCRYPTION STANDARD
CS2911 Week 9, Class 1 Today Discussion on RSA Video Eavesdropping
Basic Network Encryption
Security: Integrity, Authentication, Non-repudiation
Chapter 8: Network Security
Security: Public Key Cryptography
Review of Cryptography: Symmetric and Asymmetric Crypto Advanced Network Security Peter Reiher August, 2014.
Secret-Key Encryption
Chapter 8: Network Security
Presentation transcript:

Security: Principles & Symmetric Key Cryptography CS 352, Lecture 18 http://www.cs.rutgers.edu/~sn624/352-S19 Srinivas Narayana (heavily adapted from slides by Prof. Badri Nath and the textbook authors)

Why Network Security? Malicious people share your network People who want to snoop People who want to destroy People who want to corrupt People who want to pretend People who want to steal Problem made more severe as Internet becomes more commercialized Active and passive attacks

Key aspects of network security confidentiality: only sender, intended receiver should “understand” message contents sender encrypts message receiver decrypts message integrity: sender, receiver want to ensure message not altered (in transit, or afterwards) without detection authentication: sender, receiver want to confirm identity of each other non-repudiation: Once someone sends a message, or conducts a transaction, she can’t later deny the contents of that message availability: services must be accessible and available to users 3

Friends and enemies: Alice, Bob, Trudy well-known in network security world Bob and Alice want to communicate “securely” Trudy (intruder) may intercept, delete, add messages Alice Bob channel data, control messages secure sender s secure receiver data data Trudy 4

Who might Bob and Alice be? Real humans  Web browser/server for electronic transactions (e.g., on-line purchases) on-line banking client/server DNS servers routers exchanging routing table updates other examples? 5

There are bad actors out there! Q: What can a “bad actor” do? A: A lot! eavesdrop: intercept messages actively insert messages into connection impersonation: can fake (spoof) source address in packet (or any field in packet) hijacking: “take over” ongoing connection by removing sender or receiver, inserting itself in place denial of service: prevent service from being used by others (e.g., by overloading resources) 6

Cryptography Preventing adversaries from reading private messages

Terminology of cryptography plaintext ciphertext K A encryption algorithm decryption Alice’s key Bob’s B En/decryption algorithms are also called ciphers. m plaintext message c = KA(m), KA(m) ciphertext, encrypted with key KA m’ = KB(c), KB(c) decrypted plaintext with key KB Want: m = KB(KA(m)) Want: KA(m) to be uncorrelated with m 8

Cryptography: Algorithms and Keys Cryptography requires both an en-/decryption algorithm and “keys” Key is a string known only to Alice and Bob, which controls how algorithm works Algorithm Should be public and known to all Inspires trust that the algorithm works Keys: Should be long enough to prevent easy breaking of the encryption Should be short enough to keep algorithm efficient Typical key lengths: 56-bit, 128-bit, 256-bit, 512-bit

Symmetric key cryptography encryption algorithm plaintext message, m ciphertext decryption algorithm plaintext KS(m) m = KS(KS(m)) symmetric key crypto: Bob and Alice share same (symmetric) key: S Q: how do Bob and Alice agree on key value? Key techniques of symmetric key crypto: Substitution and Permutation 10

Substitution-based ciphers monoalphabetic cipher: substitute one letter for another Ex: Caesar cipher: Each letter is replaced by a shift: succ(2), pred(3) More generally, map letters to other letters plaintext: abcdefghijklmnopqrstuvwxyz ciphertext: mnbvcxzasdfghjklpoiuytrewq e.g.: Plaintext: bob, i love you. alice ciphertext: nkn, s gktc wky. mgsbc Key: mapping from set of 26 letters to set of 26 letters Problem: Easy to break by analyzing statistical properties of written language

Polyalphabetic cipher n substitution ciphers, M1,M2,…,Mn cycling pattern: e.g., n=4: M1,M3,M4,M3,M2; M1,M3,M4,M3,M2; .. for each new plaintext symbol, use subsequent substitution pattern in cyclic pattern dog: d from M1, o from M3, g from M4 Encryption key: n substitution ciphers, and the cyclic pattern

Permutation-based ciphers Instead of substituting letters in the plaintext, we change their order A N D R E W 1 4 2 5 3 6 t h i s i s a m e s s a g e i w o u l d l i k e t o e n c r y p t n o w Key = ANDREW (used to define a permutation based on alphabet order) Plaintext = thisisamessageiwould liketoencryptnow Ciphertext = tiihssaesmsagioewul lkdietecdnrytopnw Also possible to break by analyzing structure of language

Encryption in practice Most actual encryption algorithms use a complex combination of substitution and permutation Examples: Data Encryption Standard (DES) Multiple iterations of substitution and transposition using a 56-bit key designed by IBM with input from the NSA International Data Encryption Algorithm (IDEA) uses a 128-bit key Advanced Encryption Standard (AES)

Stream and Block Ciphers

Two types of symmetric ciphers Stream ciphers encrypt one bit at time Block ciphers Break plaintext message in equal-size blocks Encrypt each block as a unit

Stream Ciphers pseudo random keystream generator key keystream Combine each bit of keystream with bit of plaintext to get one bit of ciphertext m(i) = ith bit of message ks(i) = ith bit of keystream c(i) = ith bit of ciphertext c(i) = ks(i)  m(i) ( = XOR) m(i) = ks(i)  c(i)

Block ciphers Message to be encrypted is processed in blocks of k bits (e.g., 64-bit blocks). 1-to-1 mapping is used to map k-bit block of plaintext to k-bit block of ciphertext Example with k=3: input output 000 110 001 111 010 101 011 100 input output 100 011 101 010 110 000 111 001 What is the ciphertext for 010110001111 ?

Block ciphers How many possible mappings are there for k=3? How many 3-bit inputs? How many mappingsor permutations of the 3-bit inputs? 8! Answer: 40,320 ; not very many! In general, 2k! mappings; huge for k=64 Problem: Table approach requires table with 264 entries, each entry with 64 bits Table too big: instead use function that simulates a randomly permuted table Many practical ciphers are block-based (DES, AES, …)

Problems with Symmetric Key Cryptography

Encryption using symmetric keys Same key for encryption and decryption Efficient to implement: Often the same or very similar algorithm for encryption and decryption Achieves confidentiality Vulnerable to tampering Bad guy can alter the encrypted message What about authentication? Vulnerable to replay attacks Bad guy can steal the encrypted message and later present it on behalf of a legitimate user

Replay attack Alice’s password is encrypted “Login: Alice” Password please EK(Alice’s password) Alice Bob Alice’s password is encrypted From both Bob and attackers If Bob is trusted, he can decrypt using the same key But still subject to replay attack

Replay attack “Login: Alice” Password please EK(Alice’s password) Bob Store: EK(Alice’s password) Trudy

Replay attack This is a replay attack How can we prevent a replay? Login: Alice Password please EK(Alice’s password) Trudy Bob This is a replay attack How can we prevent a replay? By adding a NONCE value; Number used once only Use a temporary random number!

Challenge-Response Nonce is the challenge Login: Alice “Password please” + Nonce EK(Alice’s password, Nonce) Alice Bob Nonce is the challenge The encrypted msg is the response Nonce changed every time Prevents replay, ensures freshness Even if Trudy steals the encrypted Nonce value, it won’t work in the next login (nonce changed)

General problems with repeated ciphertext Block ciphers take chunks of info (ex: 64-bit) to other chunks Previous example: Passwords can be replayed But more generally, easy to guess parts of payload with repeated plaintext Example: HTTP/1.1 Then use those parts of a message to guess other parts of the payload … and so on

Generalizing nonces for all messages Nonces can be sent as plain text Can we use a nonce on every message to prevent replay? Yes! Send nonce, Ek(message  nonce) to transfer message But very inefficient: Double bits for every message Use a method to generate nonces automatically Cipher block chaining: use the previous ciphertext as a nonce for the next plain text block First block randomized using Initialization Vector (IV)

Cipher block chaining: Encryption Exercise: how would decryption work?

How to agree on a shared secret key? In reality: two parties may meet in person or communicate “out of band” to exchange shared key But communicating parties may never meet in person Example: An online retailer and customer Much more common for a network  What if the shared secret is stolen? All secret communications can now be decrypted and are visible Is there a way to communicate securely without worrying about secure key exchange? Next lecture: Public key cryptography

RC4 Stream Cipher RC4 is a popular stream cipher Extensively analyzed and considered good Key can be from 1 to 256 bytes Used in WEP for 802.11 Can be used in SSL