Lecture 6 - Cryptography



Similar documents
Module: Applied Cryptography. Professor Patrick McDaniel Fall CSE543 - Introduction to Computer and Network Security

CIS 433/533 - Computer and Network Security Public Key Crypto/ Cryptographic Protocols

CIS433/533 - Computer and Network Security Cryptography

CSCE 465 Computer & Network Security

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

Overview of Public-Key Cryptography

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

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

Public Key (asymmetric) Cryptography

Public Key Cryptography Overview

Lecture 9: Application of Cryptography

7! Cryptographic Techniques! A Brief Introduction

Lukasz Pater CMMS Administrator and Developer

Network Security. Chapter 2 Basics 2.2 Public Key Cryptography. Public Key Cryptography. Public Key Cryptography

Public Key Cryptography. c Eli Biham - March 30, Public Key Cryptography

Cryptography and Network Security

Cryptography and Network Security Chapter 9

CIS 5371 Cryptography. 8. Encryption --

Overview of Cryptographic Tools for Data Security. Murat Kantarcioglu

Notes on Network Security Prof. Hemant K. Soni

CS Computer Security Third topic: Crypto Support Sys

Cryptography and Network Security Chapter 10

The Mathematics of the RSA Public-Key Cryptosystem

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

Public Key Cryptography and RSA. Review: Number Theory Basics

Secure Network Communication Part II II Public Key Cryptography. Public Key Cryptography

CS 758: Cryptography / Network Security

SECURITY IMPROVMENTS TO THE DIFFIE-HELLMAN SCHEMES

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

Computer Security: Principles and Practice

Table of Contents. Bibliografische Informationen digitalisiert durch

Software Tool for Implementing RSA Algorithm

CS 348: Computer Networks. - Security; 30 th - 31 st Oct Instructor: Sridhar Iyer IIT Bombay

SFWR ENG 4C03 - Computer Networks & Computer Security

Public Key Cryptography: RSA and Lots of Number Theory

Forward Secrecy: How to Secure SSL from Attacks by Government Agencies

How To Understand And Understand The History Of Cryptography

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

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

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

How To Encrypt Data With Encryption

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

Principles of Public Key Cryptography. Applications of Public Key Cryptography. Security in Public Key Algorithms

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

Cryptography and Network Security

An Introduction to the RSA Encryption Method

Elements of Applied Cryptography Public key encryption

Chapter 10. Network Security

SECURITY IN NETWORKS

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

Network Security Technology Network Management

A SOFTWARE COMPARISON OF RSA AND ECC

A New Efficient Digital Signature Scheme Algorithm based on Block cipher

Secure File Transfer Using USB

Symmetric Key cryptosystem

Signature Schemes. CSG 252 Fall Riccardo Pucella

CS155. Cryptography Overview

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

Lecture 9 - Network Security TDTS (ht1)

Fundamentals of Computer Security

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

CRYPTOGRAPHY IN NETWORK SECURITY

Hash Functions. Integrity checks

Security. Contents. S Wireless Personal, Local, Metropolitan, and Wide Area Networks 1

Cryptographic Hash Functions Message Authentication Digital Signatures

CPSC 467b: Cryptography and Computer Security

Network Security. HIT Shimrit Tzur-David

Lecture Note 5 PUBLIC-KEY CRYPTOGRAPHY. Sourav Mukhopadhyay

An Efficient Data Security in Cloud Computing Using the RSA Encryption Process Algorithm

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

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

Cryptography Lecture 8. Digital signatures, hash functions

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

IMPROVED SECURITY MEASURES FOR DATA IN KEY EXCHANGES IN CLOUD ENVIRONMENT

Digital Signature. Raj Jain. Washington University in St. Louis

Evaluation of Digital Signature Process

Capture Resilient ElGamal Signature Protocols

IT Networks & Security CERT Luncheon Series: Cryptography

RSA Attacks. By Abdulaziz Alrasheed and Fatima

Cryptography Overview

An Introduction to RSA Public-Key Cryptography

Computer Networks. Network Security and Ethics. Week 14. College of Information Science and Engineering Ritsumeikan University

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

EXAM questions for the course TTM Information Security June Part 1

Kleptography: The unbearable lightness of being mistrustful

QUANTUM COMPUTERS AND CRYPTOGRAPHY. Mark Zhandry Stanford University

Outline. Digital signature. Symmetric-key Cryptography. Caesar cipher. Cryptography basics Digital signature

Software Implementation of Gong-Harn Public-key Cryptosystem and Analysis

Schnorr Signcryption. Combining public key encryption with Schnorr digital signature. Laura Savu, University of Bucharest, Romania

Cryptography & Digital Signatures

EXAM questions for the course TTM Information Security May Part 1

Lecture 3: One-Way Encryption, RSA Example

Practice Questions. CS161 Computer Security, Fall 2008

Security. Friends and Enemies. Overview Plaintext Cryptography functions. Secret Key (DES) Symmetric Key

Applied Cryptography Public Key Algorithms

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

One-Way Encryption and Message Authentication

Advanced Cryptography

Cryptography and Network Security

Chapter 8. Network Security

Transcription:

Lecture 6 - Cryptography CSE497b - Spring 2007 Introduction Computer and Network Security Professor Jaeger www.cse.psu.edu/~tjaeger/cse497b-s07

Question 2 Setup: Assume you and I don t know anything about each other, but we want to communicate securely. We want to establish a key that we can encrypt communication with each other. Q: Is this possible??

Diffie-Hellman Key Agreement The DH paper really started the modern age of cryptography, and indirectly the security community Negotiate a secret over an insecure media E.g., in the clear (seems impossible) Idea: participants exchange intractable puzzles that can be solved easily with additional information. Mathematics are very deep Working in multiplicative group G Use the hardness of computing discrete logarithms in finite field to make secure Things like RSA are variants that exploit similar properties

Diffie-Hellman Protocol For two participants p 1 and p 2 Setup: We pick a prime number p and a base g (<p) This information is public E.g., p=13, g=4 Step 1: Each principal picks a private value x (<p-1) Step 2: Each principal generates and communicates a new value y = g x mod p Step 3: Each principal generates the secret shared key z z = y x mod p Where y is the value received from the other party.

A protocol run... p=17, g=6 Step 1) Alice picks x=4 Bob picks x=5 Step 2) Alice's y = 6^4 mod 17 = 1296 mod 17 = 4 Bob's y = 6^5 mod 17 = 7776 mod 17 = 7 Step 3) Alice's z = 7^4 mod 17 = 2401 mod 17 = 4 Bob's z = 4^5 mod 17 = 1024 mod 17 = 4

Attacks on Diffie-Hellman This is key exchange, not authentication. You really don t know anything about who you have exchanged keys with The man in the middle A B Alice and Bob think they are talking directly to each other, but Mallory is actually performing two separate exchanges You need to have an authenticated DH exchange The parties sign the exchanges (more or less) See Schneier for a intuitive description

Public Key Cryptography Public Key cryptography Each key pair consists of a public and private component: k + (public key), k - (private key) D( k +, E(k -,p)) = p D( k -, E(k +, p) ) = p Public keys are distributed (typically) through public key certificates Anyone can communicate secretly with you if they have your certificate E.g., SSL-based web commerce 7

RSA (Rivest, Shamir, Adelman) A dominant public key algorithm The algorithm itself is conceptually simple Why it is secure is very deep (number theory) Use properties of exponentiation modulo a product of large primes "A method for obtaining Digital Signatures and Public Key Cryptosystems, Communications of the ACM, Feb., 1978 21(2) pages 120-126. 8

RSA Key Generation 9 Pick two large primes p and q Calculate n = pq Pick e such that it is relatively prime to phi(n) = (q-1)(p-1) Euler s Totient Function d ~= e -1 mod phi(n) or de mod phi(n) = 1 1. p=3, q=11 2. n = 3*11 = 33 3. phi(n) = (2*10) = 20 4. e = 7 GCD(20,7) = 1 Euclid s Algorithm 5. d = 7-1 mod 20 d = 7 mod 20 = 1 d = 3

RSA Encryption/Decryption Public key k + is {e,n} and private key k - is {d,n} Encryption and Decryption E(k+,P) : ciphertext = plaintext e mod n D(k-,C) : plaintext = ciphertext d mod n Example Public key (7,33), Private Key (3,33) Data 4 (encoding of actual data) E({7,33},4) = 4 7 mod 33 = 16384 mod 33 = 16 D({3,33},16) = 16 3 mod 33 = 4096 mod 33 = 4 10

Encryption using private key 11 Encryption and Decryption E(k -,P) : ciphertext = plaintext d mod n D(k +,C) : plaintext = ciphertext e mod n E.g., E({3,33},4) = 4 3 mod 33 = 64 mod 33 = 31 D({7,33},19) = 31 7 mod 33 = 27,512,614,111 mod 33 = 4 Q: Why encrypt with private key?

The symmetric/asymmetric key tradeoff 12 Symmetric (shared) key systems Efficient (Many MB/sec throughput) Difficult key management Kerberos Key agreement protocols Asymmetric (public) key systems Slow algorithms (so far ) Easy key management PKI - public key infrastructures Webs of trust (PGP)

Hash Algorithms (aka crypto checksums) 13 Hash algorithm h() In general algorithmic use, generates succinct representation of some data, fixed output size Used for binning items in collections A funneling algorithm Infinite inputs... Fixed-length outputs Pigeonhole Principle If you have n bins, and n+1 items, at least one bin will contain more than one item Implication: there will be collisions in any hash algorithm i.e., h(x) == h(y), for some infinite number of x and y

Hash Algorithms (aka crypto checksums) 14 Hash algorithm Compression of data into a hash value E.g., h(d) = parity(d) Such algorithms are generally useful in programs as used in cryptosystems One-way - (computationally) hard to invert h(), i.e., compute h -1 (y), where y=h(d) Collision resistant hard to find two data x 1 and x 2 such that h(x 1 ) == h(x 2 ) Q: What can you do with these constructs?

Birthday Attack A birthday attack is a name used to refer to a class of brute-force attacks. birthday paradox : the probability that two or more people in a group of 23 share the same birthday is >than 50% General formulation function f() whose output is uniformly distributed On repeated random inputs n = { n 1, n 2,,.., n k } Pr(n i = n j ) = 1.2k 1/2, for some 1 <= i,j <= k, 1 <= j < k, i!= j E.g., 1.2(365 1/2 ) ~= 23 Q: Why is resilience to birthday attacks important? 15

Basic truths of cryptography Cryptography is not frequently the source of security problems Algorithms are well known and widely studied Use of crypto commonly is (e.g., WEP) Vetted through crypto community Avoid any proprietary encryption Claims of new technology or perfect security are almost assuredly snake oil 16

Important principles 17 Don t design your own crypto algorithm Use standards whenever possible Make sure you understand parameter choices Make sure you understand algorithm interactions E.g. the order of encryption and authentication Turns out that authenticate then encrypt is risky Be open with your design Solicit feedback Use open algorithms and protocols Open code? (jury is still out)

Common issues that lead to pitfalls 18 Generating randomness Storage of secret keys Virtual memory (pages secrets onto disk) Protocol interactions Poor user interface Poor choice of key length, prime length, using parameters from one algorithm in another

Review: secret vs. public key crypto. 19 Secret key cryptography Symmetric keys, where A single key (k) is used is used for E and D D( k, E(k, p) ) = p All (intended) receivers have access to key Note: Management of keys determines who has access to encrypted data E.g., password encrypted email Also known as symmetric key cryptography Public key cryptography Each key pair consists of a public and private component: k + (public key), k - (private key) D( k -, E(k +, p) ) = p D( k +, E(k, - p) ) = p Public keys are distributed (typically) through public key certificates Anyone can communicate secretly with you if they have your certificate E.g., SSL-base web commerce

A really good book on the topic 20 The Code Book, Simon Singh, Anchor Books, 1999.