














Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!















Need for random bits in cryptography (2)
What is a Random Number
Generator?
Working definition (from Bruce Schneier):
The Output:
i=
Underlying Physical Phenomena
Block diagram of the Intel RNG
Dual-Oscillator: Principle of Operation
Software-Based Random Bit Generators
Slow
Subject to observation e.g., using trojan horses
Require multiple sources and a complex mixing function
Subject to manipulation e.g., restart of the system
Inexpensive
Easy to integrate with software
Poor statistical properties
Software-Based Random Bit Generators
State
One-way function
Output
One-way function
Random Bit Generator
Seed
Pseudorandom Bit Generator
Next state
Strong Random Bit Generator
State Update
Output generation
State
Hash function
Output
Hash function
Random Bit Generator
Seed
Pseudorandom Bit Generator
Next state
BSAFE 3.x Random Bit Generator
Yji
Sji
Xj
Yji = H(Sji)
Output function:
State update function:
Sj0 = H(S(j-1)i || Xj)
Next state function:
Initialization:
S 00 = 0
Output generation
Sji = (Sj(i-1)+(C⋅i)) mod 2L
State Update
C=H(“”) | 1 (^) L bits
Resistance to Attacks (1)
128 bit state = 3⋅ 1038 different states =
1 bilion computers x 1 bilion states/second x 3⋅ 107 seconds/year x 1013 years
e.g., reading internal state by a virus
Possible until next re-seeding
Resistance to Attacks (2)
Possible back to last re-seeding
State
Output
Random Bit Generator
Seed
Pseudorandom Bit Generator
ANSI X9.17 Random Bit Generator
xi
xi = EK(Si ⊕ I)
Output function:
Next state function:
Initialization: S 1 = seed I = EK(D)
64 bits
Date/time D I
xi = EK(xi ⊕ I)
For DES keys and IVs
State
Output
Random Bit Generator
Seed
Pseudorandom Bit Generator
FIPS 186 Random Bit Generator
ki
s
ki = G(t, s)
Output function:
Next state function:
Initialization: s 1 = seed t = efcdab89 98badcfe 10325476 c3d2e1f 67452301
160 bits
t
si+1 = 1+si+ki mod 2b
For message private keys k
1+s+ki mod 2b
Choosing the acceptable boundries (2)
FIPS 140-1 statistical tests (2)
A. Divide the 20,000 bit streams into 5,000 contiguous 4-bit segments. Count the number of occurences of each of the 16 possible 4-bit values. Denote the number of occurances of particular value i by ni 0 ≤ i ≤ 15. B. Evaluate
X =
∑ i=
15 ni^2 - 5000
C. The test is passed if 1.03 < X < 57.
FIPS 140-1 statistical tests (3)
A. Run - maximal sequence of consecutive 1’s or 0’s which is a part of a sample string
Example: 0110 1111 01 000 1
Block - run of 1’s Gap - run of 0’s
block of length 4
gap of length 3 B. The test is passed if the number of occurances of blocks and gaps of respective lengths are each within the following interval 1 2,315-2, 2 1,114-1, 3 527- 723 4 240- 384 5 103- 6+ 103-
Length of run
Required interval
FIPS 140-1 statistical tests (4)
A. A long run is defined to be a run of length 34 or more (of either zeros or ones)
B. The test is passed if there are NO long runs
Maurer’s Universal Statistical Test
Q initial L-bit blocks Q ≥ 10 ⋅ 2 L
K remaining L-bit blocks (^) K ≥ 1000 ⋅ 2 L
T[j] last occurance of the block corresponding to integer j initialized using first Q blocks of the sample sequence
Ai number of positions since the last occurance of block bi Ai = i - T[bi] defined for Q+1 ≤ i ≤ Q+K, e.g., AQ+5 = (Q+5)-(Q-1)=
Maurer’s Universal Statistical Test
Xu = ∑ i=Q+
Q+K lg 2 Ai
A. Evaluate
B. Accept if
μ = μ(L) given in tables σ = σ(L, K, Q) given in tables γ - number of standard deviations Xu is allowed to deviate from the mean, e.g., for a rejection rate 0.001 γ = 3.
Maurer’s Universal Statistical Test Tables of means and variances
NIST RNG Test Suite
**1. The Frequency (Monobit) Test,
NIST Special Publication (SP) 800- http://csrc.nist.gov/rng/
TRNG Market Survey
TRNGs
Available TRNG Implementations
by Mike Dugan, ECE 746, Spring 2005
Evaluation Criteria
Evaluation Criteria (cont)
Market Survey
Embedded Stand alone SafeNet's SafeXcel IP TRNG EIP-75a Protego R200 (USB) SafeNet's SafeXcel IP TRNG EIP-75b Protego R210 (USB) Protegeo R300 SMT Protego R230 (USB) Infineon TPM - Used on Intel P4 MB ComScire J1000KU (USB) IQ Quantique Quantis OEM Zrandom (USB) ID Quantique - Quantis (PCI) 1 or 4 chip ID Quantique - Quantis (USB) Orion Products (RS-232) HG324 made by "random.com" (RS-232) Araneus Alea I (USB)