CPS 290 Computer Security Network Tools Cryptography Basics CPS 290Page 1.

Slides:



Advertisements
Similar presentations
Spring 2000CS 4611 Security Outline Encryption Algorithms Authentication Protocols Message Integrity Protocols Key Distribution Firewalls.
Advertisements

15-853Page 1 CPS 214 Computer Networks and Distributed Systems Cryptography Basics RSA SSL SSH Kerberos.
Digital Signatures Good properties of hand-written signatures: 1. Signature is authentic. 2. Signature is unforgeable. 3. Signature is not reusable (it.
Digital Signatures and Hash Functions. Digital Signatures.
1 Introduction CSE 5351: Introduction to cryptography Reading assignment: Chapter 1 of Katz & Lindell.
Session 5 Hash functions and digital signatures. Contents Hash functions – Definition – Requirements – Construction – Security – Applications 2/44.
CC3.12 Erdal KOSE Privacy & Digital Security Encryption.
Chapter 5 Cryptography Protecting principals communication in systems.
Henric Johnson1 Chapter3 Public-Key Cryptography and Message Authentication Henric Johnson Blekinge Institute of Technology, Sweden
Secure Hashing and DSS Sultan Almuhammadi ICS 454 Principles of Cryptography.
How cryptography is used to secure web services Josh Benaloh Cryptographer Microsoft Research.
Spring 2003CS 4611 Security Outline Encryption Algorithms Authentication Protocols Message Integrity Protocols Key Distribution Firewalls.
CMSC 414 Computer and Network Security Lecture 6 Jonathan Katz.
Cryptography1 CPSC 3730 Cryptography Chapter 9 Public Key Cryptography and RSA.
Chapter3 Public-Key Cryptography and Message Authentication.
Fall 2010/Lecture 311 CS 426 (Fall 2010) Public Key Encryption and Digital Signatures.
Dr.Saleem Al_Zoubi1 Cryptography and Network Security Third Edition by William Stallings Public Key Cryptography and RSA.
1 Pertemuan 08 Public Key Cryptography Matakuliah: H0242 / Keamanan Jaringan Tahun: 2006 Versi: 1.
1 CS 194: Distributed Systems Security Scott Shenker and Ion Stoica Computer Science Division Department of Electrical Engineering and Computer Sciences.
Lecture 4 Cryptographic Tools (cont) modified from slides of Lawrie Brown.
Encryption Methods By: Michael A. Scott
Introduction to Public Key Cryptography
Public Key Model 8. Cryptography part 2.
 Introduction  Requirements for RSA  Ingredients for RSA  RSA Algorithm  RSA Example  Problems on RSA.
Andreas Steffen, , 4-PublicKey.pptx 1 Internet Security 1 (IntSi1) Prof. Dr. Andreas Steffen Institute for Internet Technologies and Applications.
Sorting Out Digital Certificates Bill blog.codingoutloud.com ··· Boston Azure ··· 13·Dec·2012 ···
Cryptography in.Net CS 795. Goals Confidentiality---no one else can intercept a message as it passes from A to B---Encryption is the answer Integrity---message.
CS5204 – Fall Cryptographic Security Presenter: Hamid Al-Hamadi October 13, 2009.
1 Public-Key Cryptography and Message Authentication Ola Flygt Växjö University, Sweden
Page 1 Secure Communication Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation.
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 9: Cryptography.
The RSA Algorithm Rocky K. C. Chang, March
296.3:Algorithms in the Real World
I-4 security.
Public-Key Cryptography CS110 Fall Conventional Encryption.
How cryptography is used to secure web services Josh Benaloh Cryptographer Microsoft Research.
CS526: Information Security Prof. Sam Wagstaff September 16, 2003 Cryptography Basics.
4 th lecture.  Message to be encrypted: HELLO  Key: XMCKL H E L L O message 7 (H) 4 (E) 11 (L) 11 (L) 14 (O) message + 23 (X) 12 (M) 2 (C) 10 (K) 11.
Module 3 – Cryptography Cryptography basics Ciphers Symmetric Key Algorithms Public Key Algorithms Message Digests Digital Signatures.
BASIC CRYPTOGRAPHIC CONCEPTS. Public Key Cryptography  Uses two keys for every simplex logical communication link.  Public key  Private key  The use.
Cryptography Wei Wu. Internet Threat Model Client Network Not trusted!!
Chapter 21 Public-Key Cryptography and Message Authentication.
Public Key Cryptography. symmetric key crypto requires sender, receiver know shared secret key Q: how to agree on key in first place (particularly if.
1 Public-Key Cryptography and Message Authentication.
Computer and Network Security Rabie A. Ramadan Lecture 6.
Cryptography and Network Security Chapter 9 - Public-Key Cryptography
1 Cryptography NOTES. 2 Secret Key Cryptography Single key used to encrypt and decrypt. Key must be known by both parties. Assuming we live in a hostile.
PUBLIC-KEY CRYPTOGRAPH IT 352 : Lecture 2- part3 Najwa AlGhamdi, MSc – 2012 /1433.
Encryption No. 1  Seattle Pacific University Encryption: Protecting Your Data While in Transit Kevin Bolding Electrical Engineering Seattle Pacific University.
CS 4244: Internet Programming Security 1.0. Introduction Client identification and cookies Basic Authentication Digest Authentication Secure HTTP.
CPS 290 Computer Security Network Tools Cryptography Basics CPS 290Page 1.
CIT 380: Securing Computer SystemsSlide #1 CIT 380: Securing Computer Systems Modern Cryptography.
15-499Page :Algorithms and Applications Cryptography I – Introduction – Terminology – Some primitives – Some protocols.
Chapter 3 – Public Key Cryptography and RSA (A). Private-Key Cryptography traditional private/secret/single-key cryptography uses one key shared by both.
NEW DIRECTIONS IN CRYPTOGRAPHY Made Harta Dwijaksara, Yi Jae Park.
Chapter 9 Public Key Cryptography and RSA. Private-Key Cryptography traditional private/secret/single key cryptography uses one key shared by both sender.
PUBLIC-KEY CRYPTOGRAPHY AND RSA – Chapter 9 PUBLIC-KEY CRYPTOGRAPHY AND RSA – Chapter 9 Principles Applications Requirements RSA Algorithm Description.
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
Computer Security Lecture 5 Ch.9 Public-Key Cryptography And RSA Prepared by Dr. Lamiaa Elshenawy.
EE 122: Lecture 24 (Security) Ion Stoica December 4, 2001.
IT 221: Introduction to Information Security Principles Lecture 5: Message Authentications, Hash Functions and Hash/Mac Algorithms For Educational Purposes.
Cryptographic Security Aveek Chakraborty CS5204 – Operating Systems1.
1 The RSA Algorithm Rocky K. C. Chang February 23, 2007.
CPS 512 Distributed Systems
Public Key Encryption and Digital Signatures
Network Tools Cryptography Basics
Lecture 10: Network Security.
Chapter 3 - Public-Key Cryptography & Authentication
One Way Functions Motivation Complexity Theory Review, Motivation
Network Tools Cryptography Basics
Presentation transcript:

CPS 290 Computer Security Network Tools Cryptography Basics CPS 290Page 1

Discovering My Laptop’s IPv4 Address On Windows, use program ipconfig. On Mac or Linux, use ifconfig. Only my wired ethernet interface has an IP address ( ) CPS 290Page 2

Resolving the name to an IP address On Windows, use nslookup. On Mac or Linux, use dig. The answer is provided by the authoritative name server duke.cs.duke.edu ( ) sibyl.cs.duke.edu is an alias for the canonical name (CNAME) The address for sibyl.cs.duke.edu is CPS 290Page 3

Capturing and Examining Packets I begin to capture packets on my wired ethernet interface using the program called wireshark (for Windows, Mac, or Linux). I make a request to through my browser. I enter the filter (ip.src == || ip.dst == ) && (ip.dst == || ip.src == ) to examine only packets between my machine and CPS 290Page 4

TCP Three-Way Handshake First three packets show the TCP three-way handshake, SYN, SYN- ACK, ACK, which is used to establish a TCP connection. Note: The handshake makes it difficult to establish a TCP connection with a spoofed (forged) browser source address in the SYN packet: Server will send SYN-ACK to the spoofed address, which won’t reply with an ACK. Sender of spoofed SYN packet doesn’t receive the SYN-ACK, doesn’t know the correct sequence number to ACK. CPS 290Page 5 SYN SYN-ACK ACK

Browser Sends HTTP GET Request CPS 290Page 6

Server Responds with HTTP 301 Code CPS 290Page 7 The server didn’t like my request for It wanted me to enter Criminy!

CPS 290Page 8 Basic Cryptography Definitions Private Key or Symmetric: Key 1 = Key 2 Public Key or Asymmetric: Key 1  Key 2 Key 1 or Key 2 is public depending on the protocol Encryption Decryption Key 1 Key 2 Cyphertext E key1 (M) = C D key2 (C) = M Original Plaintext Plaintext

CPS 290Page 9 What does it mean to be secure? Unconditionally Secure: Encrypted message cannot be decoded without the key Shannon showed in 1943 that key must be as long as the message to be unconditionally secure – this is based on information theory A one time pad – xor a random key with a message (Used in 2 nd world war) Security based on computational cost: it is computationally “infeasible” to decode a message without the key. No (probabilistic) polynomial time algorithm can decode the message.

CPS 290Page 10 Primitives: One-Way Functions (Informally): A function Y = f(x) is one-way if it is easy to compute y from x but “hard” to compute x from y Building block of most cryptographic protocols And, the security of most protocols rely on their existence. Unfortunately, not known to exist. This is true even if we assume P  NP.

CPS 290Page 11 One-way functions: possible definition 1.F(x) is polynomial time 2.F -1 (x) is NP-hard What is wrong with this definition?

CPS 290Page 12 One-way functions: better definition For most y no single PPT (probabilistic polynomial time) algorithm can compute x Roughly: at most a fraction 1/|x| k instances x are easy for any k and as |x| ->  This definition can be used to make the probability of hitting an easy instance arbitrarily small.

CPS 290Page 13 Some examples (conjectures) Factoring: x = (u,v) y = f(u,v) = u*v If u and v are prime it is hard to generate them from y. Discrete Log: y = g x mod p where p is prime and g is a “generator” (i.e., g 1, g 2, g 3, … generates all values < p). DES with fixed message: y = DES x (m) This would assume a family of DES functions of increasing key size (for asymptotics)

CPS 290Page 14 One-way functions in private-key protocols y = ciphertext m = plaintext k = key Is y = E k (m) (i.e. f = E k ) a one-way function with respect to y and m? What do one-way functions have to do with private- key protocols?

CPS 290Page 15 One-way functions in private-key protocols y = ciphertext m = plaintext k = key How about y = E k (m) = E(k,m) = E m (k) (i.e. f = E m ) should this be a one-way function? In a known-plaintext attack we know a (y,m) pair. The m along with E defines f E m (k) needs to be easy E m -1 (y) should be hard Otherwise we could extract the key k.

CPS 290Page 16 One-way functions in public-key protocols y = ciphertext m = plaintext k = public key Consider: y = E k (m) (i.e., f = E k ) We know k and thus f E k (m) needs to be easy E k -1 (y) should be hard Otherwise we could decrypt y. But what about the intended recipient, who should be able to decrypt y?

CPS 290Page 17 One-Way Trapdoor Functions A one-way function with a “trapdoor” The trapdoor is a key that makes it easy to invert the function y = f(x) Example: RSA (conjecture) y = x e mod n Where n = pq (p, q are prime) p or q or d (where ed = 1 mod (p-1)(q-1)) can be used as trapdoors In public-key algorithms f(x) = public key (e.g., e and n in RSA) Trapdoor = private key (e.g., d in RSA)

CPS 290Page 18 One-way Hash Functions Y = h(x) where –y is a fixed length independent of the size of x. In general this means h is not invertible since it is many to one. –Calculating y from x is easy –Calculating any x such that y = h(x) give y is hard Used in digital signatures and other protocols.

CPS 290Page 19 Protocols: Digital Signatures Goals: 1.Convince recipient that message was actually sent by a trusted source 2.Do not allow repudiation, i.e., that’s not my signature. 3.Do not allow tampering with the message without invalidating the signature Item 2 turns out to be really hard to do