12.0 Statistical Graphics and RNG



Similar documents
Network Security. Chapter 6 Random Number Generation

Network Security. Chapter 6 Random Number Generation. Prof. Dr.-Ing. Georg Carle

Random-Number Generation

Advanced Cryptography

The Mathematics of the RSA Public-Key Cryptosystem

Chapter Objectives. Chapter 9. Sequential Search. Search Algorithms. Search Algorithms. Binary Search

1 Signatures vs. MACs

FACTORING LARGE NUMBERS, A GREAT WAY TO SPEND A BIRTHDAY

CPE 462 VHDL: Simulation and Synthesis

SECURITY EVALUATION OF ENCRYPTION USING RANDOM NOISE GENERATED BY LCG

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

Cryptography: Authentication, Blind Signatures, and Digital Cash

An Overview of Integer Factoring Algorithms. The Problem

Notes from Week 1: Algorithms for sequential prediction

Breaking The Code. Ryan Lowe. Ryan Lowe is currently a Ball State senior with a double major in Computer Science and Mathematics and

Lecture 13: Factoring Integers

QUANTUM COMPUTERS AND CRYPTOGRAPHY. Mark Zhandry Stanford University

Factoring Algorithms

The science of encryption: prime numbers and mod n arithmetic

CHAPTER 5. Number Theory. 1. Integers and Division. Discussion

RSA Attacks. By Abdulaziz Alrasheed and Fatima

Factoring Algorithms

Elementary factoring algorithms

Predictive Models for Min-Entropy Estimation

One Time Pad Encryption The unbreakable encryption method

Cryptography and Network Security Chapter 9

2 Primality and Compositeness Tests

WORKED EXAMPLES 1 TOTAL PROBABILITY AND BAYES THEOREM

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

Software Tool for Implementing RSA Algorithm

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

Integer Factorization using the Quadratic Sieve

Shor s algorithm and secret sharing

Factoring pq 2 with Quadratic Forms: Nice Cryptanalyses

Applied Cryptography Public Key Algorithms

Authentication, digital signatures, PRNG

CUNSHENG DING HKUST, Hong Kong. Computer Security. Computer Security. Cunsheng DING, HKUST COMP4631

Post-Quantum Cryptography #4

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

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

Quantum Computing Lecture 7. Quantum Factoring. Anuj Dawar

1 Message Authentication

SEC 2: Recommended Elliptic Curve Domain Parameters

Factoring & Primality

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

Improved Online/Offline Signature Schemes

Analysis of Compression Algorithms for Program Data

Introduction. Digital Signature

Mathematical Model Based Total Security System with Qualitative and Quantitative Data of Human

Princeton University Computer Science COS 432: Information Security (Fall 2013)

Lukasz Pater CMMS Administrator and Developer

COMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012

MTAT Cryptology II. Digital Signatures. Sven Laur University of Tartu

Primality Testing and Factorization Methods

Guaranteed Slowdown, Generalized Encryption Scheme, and Function Sharing

The application of prime numbers to RSA encryption

Determining the Optimal Combination of Trial Division and Fermat s Factorization Method

Mathematics of Internet Security. Keeping Eve The Eavesdropper Away From Your Credit Card Information

Primes in Sequences. Lee 1. By: Jae Young Lee. Project for MA 341 (Number Theory) Boston University Summer Term I 2009 Instructor: Kalin Kostadinov

Ch.9 Cryptography. The Graduate Center, CUNY.! CSc Theoretical Computer Science Konstantinos Vamvourellis

Information Visualization and Visual Analytics 可 视 化 与 可 视 分 析 简 介. Xiaoru Yuan School of EECS, Peking University Aug 14th, 2010

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

1 Domain Extension for MACs

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

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

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

Solutions to Problem Set 1

Effective Secure Encryption Scheme [One Time Pad] Using Complement Approach Sharad Patil 1 Ajay Kumar 2

Concrete Security of the Blum-Blum-Shub Pseudorandom Generator

Cryptography and Network Security Prof. D. Mukhopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Application of Neural Network in User Authentication for Smart Home System

RSA Encryption. Tom Davis October 10, 2003

Cryptography and Network Security

THE LAW OF THE THIRD

Lecture 13 - Basic Number Theory.

Information Theory and Coding Prof. S. N. Merchant Department of Electrical Engineering Indian Institute of Technology, Bombay

Introduction to Cryptography CS 355

Computer Networks and Internets, 5e Chapter 6 Information Sources and Signals. Introduction

Curriculum Map Statistics and Probability Honors (348) Saugus High School Saugus Public Schools

Chapter 3. if 2 a i then location: = i. Page 40

Side Channel Analysis and Embedded Systems Impact and Countermeasures

Cyber Security Workshop Encryption Reference Manual

Chicago Booth BUSINESS STATISTICS Final Exam Fall 2011

Aachen Summer Simulation Seminar 2014

Lecture 3: One-Way Encryption, RSA Example

Introduction to Algorithms. Part 3: P, NP Hard Problems

Runtime and Implementation of Factoring Algorithms: A Comparison

A Simple Pseudo Random Number algorithm

Universal Hash Proofs and a Paradigm for Adaptive Chosen Ciphertext Secure Public-Key Encryption

An Introduction to the RSA Encryption Method

The 5 Most Influential Data Visualizations of All Time

Cryptography and Network Security, PART IV: Reviews, Patches, and Theory 1 / 53

Find-The-Number. 1 Find-The-Number With Comps

Cloud and Mobile Computing

Lecture 6 - Cryptography

Quantum Computing. Robert Sizemore

Math Workshop October 2010 Fractions and Repeating Decimals

1 Digital Signatures. 1.1 The RSA Function: The eth Power Map on Z n. Crypto: Primitives and Protocols Lecture 6.

How To Check For Differences In The One Way Anova

Transcription:

12.0 Statistical Graphics and RNG 1 Answer Questions Statistical Graphics Random Number Generators

12.1 Statistical Graphics 2 John Snow helped to end the 1854 cholera outbreak through use of a statistical graphic based on a city map of London. The map shows the pattern of the disease outbreak, and illustrates the importance of exception analysis. Snow was Queen Victoria s physician and a protege of Florence Nightingale. He also found a smart way to estimate the literacy rate. Guess how he did it?

3

The second graphic shows the age-adjusted incidence of stomach cancer for white males, for cases between 1970-1994. We can compare that with a similar map for 1950-1969. Is there a gender difference? What is going on in Nevada? 4 What is going on in New Mexico? What is going on in Wisconsin, Minnesota, and North Dakota? What about Pittsburgh? What about Maine? How do we interpret single-county hotspots?

5

The third graphic shows the pedestrian fatality rates by state. Florida is the worst, and has the top five cities in the country. What might explain this (consider also New Mexico and Arizona). 6 The fourth graphic is by Charles-Joseph Minard; Richard Tufte hails it as the best statistical graphic ever. It shows the size of Napoleon s army in 1812-1813, as he attacks Czar Alexander III in Moscow and then retreats. The graphic includes information on: location (two dimensions) time temperature size of the army

7

8

9

10

12.2 Random Numbers In order to generate random numbers, it is sufficient to generate random binary strings. 11 Toss a fair coin an infinite number of times, with heads being 0 and tails being 1, to get a sequence X 1, X 2,.... This can be converted into a random number U that is uniformly distributed on [0, 1] by U = i=1 X i 2 i. If you have a random number that is uniform on [0, 1], then the random number X = F 1 (U) is a random draw from the distribution F(x). So all you need for any kind of random number is a set of random coin tosses.

Real coins aren t random enough, or practical for the two main applications: computer simulations cryptosecurity. 12 Good Random Number Generators (RNGs) are fast, repeatable (i.e., have a seed), do not cycle, have sensitive dependence on the seed, and pass statistical tests for randomness. In practice, there are three strategies for building random number generators (RNGs): Amplify physical (quantum) noise. Use provably hard algorithms (trapdoor codes), such as fractoring large numbers that are products of two primes. Use linear congruential generators.

The first method has never been able to pass statistical tests for randomness. The sequences always show patterns introduced by the amplification mechanism. 13 The second method is widely used in cryptography, but there are issues. It is not repeatable, in the sense needed for replicating a computer experiment. It cannot produce an infinite string of binary digits: eventually, you factor the number. And the big fear is that some clever mathematician will discover a new way for factoring large numbers. Nonetheless, trapdoor codes are wildly popular in cryptography, and quite reliable. RSA encryption is one famous example it is the basis for most on-line credit card transactions.

For simulation, computer games, and other applications, linear congruential generators are used. X n+1 (ax n + c) (mod m) where v w (mod m) means that v is the remainder when w is divided by m, and 14 X n is current random integer, X n+1 is the next random integer in the sequence m is the modulus (a very large integer) a and c are carefully chosen constants. The initial value, X 0, is called the seed of the linear congruential generator. The X i are written in binary.

Linear congruential generators are not perfect. There is some correlation in the sequence: if one uses them to plot points in an k-dimensional space, the points will lie upon up to m 1/k hyperplanes. 15 On the other hand, these are fast, use little memory, can have cycle time m, and are replicable if one archives the seed.

When one has a long sequence of binary random digits, One can try to test whether the sequence is random. One strategy is to do a series of hypothesis tests: 1. The null is that the proportions of 1s is 1/2; the alternative is that it is not. 16 2. The null is that the proportion of sequential pairs (0, 0) [and (0, 1), (1, 0), (1, 1)] is 1/4; the alternative is that it is not. 5. The null is that the proportion of sequential pairs (0, 0, 0) is 1/8; the null is that it is not; etc. You know how to make all of these tests. You could even adjust for multiple testing. But letting X i be 0 or 1 according to the oddness or eveness of the ith digit of π would pass all these tests.

It is provable that one cannot design a test that will eventually detect all possible patterned sequences. But one can design a sequence of tests that will discover many different kinds of patterns. Information theory has shown that a truly random sequence cannot be compressed. A string is comressible if it can be encoded in such a way that the coded version requires fewer bits than the original string. 17 So one way to test a random number generator is to feed its output into gzip, JPEG2000, and the Lempel-Ziv compression algorithms, and see if the result is substantially shorter. Another theorem: If sequence X 1, X 2,... is added to sequence Y 1, Y 2,... to produce Z 1, Z 2,... where Z i = X i + Y i (mod 2), then the Z sequence is at least as random as the most random of the X and Y sequences.