Encryption 2. Tom Chothia Computer Security: Lecture 3

Similar documents
Symmetric Key Encryption. Symmetric Key Encryption. Advanced Encryption Standard ( AES ) DES DES DES 08/01/2015. DES and 3-DES.

CSE 127: Computer Security Cryptography. Kirill Levchenko

Public Key Algorithms

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

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

Advanced Crypto. 2. Public key, private key and key exchange. Author: Prof Bill Buchanan

Chapter 9 Public Key Cryptography. WANG YANG

Lecture 6 - Cryptography

Diffie-Hellman. Part 1 Cryptography 136

Key Exchange. Secure Software Systems

CS 161 Computer Security

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

Public Key Algorithms

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

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

Lecture 20 Public key Crypto. Stephen Checkoway University of Illinois at Chicago CS 487 Fall 2017 Slides from Miller and Bailey s ECE 422

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

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

Making and Breaking Ciphers

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

Basics of Cryptography

Modern cryptography 2. CSCI 470: Web Science Keith Vertanen

CSC 474/574 Information Systems Security

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

Overview. Public Key Algorithms I

Encryption. INST 346, Section 0201 April 3, 2018

The evolving storage encryption market

PUBLIC KEY CRYPTO. Anwitaman DATTA SCSE, NTU Singapore CX4024. CRYPTOGRAPHY & NETWORK SECURITY 2018, Anwitaman DATTA

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

Cryptography Symmetric Cryptography Asymmetric Cryptography Internet Communication. Telling Secrets. Secret Writing Through the Ages.

Grenzen der Kryptographie

Cryptography CS 555. Topic 16: Key Management and The Need for Public Key Cryptography. CS555 Spring 2012/Topic 16 1

Introduction to Symmetric Cryptography

Introduction to Cryptography. Vasil Slavov William Jewell College

Access Control. Tom Chothia Computer Security, Lecture 5

Understanding Cryptography A Textbook for Students and Practitioners by Christof Paar and Jan Pelzl. Chapter 6 Introduction to Public-Key Cryptography

ASYMMETRIC (PUBLIC-KEY) ENCRYPTION. Mihir Bellare UCSD 1

CS 161 Computer Security

Kurose & Ross, Chapters (5 th ed.)

Ref:

NIST Cryptographic Toolkit

Lecture 7 - Applied Cryptography

Lecture 3: Symmetric Key Encryption

Lecture 4: Symmetric Key Encryption

Secrets & Lies, Knowledge & Trust. (Modern Cryptography) COS 116 4/20/2006 Instructor: Sanjeev Arora

More on Cryptography CS 136 Computer Security Peter Reiher January 19, 2017

(a) Symmetric model (b) Cryptography (c) Cryptanalysis (d) Steganography

TECHNISCHE UNIVERSITEIT EINDHOVEN Faculty of Mathematics and Computer Science Exam Cryptology, Tuesday 31 October 2017

CS 332 Computer Networks Security

Applied Cryptography and Computer Security CSE 664 Spring 2018

Jaap van Ginkel Security of Systems and Networks

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

Cryptography III. Public-Key Cryptography Digital Signatures. 2/1/18 Cryptography III

ASYMMETRIC (PUBLIC-KEY) ENCRYPTION. Mihir Bellare UCSD 1

Fall 2010/Lecture 32 1

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

Understanding Cryptography A Textbook for Students and Practitioners by Christof Paar and Jan Pelzl. Chapter 6 Introduction to Public-Key Cryptography

Encrypting and Decrypting using CTR and CBC Modes in C# with BouncyCastle

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

18733: Applied Cryptography Anupam Datta (CMU) Basic key exchange. Dan Boneh

Cryptographic Systems

Technological foundation

Cryptographic Concepts

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

Key Establishment and Authentication Protocols EECE 412

CIS 4360 Secure Computer Systems Applied Cryptography

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

Other Topics in Cryptography. Truong Tuan Anh

CS 161 Computer Security

Public Key Cryptography

A simple approach of Peer-to-Peer E-Cash system

CS Computer Networks 1: Authentication

The Design of an Anonymous and a Fair Novel E-cash System

CS61A Lecture #39: Cryptography

EEC-682/782 Computer Networks I

Crypto CS 485/ECE 440/CS 585 Fall 2017

Part VI. Public-key cryptography

Introduction to Cryptography. Steven M. Bellovin September 27,

Cryptography and Network Security

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

Computer Security. 10. Exam 2 Review. Paul Krzyzanowski. Rutgers University. Spring 2017

Public-Key Encryption, Key Exchange, Digital Signatures CMSC 23200/33250, Autumn 2018, Lecture 7

Cryptography. and Network Security. Lecture 0. Manoj Prabhakaran. IIT Bombay

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

Intro to Public Key Cryptography Diffie & Hellman Key Exchange

CPSC 467: Cryptography and Computer Security

Understand the TLS handshake Understand client/server authentication in TLS. Understand session resumption Understand the limitations of TLS

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

CS3235 Seventh set of lecture slides

Chapter 8. Network Security. Cryptography. Need for Security. An Introduction to Cryptography 10/7/2010

Jaap van Ginkel Security of Systems and Networks

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

Unit 8 Review. Secure your network! CS144, Stanford University

Total No. of Questions : 09 ] [ Total No.of Pages : 02

n-bit Output Feedback

Winter 2011 Josh Benaloh Brian LaMacchia

Computer Security 3/23/18

Security: Cryptography

Homework 1 CS161 Computer Security, Spring 2008 Assigned 2/4/08 Due 2/13/08

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

Transcription:

Encryption 2 Tom Chothia Computer Security: Lecture 3

This Lecture Counter Mode (CTR) enryption Diffie Helleman key exchange Public Key Encryption RSA Signing Combining public and symmetric key encryption

Tutorial Groups Please sign up for a tutorial group now. Your tutor will contact you to arrange a time and place to meet on Thursday or Friday. Don t understand something? E-mail your tutor, he will discuss it in tutorials.

WorkSheet 1 Worksheets are small exercise. You get a few token marks. We will use virtual machines, for some exercises. The first worksheet is just to get a VM working and install Truecrypt. It will be marked in the first tutorial on Thursday or Friday.

Lab Session Lab session Wednesday 10-12 in LG04 Bring your laptop, or use a school machine. Myself and/or tutors will be present to give you individual help with your programs, tools, exercises. Come along on Wednesday, with your laptop, and we will help get a VM installed.

Last Lecture: Symmetric Key Encryption Ciphers Frequency Analysis One time pads AES, DES and 3-DES Block cipher modes Truecrypt

Xor (M k) k = M 0 xor 0 = 0 1 xor 0 = 1 0 xor 1 = 1 1 xor 1 = 0 ascii Hello Alice 01011001 01100101 01110011 Key 11001011 01001101 11110001 10010010 00101000 10000010

Xor (M k) k = M 0 xor 0 = 0 1 xor 0 = 1 0 xor 1 = 1 1 xor 1 = 0 ascii Hello Alice 01011001 01100101 01110011 Key 11001011 01001101 11110001 10010010 00101000 10000010

Cipher Block Chaining mode (CBC) Plain text = B 1,B 2, B 3, IV = random number (sent in clear) Cipher text = C 1,C 2, C 3, where C 1 = encrypt K (B 1 xor IV), C 2 = encrypt K (B 2 xor C 1 )... C i = encrypt K (B i xor C i-1 ).

CBC encrypt http://en.wikipedia.org/wiki/block_cipher_modes_of_operation

CBC decrypt Receive IV Receive cipher text = C 1,C 2, C 3, Plain text = B 1,B 2, B 3, where: B 1 = decrypt K (C 1 ) xor IV, B 2 = decrypt K (C 2 ) xor C 1,.. B i = decrypt K (B i ) xor C i-1.

CBC decrypt http://en.wikipedia.org/wiki/block_cipher_modes_of_operation

Block Cipher Modes Original ECB CBC http://en.wikipedia.org/wiki/block_cipher_modes_of_operation

Sony PlayStation Sony needs to stop games being copied. CD & full disk encryption User can read and write particular areas of the hard disk.

Sony PlayStation With CBC, you need to encrypt, or decrypt, the whole file to get to the end. The Sony PlayStation uses ECB full disk encryption, to stop people copying games. User can access files they made themselves (notes, music, video ) Hardware controls user access to data.

Sony PlayStation Disk Encryption Attack 1. Remove disk and make a copy. 2. Write a user accessible file to the disk. 3. Find the bit of disk that changed (that s your encrypted file). 4. Over write this with what you want to decrypt. 5. Restart the PlayStation and ask for your file back. 6. PlayStation decrypts the file and gives you the plain text.

Counter Mode (CTR) Plain text = B 1,B 2, B 3, IV = random number (sent in clear) Cipher text = C 1,C 2, C 3, where C 1 = B 1 xor encrypt K (IV), C 2 = B 2 xor encrypt K (IV+1), C 3 = B 3 xor encrypt K (IV+2),.. C i = B i xor encrypt K (IV+ i-1 ),

http://en.wikipedia.org/wiki/block_cipher_modes_of_operation

This Lecture Counter Mode (CTR) enryption Diffie Helleman key exchange Public Key Encryption RSA Signing Combining public and symmetric key encryption

Some History Before cheap powerful computers, unbreakable encryption was almost impossible. Cipher machines looked like this: Governments wanted to read the codes of others. They could control the export of these machines. When IBM designed DES they could get it weakened.

Some History During 1970-1990 all that changed. Personal computers could do anything a cipher machine could do. University academics worked on encryption with the aim of making it available to everyone.

Public Key Encryption Public key encryption helps (but doesn t solve) this problem. The idea of public key encryption is that you have two keys: one for encryption and another for decryption. The encryption key is made public, the decryption key is always secret.

Diffie-Hellman Diffie-Hellman is a widely used key agreement protocol. It relies on some number theory: a mod b = n where for some m : a = m.b + n The protocol uses two public parameters generator g (often 160 bits long) prime p (often 1024 bits long)

Diffie-Hellman Alice and Bob pick random numbers r A and r B and find t A = g r A mod p and t B = g r B mod p The protocol just exchanges these numbers: 1. A B : t A 2. B A : t B Alice calculates t A r A mod p and Bob t A r B mod p this is the key: K = g r A r B mod p

Diffie-Hellman An observer cannot work out r A and r B from t A and t B therefore the attacker cannot calculate the key So we have a Good Key but know nothing about the participants. We did not need to share any keys at the start, therefore this is a very powerful protocol. In practice: use DH to set up a secure channel, then use something else to authenticate the person at the other end.

Elgamal Elgamal, is Diffie-Hellmen turned into a public key scheme. It uses a fix g & p Alice picks r A as her private key & t A = g r A mod p is the public key. To encrypt message M, Bob picks r A finds and sends (g rb mod p, M. t A rb )

RSA RSA is the most popular public key cipher. More efficient that Elgamal, and allows for signing. It uses two large primes p & q. We set n = p.q and o(n) = (p-1)(q-1) Pick random e such that 1 e o(n) and e and o(n) are co-prime. d such that d.e mod o(n) = 1 The public key is (e,n) and the private key is (d,n)

RSA To encrypt a message, turn it into numbers m that are less than n The encrypt as cipher text c do: c = m e mod n To decrypt a cipher text c as a message m do: m = c d mod n

Some More History These ciphers make encryption pretty much unbreakable. They made encryption available to everyone and the Internet, as we know it, possible But Diffie, Rivset, etc. weren t the first. At the British intelligent service GCHQ:" James Ellis invented the concept of public keys in the 1960 s" Malcolm J. Williamson invented DH in 1974" Clifford Cocks invented RSA in 1973" But GCHQ distributed their keys via embassies, so never used it."

Signatures Using RSA E pub (D priv (M)) = M This can be used to sign messages. Sign a message with the private key and this can be verified with the public key. Any real crypto suite will not just encrypt with a public key, as this can be used to trick people into decrypting. Usually sign just the hash of the message.

Elliptic curve crypto Public key encryption based on elliptic curves. Functionally very like RSA, but more efficient. No full security proof, by recommended by NSA. Becoming the most popular web public key encryption system.

This Lecture Counter Mode (CTR) enryption Diffie Helleman key exchange Public Key Encryption RSA Signing Combining public and symmetric key encryption

Further Reading See links on the website. Eike s Cryptology module Coursera Cryptology module www.coursera.org/course/crypto Bruce Schneier: Applied Cryptography The Code Book, by Simon Singh.

Next Lecture Practical encryption. How to do encryption in Java. How to use a keystore to look after your keys.