David Evans Lecture 13: Astrophysics and Cryptology CS200: Computer Science University of Virginia Computer Science.

Slides:



Advertisements
Similar presentations
Cryptography in World War II Jefferson Institute for Lifelong Learning at UVa Spring 2006 David Evans Class 2: The Lorenz Cipher and the Postman’s Computer.
Advertisements

Class 21: Imperative Programming University of Virginia cs1120 David Evans.
David Evans CS200: Computer Science University of Virginia Computer Science Lecture 13: Of On and Off Grounds Sorting.
Cryptology Making & Breaking Codes & Ciphers. AJ 1152 Cryptology Cryptography –Science of creating codes or ciphers Cryptanalysis –Science of breaking.
CS 6262 Spring 02 - Lecture #7 (Tuesday, 1/29/2002) Introduction to Cryptography.
Team Name: team13 Programmer: 陳則凱 b Tester: 劉典恆 b

David Evans CS150: Computer Science University of Virginia Computer Science Lecture 18: The Story So Far.
David Evans CS200: Computer Science University of Virginia Computer Science Lecture 16: Quicker Sorting.
David Evans CS150: Computer Science University of Virginia Computer Science Lecture 20: Sex, Religion, and Politics.
Modern Cryptography.
Cryptography in World War II Jefferson Institute for Lifelong Learning at UVa Spring 2006 David Evans Class 4: Modern Cryptography
CS 555Topic 11 Cryptography CS 555 Topic 1: Overview of the Course & Introduction to Encryption.
CSE331: Introduction to Networks and Security Lecture 17 Fall 2002.
Overview of Cryptography and Its Applications Dr. Monther Aldwairi New York Institute of Technology- Amman Campus INCS741: Cryptography.
What is Cryptography? Definition: The science or study of the techniques of secret writing, esp. code and cipher systems, methods, and the like Google.
CS526Topic 2: Classical Cryptography1 Information Security CS 526 Topic 2 Cryptography: Terminology & Classic Ciphers.
Computer Security CS 426 Lecture 3
Chapter 2 – Classical Encryption Techniques
EE5552 Network Security and Encryption block 4 Dr. T.J. Owens CEng MIET Dr T. Itagaki MIET, MIEEE, MAES.
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 9: Cryptography.
Chapter 2 Basic Encryption and Decryption. csci5233 computer security & integrity 2 Encryption / Decryption encrypted transmission AB plaintext ciphertext.
Lecture 2 Overview.
David Evans Class 15: Golden Ages and Astrophysics CS200: Computer Science University of Virginia Computer Science.
David Evans CS551: Security and Privacy University of Virginia Computer Science Lecture 2: Breaking Unbreakable Ciphers.
David Evans Class 13: Quicksort, Problems and Procedures CS150: Computer Science University of Virginia Computer Science.
13-1 Last time Security in Networks Network Security Controls Firewalls Honeypots Intrusion Detection Systems.
David Evans CS200: Computer Science University of Virginia Computer Science Lecture 12: Decrypting Work Circle Fractal.
Cryptology By Greg Buss Pat Shields Barry Burke. What is Cryptology? Cryptology is the study of “secret writing.” Modern cryptology combines the studies.
Team Name: team13 Programmer: 陳則凱 b Tester: 劉典恆 b
Lec. 5 : History of Cryptologic Research II
Encryption: A Brief History Author: Margery Waldron.
David Evans CS200: Computer Science University of Virginia Computer Science Class 36: Public-Key Cryptography If you want.
Based on Applied Cryptography by Schneier Chapter 1: Foundations Dulal C. Kar.
1 Chapter 2-1 Conventional Encryption Message Confidentiality.
National Institute of Science & Technology Cryptology and Its Applications Akshat Mathur [1] Cryptology and Its Applications Presented By AKSHAT MATHUR.
Network Security Lecture 10 Presented by: Dr. Munam Ali Shah.
CSCI 5857: Encoding and Encryption
15 October 2003Computer Science1 David Evans ComputerScience.
Classical Crypto By: Luong-Sorin VA, IMIT Dith Nimol, IMIT.
Giuseppe Bianchi Warm-up example 1 found on a real paper! Warm-up example 1 found on a real paper!
Computer Security Cryptography. Cryptography Now and Before  In the past – mainly used for confidentiality  Today –Still used for confidentiality –Data.
Data Security and Encryption (CSE348) 1. Lecture # 3 2.
David Evans Class 19: Golden Ages and Astrophysics CS200: Computer Science University of Virginia Computer Science.
Lecture 2: Introduction to Cryptography
David Evans Class 21: The Story So Far (Quicksort, Continuing Golden Ages) CS200: Computer Science University of Virginia.
David Evans CS200: Computer Science University of Virginia Computer Science Lecture 12: QuickSorting Queen’s University,
David Evans CS150: Computer Science University of Virginia Computer Science Lecture 9: Of On and Off Grounds Sorting Coffee.
Cs1120 Fall 2009 David Evans Lecture 18: Changing State Sounds of Colossus:
David Evans CS200: Computer Science University of Virginia Computer Science Lecture 15: Intractable Problems (Smiley.
CS 150 – Computing: From Ada to the Web Cryptography.
The Enigma Machine Eric Roberts CS 106A February 3, 2016.
Lecture 3 Page 1 CS 236 Online Introduction to Cryptography CS 236 On-Line MS Program Networks and Systems Security Peter Reiher.
David Evans CS200: Computer Science University of Virginia Computer Science Lecture 14: P = NP?
CS526Topic 2: Classical Cryptography1 Information Security CS 526 Topic 2 Cryptography: Terminology & Classic Ciphers.
Department of Computer Science Chapter 5 Introduction to Cryptography Semester 1.
David Evans CS200: Computer Science University of Virginia Computer Science Class 26: Halting Problem It is plain at any.
Lecture 13: Quicksorting CS200: Computer Science
Introduction Of System Security
Lecture 20: Sex, Religion, and Politics CS150: Computer Science
Lecture 11: All Sorts CS200: Computer Science University of Virginia
Lecture 13: Cost of Sorts CS150: Computer Science
Lecture 22: P = NP? CS200: Computer Science University of Virginia
Lecture 10: Quicker Sorting CS150: Computer Science
An electro-mechanical rotor cipher machine created by the German engineer Arthur Scherbius.
Lecture 11: Sorting Grounds and Bubbles
Modern Cryptography.
Lecture 23: Computability CS200: Computer Science
Presentation transcript:

David Evans Lecture 13: Astrophysics and Cryptology CS200: Computer Science University of Virginia Computer Science

13 February 2002CS 200 Spring Menu Quicksort Recap DeGrasse Tyson’s Essay Cryptography (CS588 condensed)

13 February 2002CS 200 Spring Quicksort C. A. R. Hoare, 1961

13 February 2002CS 200 Spring Quicksort (define (quicksort cf lst) (if (null? lst) lst (append (quicksort cf (filter (lambda (el) (cf el (car lst))) (cdr lst))) (list (car lst)) (quicksort cf (filter (lambda (el) (not (cf el (car lst)))) (cdr lst))))))

13 February 2002CS 200 Spring filter (define (filter f lst) (insertlg (lambda (el rest) (if (f el) (cons el rest) rest)) lst null)) How much work is filter? (n)(n)

13 February 2002CS 200 Spring Quicksort filter is  ( n ) How much work is Quicksort if the input list is sorted? Worst Case:  ( n 2 ) we filter n times, each is  ( n ) (define (quicksort cf lst) (if (null? lst) lst (append (quicksort cf (filter (lambda (el) (cf el (car lst))) (cdr lst))) (list (car lst)) (quicksort cf (filter (lambda (el) (not (cf el (car lst)))) (cdr lst))))))

13 February 2002CS 200 Spring Quicksort filter is  ( n ) How much work is Quicksort if the input list is random? Each time we split the list, each piece is approximately ½ the length of the original list We need log 2 n splits to get down to empty list Best (Average) Case:  ( n log 2 n ) we filter log 2 n times, each is  ( n ) (define (quicksort cf lst) (if (null? lst) lst (append (quicksort cf (filter (lambda (el) (cf el (car lst))) (cdr lst))) (list (car lst)) (quicksort cf (filter (lambda (el) (not (cf el (car lst)))) (cdr lst))))))

13 February 2002CS 200 Spring > (define r1000 (rand-int-list 1000)) > (time (sort < r1000)) cpu time: 1372 real time: 1372 gc time: 0 > (time (quicksort < r1000)) cpu time: 71 real time: 70 gc time: 0 > (define r2000 (rand-int-list 2000)) > (time (sort < r2000)) cpu time: 5909 real time: 5909 gc time: 0 > (time (quicksort < r2000)) cpu time: 180 real time: 180 gc time: 0 > (time (quicksort < (revintsto 1000))) cpu time: 2684 real time: 2684 gc time: 0

13 February 2002CS 200 Spring n log 2 n (quicksort) n 2 (bubblesort) Growth of time to sort random list

13 February 2002CS 200 Spring Science’s Endless Golden Age

13 February 2002CS 200 Spring Astrophysics “If you’re going to use your computer to simulate some phenomenon in the universe, then it only becomes interesting if you change the scale of that phenomenon by at least a factor of 10. … For a 3D simulation, an increase by a factor of 10 in each of the three dimensions increases your volume by a factor of 1000.” How much work is astrophysics simulation (in  notation)? (n3)(n3) When we double the size of the simulation, the work octuples! (Just like oceanography octopi simulations)

13 February 2002CS 200 Spring Astrophysics and Moore’s Law Simulating universe is  ( n 3 ) Moore’s law: computing power doubles every 18 months Tyson: to understand something new about the universe, need to scale by 10x How long does it take to know twice as much about the universe?

13 February 2002CS 200 Spring (define (computing-power nyears) (if (= nyears 0) 1 (* (computing-power (- nyears 1))))) ;;; doubling every 18 months = ~1.587 * every 12 months (define (simulation-work scale) (* scale scale scale)) ;;; Simulation is O(n^3) work (define (log10 x) (/ (log x) (log 10))) ;;; primitive log is natural (base e) (define (knowledge-of-universe scale) (log10 scale)) ;;; knowledge of the universe is log 10 the scale of universe we can simulate (define (find-knowledge-of-universe nyears) (define (find-biggest-scale scale) ; today, can simulate size 10 universe (if (> (/ (simulation-work scale) 1000) (computing-power nyears)) (- scale 1) (find-biggest-scale (+ scale 1)))) (knowledge-of-universe (find-biggest-scale 1)))

13 February 2002CS 200 Spring > (find-knowledge-of-universe 0) 1.0 > (find-knowledge-of-universe 1) > (find-knowledge-of-universe 2) > (find-knowledge-of-universe 5) > (find-knowledge-of-universe 10) > (find-knowledge-of-universe 15) 2.0 > (find-knowledge-of-universe 30) > (find-knowledge-of-universe 60) > (find-knowledge-of-universe 80) Will there be any mystery left in the Universe when you die?

13 February 2002CS 200 Spring Liberal Arts Grammar: study of meaning in written expression Rhetoric: comprehension of verbal and written discourse Logic: argumentative discourse for discovering truth Arithmetic: understanding numbers Geometry: quantification of space Music: number in time Astronomy: laws of the planets and stars Yes, we need to understand meaning to describe computations Interfaces between components, discourse between programs and users Logic for controlling and reasoning about computations Yes (last few lectures) Yes (PS 1, 2, 3) Yes, its called GEB for a reason! No, but astronomy uses CS a lot. Trivium Quadrivium Correction from Lecture 1: Yes (Neil DeGrasses Tyson says so!)

13 February 2002CS 200 Spring Bold (Possibly Untrue) Claim This course is the most consistent with the original intent of a Liberal Arts education of any course offered at UVA this semester! Correction from Lecture 1: since Mr. Jefferson founded it!

13 February 2002CS 200 Spring The Endless Golden Age Golden Age – period in which knowledge/quality of something doubles quickly At any point in history, half of what is known about astrophysics was discovered in the previous 15 years! Moore’s law today, but other advances previously: telescopes, photocopiers, clocks, etc.

13 February 2002CS 200 Spring The Real Golden Rule? Why do fields like astrophysics, medicine, biology and computer science (?) have “endless golden ages”, but fields like –music ( ) –rock n’ roll ( , or whatever was popular when you were 16) –philosophy (400BC-350BC?) –art ( ?) –soccer ( ) –baseball ( ) –movies ( ) have short golden ages? What about mathematics?

13 February 2002CS 200 Spring Cryptology ( CS588 Condensed)

13 February 2002CS 200 Spring Terminology Encrypt Decrypt Plaintext Ciphertext Plaintext Alice Bob Eve Insecure Channel C = E(P) P = D(C) E must be invertible: P = D (E (P))

13 February 2002CS 200 Spring Encrypt Decrypt Plaintext Ciphertext Plaintext Alice Bob Insecure Channel C = E(P, K) P = D(C, K) KK “The enemy knows the system being used.” Claude Shannon Eve

13 February 2002CS 200 Spring Jefferson Wheel Cipher

13 February 2002CS 200 Spring Enigma About 50,000 used by Nazi’s in WWII Modified throughout WWII, believed to be perfectly secure Broken by Bletchley Park led by Alan Turing (and 30,000 others) First computer (Collossus) developed to break Nazi codes (but kept secret through 1970s) Allies used decrypted Enigma messages to plan D-Day

13 February 2002CS 200 Spring Enigma Coming to US in April!

13 February 2002CS 200 Spring Bletchley Park

13 February 2002CS 200 Spring Lorenz Cipher Machine

13 February 2002CS 200 Spring Perfectly Secure Cipher: One-Time Pad Mauborgne/Vernam [1917] xor (  ): 0  0 = 0 1  0 = 1 0  1 = 1 1  1 = 0 a  a = 0 a  0 = a a  b  b = a E(P, K) = P  K D(C, K) = C  K = (P  K)  K = P

13 February 2002CS 200 Spring For any given ciphertext, all plaintexts are equally possible. Ciphertext: Key: Plaintext: = “CS” Why perfectly secure? 1 0 B

13 February 2002CS 200 Spring If its “perfect” why is it broken? Cannot reuse K Need to generate truly random bit sequence as long as all messages Need to securely distribute key

13 February 2002CS 200 Spring “One-Time” Pad’s in Practice Lorenz Machine – Nazi high command in WWII –Pad generated by 12 rotors –Receiver and sender set up rotors in same positions –One operator retransmitted a message (but abbreviated message header the second time!) –Enough for Bletchley Park to figure out key – and structure of machine that generated it! –But still had to try all configurations

13 February 2002CS 200 Spring Colossus – First Programmable Computer Bletchley Park, 1944 Read ciphertext and Lorenz wheel patterns from tapes Tried each alignment, calculated correlation with German Decoded messages (63M letters by 10 Colossus machines) that enabled Allies to know German troop locations to plan D-Day Destroyed in 1960, kept secret until 1970s

13 February 2002CS 200 Spring From

13 February 2002CS 200 Spring Problem Set 4 Break a simplified Lorenz Cipher Removed one wheel, made initial positions of all groups of wheels have to match Small rotors Its REALLY AMAZING that the British were able to break the real Lorenz in 1943 and it is still hard for us today!

13 February 2002CS 200 Spring Motivation Helps… Confronted with the prospect of defeat, the Allied cryptanalysts had worked night and day to penetrate German ciphers. It would appear that fear was the main driving force, and that adversity is one of the foundations of successful codebreaking. Simon Singh, The Code Book

13 February 2002CS 200 Spring Modern Ciphers 128-bit keys, encrypt 128-bit blocks Brute force attack –Try 1 Trillion keys per second –Would take years to try all keys! –If that’s not enough, can use 256-bit key No known techniques that do better than brute force search

13 February 2002CS 200 Spring Charge PS4 –No new Computer Science concepts –You should be able to do it now –Lots of practice with lists and recursion –No bombs dropping, but a little bit of motivation (prize for first person/group to decipher secret message)