Encryption. INST 346, Section 0201 April 3, 2018

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

Kurose & Ross, Chapters (5 th ed.)

ח'/סיון/תשע "א. RSA: getting ready. Public Key Cryptography. Public key cryptography. Public key encryption algorithms

SECURITY IN NETWORKS

SECURITY IN NETWORKS 1

The Network Security Model. What can an adversary do? Who might Bob and Alice be? Computer Networks 12/2/2009. CSC 257/457 - Fall

Lecture 30. Cryptography. Symmetric Key Cryptography. Key Exchange. Advanced Encryption Standard (AES) DES. Security April 11, 2005

Ref:

14. Internet Security (J. Kurose)

CSC 8560 Computer Networks: Network Security

CS Computer Networks 1: Authentication

Computer Networking. What is network security? Chapter 7: Network security. Symmetric key cryptography. The language of cryptography

Network Security. Computer Networking: A Top Down Approach Featuring the Internet, 2 nd edition. Jim Kurose, Keith Ross Addison-Wesley, July 2002.

Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ

Computer Communication Networks Network Security

Internet and Intranet Protocols and Applications

CS 332 Computer Networks Security

Distributed Systems. 26. Cryptographic Systems: An Introduction. Paul Krzyzanowski. Rutgers University. Fall 2015

Public Key Algorithms

Chapter 8. Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley, July 2004.

Lecture 9a: Secure Sockets Layer (SSL) March, 2004

Welcome to CS 395/495 Internet Security: A Measurement-based Approach

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

Computer Security: Principles and Practice

Chapter 8 Security. Computer Networking: A Top Down Approach. Andrei Gurtov. 7 th edition Jim Kurose, Keith Ross Pearson/Addison Wesley April 2016

CSCI 454/554 Computer and Network Security. Topic 5.2 Public Key Cryptography

Outline. CSCI 454/554 Computer and Network Security. Introduction. Topic 5.2 Public Key Cryptography. 1. Introduction 2. RSA

UNIT - IV Cryptographic Hash Function 31.1

Chapter 9 Public Key Cryptography. WANG YANG

Outline. Public Key Cryptography. Applications of Public Key Crypto. Applications (Cont d)

CSC 774 Network Security

Cryptography (Overview)

1.264 Lecture 28. Cryptography: Asymmetric keys

Chapter 8 Security. Computer Networking: A Top Down Approach

CSE 3461/5461: Introduction to Computer Networking and Internet Technologies. Network Security. Presentation L

L13. Reviews. Rocky K. C. Chang, April 10, 2015

Security. Communication security. System Security

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

Lecture 2 Applied Cryptography (Part 2)

CSE 127: Computer Security Cryptography. Kirill Levchenko

9/30/2016. Cryptography Basics. Outline. Encryption/Decryption. Cryptanalysis. Caesar Cipher. Mono-Alphabetic Ciphers

Encryption Algorithms Authentication Protocols Message Integrity Protocols Key Distribution Firewalls

Cryptography Basics. IT443 Network Security Administration Slides courtesy of Bo Sheng

CSC/ECE 774 Advanced Network Security

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

Security: Cryptography

Introduction to Cryptography. Vasil Slavov William Jewell College

Computer Networks. Wenzhong Li. Nanjing University

CSC 474/574 Information Systems Security

David Wetherall, with some slides from Radia Perlman s security lectures.

Chapter 8 Network Security

Chapter 8 Network Security. Computer Networking: A Top Down Approach, 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April 2009.

ISA 662 Internet Security Protocols. Outline. Prime Numbers (I) Beauty of Mathematics. Division (II) Division (I)

COSC4377. Chapter 8 roadmap

Cryptographic Systems

Encryption I. An Introduction

WAP Security. Helsinki University of Technology S Security of Communication Protocols

Cryptography (DES+RSA) by Amit Konar Dept. of Math and CS, UMSL

Chapter 8 Network Security

Cryptography & Key Exchange Protocols. Faculty of Computer Science & Engineering HCMC University of Technology

Chapter 4: Securing TCP connections

Outline. Data Encryption Standard. Symmetric-Key Algorithms. Lecture 4

Key Exchange. References: Applied Cryptography, Bruce Schneier Cryptography and Network Securiy, Willian Stallings

APNIC elearning: Cryptography Basics

Information Security. message M. fingerprint f = H(M) one-way hash. 4/19/2006 Information Security 1

Public Key Algorithms

Practical Aspects of Modern Cryptography

06/02/ Local & Metropolitan Area Networks. 0. Overview. Terminology ACOE322. Lecture 8 Network Security

Computer Security. 08. Cryptography Part II. Paul Krzyzanowski. Rutgers University. Spring 2018

3 Symmetric Key Cryptography 3.1 Block Ciphers Symmetric key strength analysis Electronic Code Book Mode (ECB) Cipher Block Chaining Mode (CBC) Some

Public-Key Cryptography. Professor Yanmin Gong Week 3: Sep. 7

CSC 474/574 Information Systems Security

Computer Security. 08r. Pre-exam 2 Last-minute Review Cryptography. Paul Krzyzanowski. Rutgers University. Spring 2018

The question paper contains 40 multiple choice questions with four choices and students will have to pick the correct one (each carrying ½ marks.).

Introduction to Cryptography

Modern cryptography 2. CSCI 470: Web Science Keith Vertanen

Chapter 8 Web Security

Garantía y Seguridad en Sistemas y Redes

Symmetric Cryptography. CS4264 Fall 2016

Other Uses of Cryptography. Cryptography Goals. Basic Problem and Terminology. Other Uses of Cryptography. What Can Go Wrong? Why Do We Need a Key?

CSCE 715: Network Systems Security

Computer Networks II

Security issues: Encryption algorithms. Threats Methods of attack. Secret-key Public-key Hybrid protocols. CS550: Distributed OS.

Module: Cryptographic Protocols. Professor Patrick McDaniel Spring CMPSC443 - Introduction to Computer and Network Security

Public Key Algorithms

COSC : mobility within same subnet. Lecture 26. H1 remains in same IP subnet: IP address can remain same

Lecture 1 Applied Cryptography (Part 1)

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

Network Security. Chapter 8. MYcsvtu Notes.

Cryptography and Network Security

n-bit Output Feedback

Lecture Nov. 21 st 2006 Dan Wendlandt ISP D ISP B ISP C ISP A. Bob. Alice. Denial-of-Service. Password Cracking. Traffic.

Cryptography and Network Security. Sixth Edition by William Stallings

Elements of Cryptography and Computer and Networking Security Computer Science 134 (COMPSCI 134) Fall 2016 Instructor: Karim ElDefrawy

Security: Focus of Control. Authentication

PROTECTING CONVERSATIONS

Intro to Public Key Cryptography Diffie & Hellman Key Exchange

Public Key Cryptography, OpenPGP, and Enigmail. 31/5/ Geek Girls Carrffots GVA

BCA III Network security and Cryptography Examination-2016 Model Paper 1

S. Erfani, ECE Dept., University of Windsor Network Security

Transcription:

Encryption INST 346, Section 0201 April 3, 2018

Goals for Today Symmetric Key Encryption Public Key Encryption Certificate Authorities Secure Sockets Layer

Simple encryption scheme substitution cipher: substituting one thing for another monoalphabetic cipher: substitute one letter for another plaintext: abcdefghijklmnopqrstuvwxyz ciphertext: mnbvcxzasdfghjklpoiuytrewq e.g.: Plaintext: bob. i love you. alice ciphertext: nkn. s gktc wky. mgsbc Encryption key: mapping from set of 26 letters to set of 26 letters

Stream and Block Ciphers n substitution ciphers, M 1,M 2,,M n cycling pattern: e.g., n=4: M 1,M 3,M 4,M 3,M 2 ; M 1,M 3,M 4,M 3,M 2 ;.. random initialization for each new plaintext symbol, use subsequent substitution pattern in cyclic pattern dog: d from M 1, o from M 3, g from M 4 Encryption key: n substitution ciphers, and cyclic pattern

AES: Advanced Encryption Standard symmetric-key NIST standard, replaced DES (Nov 2001) processes data in 128 bit blocks 128, 192, or 256 bit keys brute force decryption (try each key) taking 1 sec on DES, takes 149 trillion years for AES

Public Key Cryptography symmetric key crypto requires sender, receiver know shared secret key Q: how to agree on key in first place (particularly if never met )? public key crypto radically different approach [Diffie- Hellman76, RSA78] sender, receiver do not share secret key public encryption key known to all private decryption key known only to receiver

Public key cryptography K B + K B - Bob s public key Bob s private key plaintext message, m encryption algorithm ciphertext + K (m) B decryption algorithm plaintext message - + m = K (K (m)) B B

Public key encryption algorithms requirements: 1 2.. + - B - + B need K ( ) and K ( ) such that K (K (m)) = m B B given public key K B, it should be impossible to compute private - key K B + RSA: Rivest, Shamir, Adelson algorithm

RSA: Creating public/private key pair 1. choose two large prime numbers p, q. (e.g., 1024 bits each) 2. compute n = pq, z = (p-1)(q-1) 3. choose e (with e<n) that has no common factors with z (e, z are relatively prime ). 4. choose d such that ed-1 is exactly divisible by z. (in other words: ed mod z = 1 ). 5. public key is (n,e). private key is (n,d). K B + K B -

RSA: encryption, decryption 0. given (n,e) and (n,d) as computed above 1. to encrypt message m (<n), compute c = m e mod n 2. to decrypt received bit pattern, c, compute m = c d mod n m = (m e mod n) c d mod n

RSA example: Bob chooses p=5, q=7. Then n=35, z=24. e=5 (so e, z relatively prime). d=29 (so ed-1 exactly divisible by z). encrypting 8-bit messages. encrypt: decrypt: bit pattern m m e c = m e mod n 0000l000 12 24832 17 c c d m = c d mod n 17 481968572106750915091411825223071697 12

RSA: an important property - + K (K (m)) = m B B use public key first, followed by private key = + - B B K (K (m)) use private key first, followed by public key result is the same!

Why is RSA secure? suppose you know Bob s public key (n,e). How hard is it to determine d? essentially need to find factors of n without knowing the two factors p and q fact: factoring a big number is hard

RSA in practice: session keys exponentiation in RSA is computationally intensive DES is at least 100 times faster than RSA use public key crypto to establish secure connection, then establish second key symmetric session key for encrypting data session key, K S Bob and Alice use RSA to exchange a symmetric key K S once both have K S, they use symmetric key cryptography

Digital signatures cryptographic technique analogous to hand-written signatures: sender (Bob) digitally signs document, establishing he is document owner/creator. verifiable, nonforgeable: recipient (Alice) can prove to someone that Bob, and no one else (including Alice), must have signed document

Digital signatures simple digital signature for message m: Bob signs m by encrypting with his private key K B, creating signed message, K- B (m) - Bob s message, m Dear Alice Oh, how I have missed you. I think of you all the time! (blah blah blah) Bob K B - Public key encryption algorithm Bob s private key m,k B - (m) Bob s message, m, signed (encrypted) with his private key In practice, this is done more efficiently on message digests

Digital signatures suppose Alice receives msg m, with signature: m, K B (m) Alice verifies m signed by Bob by applying Bob s public key K B + - + - to K B (m) then checks K B (K B (m) ) = m. + - If K B (K B (m) ) = m, whoever signed m must have used Bob s private key. Alice thus verifies that: Bob signed m no one else signed m Bob signed m and not m non-repudiation: - Alice can take m, and signature K B (m) to court and prove that Bob signed m -

Message digests goal: fixed-length, easyto-compute digital fingerprint apply hash function H to m, get fixed size message digest, H(m). large message m H: Hash Function H(m) Hash function properties: many-to-1 produces fixed-size msg digest (fingerprint) given message digest x, computationally infeasible to find m such that x = H(m)

TCP checksum: poor crypto hash function Internet checksum has some properties of hash function: produces fixed length digest (16-bit sum) of message is many-to-one But given message with given hash value, it is easy to find another message with same hash value: message ASCII format message ASCII format I O U 1 0 0. 9 9 B O B 49 4F 55 31 30 30 2E 39 39 42 D2 42 I O U 9 0 0. 1 9 B O B 49 4F 55 39 30 30 2E 31 39 42 D2 42 B2 C1 D2 AC different messages but identical checksums! B2 C1 D2 AC

Widely used hash functions MD5 (RFC 1321) has known vulnerabilities computes 128-bit message digest in 4-step process SHA-1 is widely used but is deprecated US standard [NIST, FIPS PUB 180-1] 160-bit message digest Collision attack with 1000 GPUs in a month SHA-2 and SHA-3 are now available Also standardized by NIST More secure, but slower (in software)

Certification authorities certification authority (CA): binds public key to particular entity, E. E (person, router) registers its public key with CA. E provides proof of identity to CA. CA creates certificate binding E to its public key. certificate containing E s public key digitally signed by CA CA says this is E s public key Bob s identifying information Bob s public key K B + digital signature (encrypt) CA private key K - CA K B + certificate for Bob s public key, signed by CA

Certification authorities when Alice wants Bob s public key: gets Bob s certificate (Bob or elsewhere). apply CA s public key to Bob s certificate, get Bob s public key K B + digital signature (decrypt) K B + Bob s public key CA public key K + CA

Secure Sockets Layer Application TCP IP normal application Application SSL TCP IP application with SSL SSL provides application programming interface (API) to applications

SSL record format 1 byte 2 bytes 3 bytes content type SSL version length data MIC Message Integrity Code (MIC) is a cryptographic hash Data and MIC use symmetric encryption

SSL cipher suite cipher suite public-key algorithm symmetric encryption algorithm MIC algorithm SSL supports several cipher suites negotiation: client, server agree on cipher suite client offers choice server picks one common SSL symmetric ciphers DES Data Encryption Standard: block 3DES Triple strength: block RC2 Rivest Cipher 2: block RC4 Rivest Cipher 4: stream SSL Public key encryption RSA

SSL overview handshake: Alice and Bob use their certificates, private keys to authenticate each other and exchange shared secret key derivation: Alice and Bob use shared secret to derive set of keys data transfer: data to be transferred is broken up into series of records connection closure: special messages to securely close connection

SSL: Setup ( handshake ) 1. Server authentication client sends list of algorithms it supports, along with client nonce (a random number, used only once) server chooses algorithms from list; sends back: choice + certificate + server nonce 2. Crypto negotiation client verifies certificate, extracts server s public key generates pre_master_secret, encrypts with server s public key, sends to server 3. Establish keys Client and server independently compute encryption and MIC keys from pre_master_secret and nonces 4. Authentication client sends a MIC of all the handshake messages server sends a MIC of all the handshake messages

SSL: handshake authentication last 2 steps protect handshake from tampering client typically offers range of algorithms, some strong, some weak man-in-the middle could delete stronger algorithms from list last 2 steps prevent this last two messages are encrypted

Key derivation client nonce, server nonce, and pre-master secret input into pseudo random-number generator. produces master secret master secret and new nonces input into another random-number generator: key block key block is then sliced and diced: client MIC key server MIC key client encryption key server encryption key client initialization vector (IV) server initialization vector (IV)

SSL connection everything henceforth is encrypted TCP FIN follows