Fundamentals of Computer Security



Similar documents
CIS433/533 - Computer and Network Security Cryptography

Network Security. Computer Networking Lecture 08. March 19, HKU SPACE Community College. HKU SPACE CC CN Lecture 08 1/23

Hash Functions. Integrity checks

Overview of Cryptographic Tools for Data Security. Murat Kantarcioglu

Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall 2010

Message Authentication Codes

Network Security. HIT Shimrit Tzur-David

Practice Questions. CS161 Computer Security, Fall 2008

CIS 6930 Emerging Topics in Network Security. Topic 2. Network Security Primitives

Cryptography & Network Security

Outline. CSc 466/566. Computer Security. 8 : Cryptography Digital Signatures. Digital Signatures. Digital Signatures... Christian Collberg

Lecture 9: Application of Cryptography

Network Security CS 5490/6490 Fall 2015 Lecture Notes 8/26/2015

Cryptography and Network Security Chapter 12

Public Key Cryptography Overview

CSE331: Introduction to Networks and Security. Lecture 20 Fall 2006

CSCI-E46: Applied Network Security. Class 1: Introduction Cryptography Primer 1/26/16 CSCI-E46: APPLIED NETWORK SECURITY, SPRING

Lecture 6 - Cryptography

Chapter 11 Security+ Guide to Network Security Fundamentals, Third Edition Basic Cryptography

Cryptographic hash functions and MACs Solved Exercises for Cryptographic Hash Functions and MACs

Network Security. Security Attacks. Normal flow: Interruption: 孫 宏 民 Phone: 國 立 清 華 大 學 資 訊 工 程 系 資 訊 安 全 實 驗 室

Message Authentication Codes. Lecture Outline

CSE/EE 461 Lecture 23

Introduction to Computer Security

1 Step 1: Select... Files to Encrypt 2 Step 2: Confirm... Name of Archive 3 Step 3: Define... Pass Phrase

Network Security (2) CPSC 441 Department of Computer Science University of Calgary

Message Authentication

Network Security. Security. Security Services. Crytographic algorithms. privacy authenticity Message integrity. Public key (RSA) Message digest (MD5)

Network Security. Gaurav Naik Gus Anderson. College of Engineering. Drexel University, Philadelphia, PA. Drexel University. College of Engineering

CPSC 467b: Cryptography and Computer Security

How To Understand And Understand The History Of Cryptography

Cryptosystems. Bob wants to send a message M to Alice. Symmetric ciphers: Bob and Alice both share a secret key, K.

SECURITY IN NETWORKS

Cryptography and Network Security Chapter 11

Common Pitfalls in Cryptography for Software Developers. OWASP AppSec Israel July The OWASP Foundation

Authentication requirement Authentication function MAC Hash function Security of

How encryption works to provide confidentiality. How hashing works to provide integrity. How digital signatures work to provide authenticity and

Cryptography and Network Security Department of Computer Science and Engineering Indian Institute of Technology Kharagpur

Cryptographic Hash Functions Message Authentication Digital Signatures

Implementation and Comparison of Various Digital Signature Algorithms. -Nazia Sarang Boise State University

IT Networks & Security CERT Luncheon Series: Cryptography

Cryptography and Network Security Chapter 11. Fourth Edition by William Stallings

Authentication, digital signatures, PRNG

SAMPLE EXAM QUESTIONS MODULE EE5552 NETWORK SECURITY AND ENCRYPTION ECE, SCHOOL OF ENGINEERING AND DESIGN BRUNEL UNIVERSITY UXBRIDGE MIDDLESEX, UK

CSC474/574 - Information Systems Security: Homework1 Solutions Sketch

Network Security. Abusayeed Saifullah. CS 5600 Computer Networks. These slides are adapted from Kurose and Ross 8-1

Cryptography: Motivation. Data Structures and Algorithms Cryptography. Secret Writing Methods. Many areas have sensitive information, e.g.

Outline. Computer Science 418. Digital Signatures: Observations. Digital Signatures: Definition. Definition 1 (Digital signature) Digital Signatures

Network Security Technology Network Management

Lecture 10: CPA Encryption, MACs, Hash Functions. 2 Recap of last lecture - PRGs for one time pads

Overview of Symmetric Encryption

Lecture 15 - Digital Signatures

Computer Networks. Network Security 1. Professor Richard Harris School of Engineering and Advanced Technology

Lecture 9 - Message Authentication Codes

Cryptography Lecture 8. Digital signatures, hash functions

Chapter 7: Network security

Table of Contents. Bibliografische Informationen digitalisiert durch

CS 356 Lecture 27 Internet Security Protocols. Spring 2013

Message authentication and. digital signatures

Recommendation for Applications Using Approved Hash Algorithms

CUNSHENG DING HKUST, Hong Kong. Computer Security. Computer Security. Cunsheng DING, HKUST COMP4631

Computer Security: Principles and Practice

Part I. Universität Klagenfurt - IWAS Multimedia Kommunikation (VK) M. Euchner; Mai Siemens AG 2001, ICN M NT

Cryptography & Digital Signatures

Signature Schemes. CSG 252 Fall Riccardo Pucella

Massachusetts Institute of Technology Handout : Network and Computer Security October 9, 2003 Professor Ronald L. Rivest.

Introduction to Cryptography CS 355

Network Security. Abusayeed Saifullah. CS 5600 Computer Networks. These slides are adapted from Kurose and Ross 8-1


Block encryption. CS-4920: Lecture 7 Secret key cryptography. Determining the plaintext ciphertext mapping. CS4920-Lecture 7 4/1/2015

lundi 1 octobre 2012 In a set of N elements, by picking at random N elements, we have with high probability a collision two elements are equal

CSCE 465 Computer & Network Security

Principles of Network Security

Network Security. Modes of Operation. Steven M. Bellovin February 3,

HASH CODE BASED SECURITY IN CLOUD COMPUTING

Cryptography and Network Security Prof. D. Mukhopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Chair for Network Architectures and Services Department of Informatics TU München Prof. Carle. Network Security. Chapter 13

Digital Signatures. Murat Kantarcioglu. Based on Prof. Li s Slides. Digital Signatures: The Problem

Cryptography and Network Security Prof. D. Mukhopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Karagpur

Modes of Operation of Block Ciphers

Digital Signature For Text File

Introduction to Encryption

Chapter 8 Security. IC322 Fall Computer Networking: A Top Down Approach. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

Designing a Secure Client-Server System Master of Science Thesis in the Programme Software Engineering & Technology

Final Exam. IT 4823 Information Security Administration. Rescheduling Final Exams. Kerberos. Idea. Ticket

Developing and Investigation of a New Technique Combining Message Authentication and Encryption

1 Signatures vs. MACs

Security and Authentication Primer

Network Security [2] Plain text Encryption algorithm Public and private key pair Cipher text Decryption algorithm. See next slide

SFWR ENG 4C03 - Computer Networks & Computer Security

Network Security: Cryptography CS/SS G513 S.K. Sahay

1 Message Authentication

Fixity Checks: Checksums, Message Digests and Digital Signatures Audrey Novak, ILTS Digital Preservation Committee November 2006

Lukasz Pater CMMS Administrator and Developer

CSCE 465 Computer & Network Security

Part 2 D(E(M, K),K ) E(M, K) E(M, K) Plaintext M. Plaintext M. Decrypt with private key. Encrypt with public key. Ciphertext

Lecture 9 - Network Security TDTS (ht1)

Cryptography and Network Security Prof. D. Mukhopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Transcription:

Fundamentals of Computer Security Spring 2015 Radu Sion Intro Encryption Hash Functions

A Message From Our Sponsors Fundamentals System/Network Security, crypto How do things work Why How to design secure stuff 2

What we are not How to install XXX Command line options of XXX Latest iexplorer buffer overflow bug Latest McAfee/XXX products Network administration How to break your gf/bf email account 3

Ground Rules Dates are listed online now Zero tolerance to academic dishonesty Informal class, ask questions anytime Read your assigned readings! There may be quizzes Call me Radu Questions: office hours, or email to schedule appt. Email: sion@cs Have fun! 4

Evaluation Homeworks (0-10%) Midterm (30-40%) Activity and pop quizzes (0-10%) Final (40-50%) Course website: check link in your email 5

Classical Crypto Single/Symmetric Key Encryption Cryptographic Hash Functions 6

Meet the Cast Read: http://downlode.org/etext/alicebob.html! Alice (innocent) k Trent (trusted guy) does stuff too E k (M) M just listens k Bob (mostly innocent, sometimes malicious) Mallory ( mallicious, bad guy) Eve (eavesdrops, passive malicious) 7

An inconvenient truth Where does k come from? ( key distribution ) Can Eve distinguish between E k (M 1 ) and E k (M 2 ) if she knows M 1 and M 2? Should not be able to!!! ( semantic security ) Make sure that E k (M 1 ) E k (M 2 ) if M 1 M 2 (maybe not?) Can Mallory modify E k (M) into an E k (M mallory )? ( malleability ) etc (! lots of stuff!) Danger: things seem trivial and they are not result: super weak systems! 8

Caesar Cipher Example: Cæsar cipher M = { sequences of letters } K = { i i is an integer and 0 i 25 } E = { E k k K and for all letters m, E k (m) = (m + k) mod 26 } D = { D k k K and for all letters c, C = M D k (c) = (26 + c k) mod 26 } 9

Attacks Opponent whose goal is to break cryptosystem is the adversary Assume adversary knows algorithm used, but not key Many types of attacks: ciphertext only: adversary has only ciphertext; goal is to find plaintext, possibly key known plaintext: adversary has ciphertext, corresponding plaintext; goal is to find key chosen plaintext: adversary may supply plaintext and obtain corresponding ciphertext; goal is to find key chosen ciphertext: adversary may supply ciphertext and obtain corresponding plaintext; goal is to find key etc 10

How to attack? Mathematical attacks Based on analysis of underlying mathematics Statistical attacks Make assumptions about the distribution of letters, pairs of letters (digrams), triplets of letters (trigrams), etc. Called models of the language Examine ciphertext, correlate properties with the assumptions. 11

Statistics Compute frequency of each letter in ciphertext: G 0.1 H 0.1 K 0.1 O 0.3 R 0.2 U 0.1 Z 0.1 Apply 1-gram model of English Correlate and invert encryption 12

Caesar has a Problem Key is too short Can be found by exhaustive search Statistical frequencies not concealed well They look too much like regular English letters So make it longer Multiple letters in key Idea is to smooth the statistical frequencies to make cryptanalysis harder 13

Vigènere Cipher Like Cæsar cipher, but use a phrase Documented by Blaise de Vigenere (court of Henry III of France) in Paris, 1586 actually a variant of a cipher by a J.B. Porter Example Message THE BOY HAS THE BALL Key VIG Encipher using Cæsar cipher for each letter: key VIGVIGVIGVIGVIGV plain THEBOYHASTHEBALL cipher OPKWWECIYOPKWIRG 14

Holy Grail: One-Time Pad A Vigenère cipher with a random key at least as long as the message Provably unbreakable Why? Look at ciphertext DXQR. Equally likely to correspond to plaintext DOIT (key AJIY) and to plaintext DONT (key AJDY) and any other 4 letters Warning: keys must be random, or you can attack the cipher by trying to regenerate the key Approximations, such as using pseudorandom number generators to generate keys, are not random 15

Crypto Hash Functions Mathematical function to generate a set of k bits from a set of n bits (where k n). k is usually smaller then n Example: ASCII parity bit ASCII has 7 bits; 8th bit is parity Even parity: even number of 1 bits Odd parity: odd number of 1 bits 16

Sample Use Bob receives 10111101 as bits. Sender is using even parity; 6 1 bits, so character was received correctly Note: could be garbled, but 2 bits would need to have been changed to preserve parity Sender is using odd parity; even number of 1 bits, so character was not received correctly 17

Definition Cryptographic hash h: A B: 1. For any x A, h(x) is easy to compute 2. h(x) is of fixed length for any x (compression) 3. For any y B, it is computationally infeasible to find x A such that h(x) = y. (pre-image resistance) 4. It is computationally infeasible to find any two inputs x, x A such that x x and h(x) = h(x ) (collision resistance) 5. Alternate form of 3 (stronger): Given any x A, it is computationally infeasible to find a different x A such that h(x) = h(x ). (second preimage resistance) 18

Collisions If x x and h(x) = h(x ), x and x are a collision Pigeonhole principle: if there are n containers for n+1 objects, then at least one container will have 2 objects in it. Application: if there are 32 files and 8 possible cryptographic checksum values, at least one value corresponds to at least 4 files 19

Intuition A hash is a one-way, non-invertible function of that produces unique (with high likely-hood), fixed-size outputs for different inputs. The probability of any bit flipping in the output bit-string should be always ½ for any change (even one bit) in the input ( randomness ). 20

Sample Cipher: MD5 Basic idea: Continuously update hash value with 512 bit blocks of message 128 bit initial value for hash Bit operations to compress Compression function: Update 128 bit hash with 512 bit block Pass 1: Based on bits in first word, select bits in second or third word Pass 2: Repeat, selecting based on last word Pass 3: xor bits in words Pass 4: y (x or ~z) 21

Example MD5 Digest md5_digest("the quick brown fox jumps over the lazy dog") = 9e107d9d372bb6826bd81d3542a419d6 md5_digest("the quick brown fox jumps over the lazy cog") = 1055d3e698d289f2af8663725127bd4b 22

Hashes to (not) use Do not use at all the following: MD5, SHA-0/1, any other obscure secret ones For use in civilian/.com setting (until 2025): SHA-256/512, SHA3 23

Cool Application: Keyed Hashes Message Authentication Code (MAC) MAC(msg)=H(H(key,msg,key),msg) Usage: append this to message to allow authentication 24

Purpose of MACs? Want to enable only a certain party to verify authenticity of data for which it has a MAC (for example). Want to prevent Mallory to alter message and simply replace MAC (cannot do it now doesn t know the secret key) 25

Optional for next week For +5% credit in final exam. Install openssl and decrypt any of the following ciphertexts: U2FsdGVkX18Avp0s9oaA8I2HeaLoCG1gZyRmoLWWBFZXcrm/1ZsXSjxc2XTpbPZw U2FsdGVkX18KRUFApfRXdayMo8sYd96zEAdPXyA4hzMBdWxqVigJGsLs4okBhwje U2FsdGVkX1/DUTj3FPMhUWb/hgxIchBN6LWoRbLm2L/CARN/VSAYlg== U2FsdGVkX1/+vE2czERZciAIJteLkzndHwW9QrdibZ/Z6q8= 26