Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Random Numbers and Pseudorandom Numbers: Generation, Properties, and Uses, Slides of Network security

An overview of random numbers and pseudorandom numbers, their generation methods, properties, and applications in cryptography, key generation, and authentication schemes. It covers topics such as entropy, uniform distribution, independence, linear congruence, and popular prngs like yarrow, fortuna, ansi x9.17, and blum-blum-shub.

Typology: Slides

2012/2013

Uploaded on 04/22/2013

sathiamoorthy
sathiamoorthy 🇮🇳

4.4

(24)

106 documents

1 / 17

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
Random Numbers
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download Random Numbers and Pseudorandom Numbers: Generation, Properties, and Uses and more Slides Network security in PDF only on Docsity!

1

Random Numbers

2

Random Numbers

  • Random number
  • Pseudo random number
  • Uses for random number in cryptography

4

Random Numbers

  • Many programming languages support random number generators. User provides the seed value
  • Random numbers are in the range 0 to 1. To get a random number between 1 and 100 the user multiplies the random value by 100, takes the integer value and then add the value 1.
  • Rule is to multiply the random value by the upper limit of the range, get the integer value of the product and then add the lower limit to the result

5

Random Numbers

  • E.g., Find a random number between 1

and 100. Your Java or C++ program

produces a random value using the

random number generator as 0.

  • INT(0.520647 * 100) = 52
  • Add 1
  • So the random number is 1 + 52 = 53

7

Pseudorandom Numbers

  • Pseudorandom numbers are predictable
  • Generated by deterministic methods
  • Common abbreviation for Pseudorandom

Number Generator is PRNG

  • John Kelsey developed a PRNG called

Yarrow in 1999

  • Yarrow has an internal state that can be

updated using a block cipher

8

Pseudorandom Numbers

  • Ferguson and Schneier have developed

another PRNG method called Fortuna

  • Fortuna has three parts:
    • Fixed size seed
    • An accumulator collects and pools the entropy
    • Seed file control ensures randomness
  • Fortuna’s generator is a block cipher in

CTR mode. Recall that CTR generates a

stream of data.

10

Pseudorandom Numbers

  • s (^) i+1 = (ns (^) i + c) mod m
  • 0 ≤ s (^) i < m
  • Choice of n, c and m are critical
  • n = c = s 0 = 1 and m = 8 produces random numbers {2, 3, 4, 5, 6, 7, 0, 1}. This set is not random at all.
  • n = 7, c = 0, m = 32 and s 0 = 1 produces the set {7, 17, 23, 1, 7, 17, 23, 1, …}. This set has a period 4, meaning that after the 4th^ number there is repetition in the sequence

11

Pseudorandom Numbers

  • Suggested rules to follow for a PRNG:
    • The function should generate all numbers between 0 and m-1 (both inclusive) before repeating
    • The sequence generated must be random
    • The function should be efficient when implemented with 32-bit arithmetic (Recall that CTR method was more efficient than CBC method)

13

Pseudorandom Numbers

  • Keys are generated using three 3DES

modules. Each of the three modules use

the same pair of 56-bit keys. Recall that in

3DES (all three keys could be distinct or

two of the keys could be the same):

  • first key encrypts plaintext producing cipher
  • second key decrypts cipher1 producing cipher
  • first key encrypts cipher2 producing the ciphertext

14

Pseudorandom Numbers

  • Output of X9.17 is a 64-bit pseudorandom

number and a 64-bit seed value

  • Another popular PRNG is:
    • Blum-Blum-Shub (BBS) method, named after the authors who developed this in 1986
    • BBS is a secure PRNG method
  • BBS involves choosing two primes p and q that

both have a reminder of 3 when divided by 4

  • E.g., 7 and 11 have this property

16

BBS method

  • B (^) i denotes the least significant bit in each

iteration

  • The algorithm generates the bits

continuously

  • User decides how many of the bits to

choose to form the number, e.g., 64-bits

chosen to form a key

17

Uses for Random Numbers

  • Where is a random number used?
    • Key generation in RSA
    • Key generation by a CA
    • Authentication schemes (use of nonce is common with the random numbers)