Module 5��Pseudo-Random-Sequence Generators and Stream Ciphers: Linear Congruential Generators, Linear Feedback Shift Registers, Design and analysis of stream ciphers, Stream ciphers using LFSRs, A5, Hughes XPD/KPD, Nanoteq, Rambutan, Additive generators, Gifford, Algorithm M, PKZIP (Text 2: Chapter 16)��Text Books:�1. William Stallings , “Cryptography and Network Security Principles and Practice”, � Pearson Education Inc., 6th Edition, 2014, ISBN: 978-93-325-1877-3�2. Bruce Schneier, “Applied Cryptography Protocols, Algorithms, and Source code in � C”, Wiley Publications, 2nd Edition, ISBN: 9971-51-348-X.� � Reference Books: �1. Cryptography and Network Security, Behrouz A. Forouzan, TMH, 2007.�2. Cryptography and Network Security, Atul Kahate, TMH, 2003.
1
Random Number Generators
2
What is Random?
3
Pseudo RNGs
4
Pseudo RNGs
5
Pseudo RNGs
6
Bit Properties
7
Linear Congruential Generator
8
Linear Congruential Generator
Xn+1 = ( a Xn + c ) mod m
9
Linear Congruential Generator
10
m=10, a=2, c=1
1
3 (2*1 + 1 % 10)
7 (2*3 + 1 % 10)
5 (2*7 + 1 % 10)
1 (2*5 + 1 % 10)
3 (2*1 + 1 % 10)
7 (2*3 + 1 % 10)
5 (2*7 + 1 % 10)
…
m=10, a=1, c=7
1
8 (1*1 + 7 % 10)
5 (1*8 + 7 % 10)
2 (1*5 + 7 % 10)
9 (1*2 + 7 % 10)
6 (1*9 + 7 % 10)
3 (1*6 + 7 % 10)
0 (1*3 + 7 % 10)
…
Linear Congruential Generator
11
Stream Ciphers using LFSR
A5
Hughes XPD/KPD
Nanoteq
Rambutan
Additive Generators
Xi = (Xi-a + Xi-b + Xi-c +...+ Xi-m) mod 2n
Gifford
Algorithm M
#define ARR_SIZE (8192) /* for example — the larger the better */
static unsigned char delay[ ARR_SIZE ] ;
unsigned char prngA( void ) ;
long prngB( void ) ;
void init_algM( void )
{
long i ;
for ( i = 0 ; i < ARR_SIZE ; i++ )
delay = prngA() ;
} /* init_algM */
unsigned char algM( void )
{
long j,v ;
j = prngB() % ARR_SIZE ; /* get the delay[] index */
v = delay[j] ; /* get the value to return */
delay[j] = prngA() ; /* replace it */
return ( v ) ;
} /* algM */
PKZIP