Class 25: Security through Complexity? Karsten Nohl cs302: Theory of Computation University of Virginia, Computer Science PS6 is due today. Lorenz cipher.

Slides:



Advertisements
Similar presentations
Cryptography, Attacks and Countermeasures Lecture 3 - Stream Ciphers
Advertisements

LINEAR FEEDBACK SHIFT REGISTERS, GALOIS FIELDS, AND STREAM CIPHERS Mike Thomsen Cryptography II May 14 th, 2012.
Stream ciphers 2 Session 2. Contents PN generators with LFSRs Statistical testing of PN generator sequences Cryptanalysis of stream ciphers 2/75.
CS 6262 Spring 02 - Lecture #7 (Tuesday, 1/29/2002) Introduction to Cryptography.
NSRC Workshop Some fundamental security concerns... Confidentiality - could someone else read my data? Integrity - has my data been changed? Authentication.
Cryptography and Network Security Chapter 3

Introduction to Cryptography and Security Mechanisms: Unit 5 Theoretical v Practical Security Dr Keith Martin McCrea
CMSC 414 Computer and Network Security Lecture 3 Jonathan Katz.
CMSC 414 Computer and Network Security Lecture 7 Jonathan Katz.
CS1001 Lecture 24. Overview Encryption Encryption Artificial Intelligence Artificial Intelligence Homework 4 Homework 4.
Stream Ciphers 1 Stream Ciphers. Stream Ciphers 2 Stream Ciphers  Generalization of one-time pad  Trade provable security for practicality  Stream.
August 6, 2003 Security Systems for Distributed Models in Ptolemy II Rakesh Reddy Carnegie Mellon University Motivation.
Session 6: Introduction to cryptanalysis part 1. Contents Problem definition Symmetric systems cryptanalysis Particularities of block ciphers cryptanalysis.
Overview of Cryptography and Its Applications Dr. Monther Aldwairi New York Institute of Technology- Amman Campus INCS741: Cryptography.
Fall 2010/Lecture 311 CS 426 (Fall 2010) Public Key Encryption and Digital Signatures.
CS426Fall 2010/Lecture 21 Computer Security CS 426 Lecture 2 Cryptography: Terminology & Classic Ciphers.
Lecture 23 Symmetric Encryption
Introduction to Computer and Network Security Iliano Cervesato 26 August 2008 – Modern Cryptography.
Computer Security CS 426 Lecture 3
Public Key Cryptography Bryan Pearsaul. Outline What is Cryptology? Symmetric Ciphers Asymmetric Ciphers Diffie-Hellman RSA (Rivest/Shamir/Adleman) Moral.
Lecture 4 Cryptographic Tools (cont) modified from slides of Lawrie Brown.
CS555Spring 2012/Topic 91 Cryptography CS 555 Topic 9: Block Cipher Construction & DES.
Encryption. Introduction Computer security is the prevention of or protection against –access to information by unauthorized recipients –intentional but.
Cryptography and Network Security Chapter 11 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Lecture 3: Cryptographic Tools modified from slides of Lawrie Brown.
Lecture 19 Page 1 CS 111 Online Security for Operating Systems: Cryptography, Authentication, and Protecting OS Resources CS 111 On-Line MS Program Operating.
Cryptography Week-6.
Cryptanalysis. The Speaker  Chuck Easttom  
Chapter 12 Cryptography Explained. Search Problems Specified by an algorithm C Two inputs ◦ I is the instance. ◦ S is the solution. ◦ Must complete in.
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 9: Cryptography.
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Network Security (A Very Brief Introduction)
Lecture 18 Page 1 CS 111 Online Design Principles for Secure Systems Economy Complete mediation Open design Separation of privileges Least privilege Least.
CIS 5371 Cryptography Introduction.
Lecture 19 Page 1 CS 111 Online Symmetric Cryptosystems C = E(K,P) P = D(K,C) E() and D() are not necessarily the same operations.
KAIS T A lightweight secure protocol for wireless sensor networks 윤주범 ELSEVIER Mar
Scott Perryman Jordan Williams.  NP-completeness is a class of unsolved decision problems in Computer Science.  A decision problem is a YES or NO answer.
Merkle-Hellman Knapsack Cryptosystem Merkle offered $100 award for breaking singly - iterated knapsack Singly-iterated Merkle - Hellman KC was broken by.
Cryptography Dec 29. This Lecture In this last lecture for number theory, we will see probably the most important application of number theory in computer.
Chapter 20 Symmetric Encryption and Message Confidentiality.
CS555Spring 2012/Topic 51 Cryptography CS 555 Topic 5: Pseudorandomness and Stream Ciphers.
Based on Bruce Schneier Chapter 7: Key Length Dulal C. Kar.
Network Security Lecture 10 Presented by: Dr. Munam Ali Shah.
Public Key Cryptography. symmetric key crypto requires sender, receiver know shared secret key Q: how to agree on key in first place (particularly if.
Major objective of this course is: Design and analysis of modern algorithms Different variants Accuracy Efficiency Comparing efficiencies Motivation thinking.
©KDDI R&D Laboratories Inc. ALL Rights Reserved. Cryptanalysis on Clock Controlled Stream Ciphers Shinsaku Kiyomoto KDDI R&D Laboratories Inc
Merkle-Hellman Knapsack Cryptosystem
Lecture 2: Introduction to Cryptography
NEW DIRECTIONS IN CRYPTOGRAPHY Made Harta Dwijaksara, Yi Jae Park.
Lecture 23 Symmetric Encryption
K. Salah1 Cryptography Module I. K. Salah2 Cryptographic Protocols  Messages should be transmitted to destination  Only the recipient should see it.
DES Analysis and Attacks CSCI 5857: Encoding and Encryption.
1 Security through complexity Ana Nora Sovarel. 2 Projects Please fill one slot on the signup sheet. One meeting for each group. All members must agree.
Complexity © 2014 Project Lead The Way, Inc.Computer Science and Software Engineering.
Presented by: Dr. Munam Ali Shah
Lecture 4 Overview. Data Encryption Standard Combination of substitution and transposition – Repeated for 16 cycles – Provides confusion and diffusion.
TRUSTED FLOW: Why, How and Where??? Moti Yung Columbia University.
1 CIS 5371 Cryptography 1.Introduction. 2 Prerequisites for this course  Basic Mathematics, in particular Number Theory  Basic Probability Theory 
Block Ciphers and the Data Encryption Standard. Modern Block Ciphers  One of the most widely used types of cryptographic algorithms  Used in symmetric.
Lecture 3 Page 1 CS 236 Online Introduction to Cryptography CS 236 On-Line MS Program Networks and Systems Security Peter Reiher.
Lecture 5 Page 1 CS 236 Online More on Cryptography CS 236 On-Line MS Program Networks and Systems Security Peter Reiher.
RSA Pubic Key Encryption CSCI 5857: Encoding and Encryption.
Ruhr University Bochum Faculty of Mathematics Information-Security and Cryptology Some new aspects concerning the Analysis of HFE type Cryptosystems Magnus.
Public Key Cryptosystem In Symmetric or Private Key cryptosystems the encryption and decryption keys are either the same or can be easily found from each.
Department of Computer Science Chapter 5 Introduction to Cryptography Semester 1.
1 CIS 5371 Cryptography 1.Introduction. 2 Prerequisites for this course  Basic Mathematics, in particular Number Theory  Basic Probability Theory 
หัวข้อบรรยาย Stream cipher RC4 WEP (in)security LFSR CSS (in)security.
Cryptography Lecture 15.
Objective of This Course
By: Anthony Gervasi & Adam Dickinson
Presentation transcript:

Class 25: Security through Complexity? Karsten Nohl cs302: Theory of Computation University of Virginia, Computer Science PS6 is due today. Lorenz cipher used in WW II

2 Lecture 25: Complex --> Secure? Motivation Many applications require certain tasks to be easy for some and hard for others Example: Decryption of encrypted message is easy only when given a secret key Cryptography is concerned with constructing algorithms that withstand abuse. -Goldreich Complexity is a powerful tool to “lock out” adversaries. Basic Idea: Require hard problem to be solved, give hint as key.

3 Lecture 25: Complex --> Secure? NP can be useful So far, you learnt how to detect “unsolvable” problems (in NP) and solve them anyway by approximation (in P) For cryptography we want the opposite: problems that are almost always hard, i.e., cannot be approximated in P

4 Lecture 25: Complex --> Secure? [Breaking a strong cipher should require] “as much work as solving a system of simultaneous equations in a large number of unknowns of a complex type” - Shannon, ‘49 Sounds NP-Complete, doesn’t it?

5 Lecture 25: Complex --> Secure? Goal: Encryption For almost all security schemes we need: –Encryption / one-way function easy to compute: hard to find any part of: Often also required: –Decryption secret key Make this an NP problem

6 Lecture 25: Complex --> Secure? Encryption build on Hardness Knapsack problem is NP-Complete –Problem of filing bag with best selection of items –Recall: Reducible from Subset-Sum Enable Encryption: Keep message secret by hiding it in a Knapsack instance bits of encryption key = knapsack instance message bits Decryption possible by knowing easy knapsack instance (secret key) that provides shortcut.

7 Lecture 25: Complex --> Secure? Flawed Security Argument Subset Sum is NP-Complete Breaking knapsack cipher involves solving a subset sum problem Therefore, knapsack cipher is secure Flaw: NP-Complete means there is no fast general solution. Some instances may be solved quickly. (Note: Adi Shamir broke knapsack cipher [1982])

8 Lecture 25: Complex --> Secure? Cipher Design NP-Completeness is not sufficient for cryptographic hardness Worst-case complexity Need solution to usually be hard Average complexity Captured in new complexity class: All tractable problems are in BPP (which only makes sense if P≠NP) probabilistic: can flip coins

9 Lecture 25: Complex --> Secure? Cipher Design (cont.) A “strong” cipher cannot be broken faster than exhaustive key search (brute force) Only possible shortcut: Trade space for time; e.g.: Θ(2 n ) time Θ(2 n  ⅔ ) time + space

10 Lecture 25: Complex --> Secure? Results of Insufficient Hardness All broken cipher have a gap between worst- case and average hardness Estimating average hardness is often impossible (= finding best algorithm for instances of NP-complete problem) Next: Analyze cipher, identify complexity, and break it by finding tractable average solution.

11 Lecture 25: Complex --> Secure? Proprietary Cryptography (or: why “security-by-obscurity” never works)

12 Lecture 25: Complex --> Secure? First: Disclosure Secret algorithm can often be found: –Disassembling software –Hardware reverse-engineering IDA Pro This talk: Breaking a cipher once we found it.

13 Lecture 25: Complex --> Secure? Then: Exploitation Most secret ciphers are broken after disclosure Flaws are very similar in all DIY ciphers (and cryptanalyst spot them in a glimpse) “No more weak ciphers. No more paranoia.” Sean O’Neil

14 Lecture 25: Complex --> Secure? The crux of most flaws Most weaknesses caused by insufficient non-linearity. At the heart of the problem: LFSRs (linear feedback shift register) tmp = x[12]^x[15]^x[16]^x[17]; for i=17:-1:1 x[i]=x[i-1]; x[0] = tmp; tmp = x[12]^x[15]^x[16]^x[17]; for i=17:-1:1 x[i]=x[i-1]; x[0] = tmp;

15 Lecture 25: Complex --> Secure? Non-Linearity System of equations that desribes n-bit cipher can have up to O(2 n ) terms. Only O(n) of these terms are linear. Linear≈ P Non-linear ≈ NP

16 Lecture 25: Complex --> Secure? Mifare Crypto-1 High degree (20) generator, very non-linear! ✔ Many taps in LFSR ✔ Still linear ✗ Many taps in LFSR ✔ Still linear ✗ Cascaded structure allows for low degree description after all! :P Work with Nicolas Courtois, Sean O’Neil

17 Lecture 25: Complex --> Secure? a[0]a[1]a[2]a[3]a[4] tmp = x[0]^...^x[43]; for i=1:47 x[i]=x[i+1]; x[48] = tmp; tmp = x[0]^...^x[43]; for i=1:47 x[i]=x[i+1]; x[48] = tmp; a[0] = fa(x[7],x[9],x[11],x[13]); a[1] = y = fc(a[0],a[1],a[2],a[3],a[4]) a[0] = fa(x[7],x[9],x[11],x[13]); a[1] = y = fc(a[0],a[1],a[2],a[3],a[4]) Compute equations for first output bit: Before computing next bit, shift LFSR: y Describes cipher as system of equations with 48+r  5 unknowns, terms with degree ≤ 4!

18 Lecture 25: Complex --> Secure? Almost there … 1.Describe weak parts of cipher as system of equations 2.Brute-Force through complex parts: Guess-and-Determine attack. 3.Solve system of equations: MiniSAT is our friend Solving for 48-bit Crypto-1 key takes 12 seconds; compared to month for brute-force.

19 Lecture 25: Complex --> Secure? Lessons Learned (Crypto) Obscurity and proprietary crypto add security only in the short-run –(but lack of peer-review hurts later) Constraints of small devices make good crypto extremely hard –Where are the best trade-offs? –How much security is needed? –How can we best introduce non-linearity?

20 Lecture 25: Complex --> Secure? Lessons Learned (Complexity) Cannot rely on hardness of problems; gap between average and worst-case instances often significant This is good news unless you are building cryptography: –Can solve many instances of NP-complete problems in limited time Mathematicians have done most of the work already: start using MiniSAT

21 Lecture 25: Complex --> Secure? Don’t forget to hand in PS6.