20
Pseudo Randomness (in digital system) PRESENTED BY GROUP 8 SHU-YU HUANG, FONG-JHENG LIN 12.9.2015

Pseudo Randomness (in digital system) PRESENTED BY GROUP 8 SHU-YU HUANG, FONG-JHENG LIN 12.9.2015

Embed Size (px)

Citation preview

Page 1: Pseudo Randomness (in digital system) PRESENTED BY GROUP 8 SHU-YU HUANG, FONG-JHENG LIN 12.9.2015

Pseudo Randomness

(in digital system)

PRESENTED BY GROUP 8

SHU-YU HUANG, FONG-JHENG LIN

12.9.2015

Page 2: Pseudo Randomness (in digital system) PRESENTED BY GROUP 8 SHU-YU HUANG, FONG-JHENG LIN 12.9.2015

919 722 885 351 3 160 531 247 11 931

815 421 746 702 6 321 38 494 23 838

606 843 469 380 12 642 76 988 47 653

189 662 938 760 25 260 153 952 95 283

379 301 853 496 50 520 307 880 190 566

758 603 682 992 101 16 615 736 381 108

493 183 341 960 202 33 207 448 762 217

986 366 683 896 404 66 414 897 500 435

948 733 343 768 808 132 829 770 1000 870

873 442 687 513 592 265 635 517 977 717

Page 3: Pseudo Randomness (in digital system) PRESENTED BY GROUP 8 SHU-YU HUANG, FONG-JHENG LIN 12.9.2015

Outline

Pseudo randomness

Example: M-Sequence

Application

Summary

Page 4: Pseudo Randomness (in digital system) PRESENTED BY GROUP 8 SHU-YU HUANG, FONG-JHENG LIN 12.9.2015

Pseudo randomness

True RNG (Random Number Generator)

PhysicalSource

Sensor,Converter

Transformer Numbers

UnpredictableIrreproducible

coin, dice, human guess, your girlfriend/boyfriend/mom

* The Art of Computer Programming. Vol. 2: Seminumerical Algorithms, 3rd ed. by Donald E. Knuth. Reading, MA: Addison-Wesley, 1997

¿h𝑒𝑎𝑑¿𝑡𝑟𝑖𝑎𝑙𝑠

mV ∗200 176

Page 5: Pseudo Randomness (in digital system) PRESENTED BY GROUP 8 SHU-YU HUANG, FONG-JHENG LIN 12.9.2015

Pseudo randomness

True RNG (Random Number Generator)

PhysicalSource

Sensor,Converter

Transformer Numbers

UnpredictableIrreproducible

quantum phenomena, radioactive decay

* The Art of Computer Programming. Vol. 2: Seminumerical Algorithms, 3rd ed. by Donald E. Knuth. Reading, MA: Addison-Wesley, 1997

¿h𝑒𝑎𝑑¿𝑡𝑟𝑖𝑎𝑙𝑠

mV ∗200 176

Page 6: Pseudo Randomness (in digital system) PRESENTED BY GROUP 8 SHU-YU HUANG, FONG-JHENG LIN 12.9.2015

Pseudo randomness

Pros & Cons of True RNG

Pros Cons

No periodicities Slow

Unpredictable Irreproducible

no dependencies present Not portable

High level of security Costly

Need no algorithm Could be manipulated

* RANDOM.ORG https://www.random.org/

Page 7: Pseudo Randomness (in digital system) PRESENTED BY GROUP 8 SHU-YU HUANG, FONG-JHENG LIN 12.9.2015

Pseudo randomness

Story of Caesar

* http://www.mrdowling.com/702-augustus.html

X(n)=X(n)+3

A->DB->EC->F

ANDY->DQGB

Page 8: Pseudo Randomness (in digital system) PRESENTED BY GROUP 8 SHU-YU HUANG, FONG-JHENG LIN 12.9.2015

Pseudo randomness

Pseudo RNG

Seed Function,Algorithm

NumberSeries

* The Art of Computer Programming. Vol. 2: Seminumerical Algorithms, 3rd ed. by Donald E. Knuth. Reading, MA: Addison-Wesley, 1997

ANDY DQGBX(n)=X(n)+3

Page 9: Pseudo Randomness (in digital system) PRESENTED BY GROUP 8 SHU-YU HUANG, FONG-JHENG LIN 12.9.2015

Pseudo randomness

Pseudo RNG

Seed Function,Algorithm

NumberSeries

DeterministicPeriodicReproducible

testing set, simulation set, gaming parameters

* The Art of Computer Programming. Vol. 2: Seminumerical Algorithms, 3rd ed. by Donald E. Knuth. Reading, MA: Addison-Wesley, 1997

usuallytruly random 123 123123 123,312,231,123…

Page 10: Pseudo Randomness (in digital system) PRESENTED BY GROUP 8 SHU-YU HUANG, FONG-JHENG LIN 12.9.2015

Pseudo randomness

Pseudo RNG

True Random

Number

* The Art of Computer Programming. Vol. 2: Seminumerical Algorithms, 3rd ed. by Donald E. Knuth. Reading, MA: Addison-Wesley, 1997

Number

Number

Number

Number

PseudoRandomNumbers

Page 11: Pseudo Randomness (in digital system) PRESENTED BY GROUP 8 SHU-YU HUANG, FONG-JHENG LIN 12.9.2015

Pseudo randomness

True RNG vs Pseudo RNG (512*512 pixal)

* http://boallen.com/

True Pseudo

Page 12: Pseudo Randomness (in digital system) PRESENTED BY GROUP 8 SHU-YU HUANG, FONG-JHENG LIN 12.9.2015

Pseudo randomness

How to generate Random Pattern? Middle-square method

Linear congruential generator

Random number list

Maximum length sequence (M sequence) *

* RANDOM.ORG https://www.random.org/

Page 13: Pseudo Randomness (in digital system) PRESENTED BY GROUP 8 SHU-YU HUANG, FONG-JHENG LIN 12.9.2015

Pseudo randomness

Verification of the randomness Frequency test

Frequency test within a block

Serial Test

* NIST (National Institute of Standards and Technology), A Statistical Test Suite for Random and Pseudorandom Number Generators for Cryptographic Applications. 2001

Page 14: Pseudo Randomness (in digital system) PRESENTED BY GROUP 8 SHU-YU HUANG, FONG-JHENG LIN 12.9.2015

Pseudo randomness

Frequency test (for pseudorandom number with n bits)

* K. M. Ramachandran, C. P. Tsokos, Mathematical Statistics with Applications, 1st editionpublished by ELSEVIER , 2009

Page 15: Pseudo Randomness (in digital system) PRESENTED BY GROUP 8 SHU-YU HUANG, FONG-JHENG LIN 12.9.2015

Pseudo randomness

Frequency test (for pseudorandom number with n bits)

1 0 1 0 1 1 0 0 …

1 -1 1 -1 1 1 -1 -1 …

* NIST (National Institute of Standards and Technology), A Statistical Test Suite for Random and Pseudorandom Number Generators for Cryptographic Applications. 2001

Page 16: Pseudo Randomness (in digital system) PRESENTED BY GROUP 8 SHU-YU HUANG, FONG-JHENG LIN 12.9.2015

Pseudo randomness

Frequency test (for pseudorandom number with n bits)

𝑍=𝑆𝑛

√𝑛𝑁 (0,1)

𝑝−𝑣𝑎𝑙𝑢𝑒=𝑃 ¿

* NIST (National Institute of Standards and Technology), A Statistical Test Suite for Random and Pseudorandom Number Generators for Cryptographic Applications. 2001

For computer

If p-value < , H0 is rejected, the number is not random

Page 17: Pseudo Randomness (in digital system) PRESENTED BY GROUP 8 SHU-YU HUANG, FONG-JHENG LIN 12.9.2015

Example: M-Sequence Maximum length sequence

Page 18: Pseudo Randomness (in digital system) PRESENTED BY GROUP 8 SHU-YU HUANG, FONG-JHENG LIN 12.9.2015

Example: M-Sequence

Calculation of pi

Page 19: Pseudo Randomness (in digital system) PRESENTED BY GROUP 8 SHU-YU HUANG, FONG-JHENG LIN 12.9.2015

Summary of Pseudorandom Variables

Pros: Accelerates the generation of patterns

Generate the same results

Cons: Could be deciphered

Periodic

Page 20: Pseudo Randomness (in digital system) PRESENTED BY GROUP 8 SHU-YU HUANG, FONG-JHENG LIN 12.9.2015

Thanks for your attention!