SlideShare a Scribd company logo
1 of 30
pseudorandom number generation
Stream ciphers
RC4
True random numbers
 Random number is a number generated by a
process, whose outcome is unpredictable, and which
cannot be sub sequentially reliably reproduced
 Random numbers play an important role in the use of
encryption for various network security applications.
Two Types of Random Numbers
 Pseudorandom numbers are numbers that appear
random, but are obtained in a deterministic,
repeatable, and predictable manner.
 True random numbers are generated in non-
deterministic ways. They are not predictable. They
are not repeatable
1- Key distribution and reciprocal authentication
schemes
2- Session key generation.
 Session key is a secret key for symmetric encryption
generated for use for a short period of time.
3- Generation of keys for the RSA public- key encryption
algorithm
4- Generation of a bit stream for symmetric stream
encryption
 These application give two distinct requirements :
Randomness and Unpredictability
 Two criteria are used to validate that a sequence of
numbers is random:
1. Uniform distribution
The distribution of bits in the sequence should be
uniform .Frequency of occurrence of 1 and 0
approximately equal .
2. Independence : No one subsequence in the
sequence can be inferred from the others
UNPREDICTABILITY
 Hard to predict next value in sequence.
 1-True Random number Generators
 Best source is natural randomness in real world
 TRNG uses a nondeterministic source to produce
randomness
 entropy source refer to produce randomness, from
physical environment .
 Physical environment of the computer and could include
things such as disk electrical activity, mouse
movements, and instantaneous values of the system
clock
 TRNG produce randomness.by measuring unpredictable
natural processes , such as pulse detectors of ionizing
radiation events, gas discharge tubes, and leaky
capacitors.
 Lava rand is an open source project for creating truly
random numbers using inexpensive cameras , open
source code, and inexpensive hardware.
 TRNG may simply involve conversion of an analog
source to a binary output
 Problems of bias or uneven distribution in signal
 have to compensate for this when sample, often by
passing bits through a hash function
 Best to only use a few noisiest bits from each sample
 RFC4086 recommends using multiple sources of
randomness on a computer & hash function to generate
true random output , possible sources is
 Sound /video input
 Disk drivers
 Deskewing :methods of modifying a bit stream to
reduce or eliminate the bias have been developed
 One approach to deskew is to pass the bit stream
through a hash function, such as MD5 or SHA-1
 There is also an online service (random.org), which can
deliver random sequences securely over the Internet.
 Operating systems provide a built-in mechanism for
generating random numbers. For, Linux uses four
entropy sources: mouse and keyboard activity, disk I/O
operations, and specific interrupts.
 An algorithm that is used to produce an open-ended
sequence of bits
 Deterministic algorithms to calculate numbers in
“relatively random” sequence
 Seed is algorithm input .
 Produces continuous stream of random bits
Pseudo Random Function
 Used to produced a pseudorandom string of bits of
some fixed length
 Takes as input a seed plus some context specific
values, such as a user ID or an application ID
Hard to determine pseudo-random stream if don’t know
seed (but know algorithm)
1- RANDOMNESS
A. Uniformity : occurrence of a zero or one is equally
likely, n/2where n = the sequence length.
B. Scalability : Any test applicable to a sequence can also
be applied to subsequences extracted at random
C. Consistency : The behavior of a generator must be
consistent
We have Three test:
1-Frequency test
2-Runs test
3- Maurer’s universal statistical test : detect whether or
not the sequence can be significantly compressed without
loss of information
2- UNPREDICTABILITY
A. Forward unpredictability
B. Backward unpredictability
3-SEED REQUIREMENTS
For cryptographic applications
 The seed that serves as input to the PRNG
must be secure. Because the PRNG is a
deterministic algorithm
 The seed is generated by a TRNG
 Two categories.
 Purpose-built algorithms: These are algorithms
designed specifically and only for the purpose of
generating pseudorandom bit streams
 Algorithms based on existing cryptographic
algorithms: Cryptographic algorithms have the effect
of randomizing input.
 Three broad categories of cryptographic algorithms
are commonly used to create PRNG
 - Symmetric block ciphers.
 - Asymmetric ciphers.
 - Hash functions and message authentication codes
 1- Linear Congruential Generator LCG
 Most commonly used for generating random integers
 generate the next random integer using the previous
random integer .
 To get started, the algorithm requires an initial ``seed'',
which must be provided .
 Given suitable values of parameters can produce a long
random-like sequence.
 Suitable criteria to have are:
 Function generates a full-period
 Generated sequence should appear random
 Efficient implementation with 32-bit arithmetic
 Note that an attacker can reconstruct sequence given a
small number of values
 Have possibilities for making this harder

 Cryptographically secure pseudorandom bit generator
(CSPRBG).
 Named for its developers [BLUM86].
 Based on public key algorithms
 The security of BBS is based on the difficulty of
factoring n
 Unpredictable, passes next-bit test
 Security rests on difficulty of factoring N
 Is unpredictable given any run of bits
 Slow, since very large numbers must be used
 Too slow for cipher use, good for key generation
 p, q: large prime numbers such that:
(p mod 4) = (q mod 4) = 3
 n = p * q
 s: random number relatively prime to n
Generation sequence of bits ,Bi:
𝑋0 = 𝑠2 𝑚𝑜𝑑 𝑛
𝑓𝑜𝑟 𝑖 = 1 𝑡𝑜 ∞
𝑋𝑖 =( 𝑋𝑖−1)2 mod n
𝐵𝑖= 𝑋𝑖 mod 2
 Example:
p=383 ,q=503 ,s=101355
N=p∗q n= 192649
𝑋0 = 𝑆2
mod n
𝑋0 =20749
𝑋𝑖 = ( 𝑋𝑖−1)2 mod n =14135
𝐵𝑖= 𝑋𝑖 mod2 =1
 Is a symmetric encryption algorithm cipher text
output is produced bit by bit or byte by byte
 Another name for the stream cipher is the state
cipher since every digit is dependent on the current
state of the cipher
 Have a pseudo random key stream
 Combined (XOR) with plaintext bit by bit
 Randomness of stream key completely destroys
statistically properties in message
Ci = Mi XOR Stream Keyi
 But must never reuse stream key
 Otherwise can recover messages
1- Synchronous Stream Ciphers
 Called synchronous if key stream does not depend
on the plain text (depends on key alone)
 Both the sender and receiver must use the same
information in order for decryption of the cipher text
to be successful.
 Example: RC4 ,block cipher in OFB.
2- Self-Synchronizing Stream Ciphers
 Key stream depend on the plain text
 Cipher Text Auto Key (CTAK). This concept allows
the receiver to automatically synchronize with the
key stream generator after receiving N cipher text
digits.
 Example: block cipher in cipher feedback CFB mode
 Some design considerations are:
Long period with no repetitions
Key stream should approximate true random
number stream
Key must withstand brute force attacks depends
on large enough key
Comparison to Block Ciphers
• Can be as secure as a block cipher with same size
key
• But Stream ciphers often simpler to implement &
faster
• Block ciphers can re-use keys
 RC4 is a proprietary cipher owned by RSA Security.
 Designed by Ron Rivest in 1987
 Widely used in the web SSL (Secure Socket Layer)/
TLS (Transport Layer Security), wireless WEP(Wired
Equivalent Privacy/WPA( WiFi Protected Access).
 Very simple and efficient implementation.
 Can use variable length key of from 1-256 bytes
(8 to 2048 bits ).
 The algorithm is based on the use of random
permutation of all 8 bit value
Parameters and Variables
 Variable length key, K, from 1 to 256 Bytes
 State vector, S, 256 Bytes
 Temporary vector, T, 256 Bytes
Steps
 Starts with an array S of numbers: 0..255
 Use key to well and truly shuffle
 S forms internal state of the cipher
for i = 0 to 255 do
S[i] = i
T[i] = K[i mod keylen ]
j = 0
for i = 0 to 255 do
j = (j + S[i] + T[i]) (mod 256)
swap (S[i], S[j])
 Encryption continues shuffling array values
 Sum of shuffled pair selects "stream key" value from
permutation
 XOR S[t] with next byte of message to en/decrypt
i = j = 0
for each message byte Mi
i = (i + 1) (mod 256)
j = (j + S[i]) (mod 256)
swap(S[i], S[j])
t = (S[i] + S[j]) (mod 256)
Ci = Mi XOR S[t]
 Claimed secure against known attacks
have some analyses, none practical
 Result is very non-linear since RC4 is a stream cipher,
must never reuse a key
 Have a concern with WEP, but due to key handling
rather than RC4 itself
 Currently RC4 its regarded as quite secure, if used
correctly, with a sufficiently large key
Information and data security pseudorandom number generation and stream cipher

More Related Content

What's hot

Evaluating the Static-RRIP Cache Replacement Policy
Evaluating the Static-RRIP Cache Replacement PolicyEvaluating the Static-RRIP Cache Replacement Policy
Evaluating the Static-RRIP Cache Replacement PolicyPawan Joshi
 
Challenges of Conventional Systems.pptx
Challenges of Conventional Systems.pptxChallenges of Conventional Systems.pptx
Challenges of Conventional Systems.pptxGovardhanV7
 
2. public key cryptography and RSA
2. public key cryptography and RSA2. public key cryptography and RSA
2. public key cryptography and RSADr.Florence Dayana
 
05 Clustering in Data Mining
05 Clustering in Data Mining05 Clustering in Data Mining
05 Clustering in Data MiningValerii Klymchuk
 
Secure Socket Layer
Secure Socket LayerSecure Socket Layer
Secure Socket LayerNaveen Kumar
 
MD5 ALGORITHM.pptx
MD5 ALGORITHM.pptxMD5 ALGORITHM.pptx
MD5 ALGORITHM.pptxRajapriya82
 
Cipher techniques
Cipher techniquesCipher techniques
Cipher techniquesMohd Arif
 
MACs based on Hash Functions, MACs based on Block Ciphers
MACs based on Hash Functions, MACs based on Block CiphersMACs based on Hash Functions, MACs based on Block Ciphers
MACs based on Hash Functions, MACs based on Block CiphersMaitree Patel
 
Clock synchronization in distributed system
Clock synchronization in distributed systemClock synchronization in distributed system
Clock synchronization in distributed systemSunita Sahu
 
Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniquesDr.Florence Dayana
 

What's hot (20)

Evaluating the Static-RRIP Cache Replacement Policy
Evaluating the Static-RRIP Cache Replacement PolicyEvaluating the Static-RRIP Cache Replacement Policy
Evaluating the Static-RRIP Cache Replacement Policy
 
Secure Hash Algorithm
Secure Hash AlgorithmSecure Hash Algorithm
Secure Hash Algorithm
 
Challenges of Conventional Systems.pptx
Challenges of Conventional Systems.pptxChallenges of Conventional Systems.pptx
Challenges of Conventional Systems.pptx
 
IP Security
IP SecurityIP Security
IP Security
 
Hash Function
Hash FunctionHash Function
Hash Function
 
Hash Function
Hash Function Hash Function
Hash Function
 
SHA 1 Algorithm
SHA 1 AlgorithmSHA 1 Algorithm
SHA 1 Algorithm
 
Election algorithms
Election algorithmsElection algorithms
Election algorithms
 
Secure hashing algorithm
Secure hashing algorithmSecure hashing algorithm
Secure hashing algorithm
 
Bayesian learning
Bayesian learningBayesian learning
Bayesian learning
 
Hash function
Hash function Hash function
Hash function
 
2. public key cryptography and RSA
2. public key cryptography and RSA2. public key cryptography and RSA
2. public key cryptography and RSA
 
05 Clustering in Data Mining
05 Clustering in Data Mining05 Clustering in Data Mining
05 Clustering in Data Mining
 
Secure Socket Layer
Secure Socket LayerSecure Socket Layer
Secure Socket Layer
 
MD5 ALGORITHM.pptx
MD5 ALGORITHM.pptxMD5 ALGORITHM.pptx
MD5 ALGORITHM.pptx
 
Regular expressions
Regular expressionsRegular expressions
Regular expressions
 
Cipher techniques
Cipher techniquesCipher techniques
Cipher techniques
 
MACs based on Hash Functions, MACs based on Block Ciphers
MACs based on Hash Functions, MACs based on Block CiphersMACs based on Hash Functions, MACs based on Block Ciphers
MACs based on Hash Functions, MACs based on Block Ciphers
 
Clock synchronization in distributed system
Clock synchronization in distributed systemClock synchronization in distributed system
Clock synchronization in distributed system
 
Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniques
 

Similar to Information and data security pseudorandom number generation and stream cipher

A study of cryptography for satellite applications
A study of cryptography for satellite applicationsA study of cryptography for satellite applications
A study of cryptography for satellite applicationsRajesh Ishida
 
STEGANOGRAPHY BASED ASYMMETRIC KEY CRYPTOSYSTEM USING TRELLIS CODED GENETIC A...
STEGANOGRAPHY BASED ASYMMETRIC KEY CRYPTOSYSTEM USING TRELLIS CODED GENETIC A...STEGANOGRAPHY BASED ASYMMETRIC KEY CRYPTOSYSTEM USING TRELLIS CODED GENETIC A...
STEGANOGRAPHY BASED ASYMMETRIC KEY CRYPTOSYSTEM USING TRELLIS CODED GENETIC A...ijesajournal
 
Aes 128 192_256_bits_project_report
Aes 128 192_256_bits_project_reportAes 128 192_256_bits_project_report
Aes 128 192_256_bits_project_reportsakhi rehman
 
International Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentInternational Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentIJERD Editor
 
Comparative Analysis of Cryptographic Algorithms and Advanced Cryptographic A...
Comparative Analysis of Cryptographic Algorithms and Advanced Cryptographic A...Comparative Analysis of Cryptographic Algorithms and Advanced Cryptographic A...
Comparative Analysis of Cryptographic Algorithms and Advanced Cryptographic A...editor1knowledgecuddle
 
Crypto 101: Encryption, Codebreaking, SSL and Bitcoin
Crypto 101: Encryption, Codebreaking, SSL and BitcoinCrypto 101: Encryption, Codebreaking, SSL and Bitcoin
Crypto 101: Encryption, Codebreaking, SSL and BitcoinPriyanka Aash
 
CISSP Certification Security Engineering-Part2
CISSP Certification Security Engineering-Part2CISSP Certification Security Engineering-Part2
CISSP Certification Security Engineering-Part2Hamed Moghaddam
 
Wireless hacking and security
Wireless hacking and securityWireless hacking and security
Wireless hacking and securityAdel Zalok
 
Information and data security block cipher and the data encryption standard (...
Information and data security block cipher and the data encryption standard (...Information and data security block cipher and the data encryption standard (...
Information and data security block cipher and the data encryption standard (...Mazin Alwaaly
 
Renas Rajab Asaad
Renas Rajab Asaad Renas Rajab Asaad
Renas Rajab Asaad Renas Rekany
 

Similar to Information and data security pseudorandom number generation and stream cipher (20)

Ch07
Ch07Ch07
Ch07
 
A study of cryptography for satellite applications
A study of cryptography for satellite applicationsA study of cryptography for satellite applications
A study of cryptography for satellite applications
 
STEGANOGRAPHY BASED ASYMMETRIC KEY CRYPTOSYSTEM USING TRELLIS CODED GENETIC A...
STEGANOGRAPHY BASED ASYMMETRIC KEY CRYPTOSYSTEM USING TRELLIS CODED GENETIC A...STEGANOGRAPHY BASED ASYMMETRIC KEY CRYPTOSYSTEM USING TRELLIS CODED GENETIC A...
STEGANOGRAPHY BASED ASYMMETRIC KEY CRYPTOSYSTEM USING TRELLIS CODED GENETIC A...
 
Aes 128 192_256_bits_project_report
Aes 128 192_256_bits_project_reportAes 128 192_256_bits_project_report
Aes 128 192_256_bits_project_report
 
International Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentInternational Journal of Engineering Research and Development
International Journal of Engineering Research and Development
 
Unit 2
Unit 2Unit 2
Unit 2
 
Comparative Analysis of Cryptographic Algorithms and Advanced Cryptographic A...
Comparative Analysis of Cryptographic Algorithms and Advanced Cryptographic A...Comparative Analysis of Cryptographic Algorithms and Advanced Cryptographic A...
Comparative Analysis of Cryptographic Algorithms and Advanced Cryptographic A...
 
Crypto 101: Encryption, Codebreaking, SSL and Bitcoin
Crypto 101: Encryption, Codebreaking, SSL and BitcoinCrypto 101: Encryption, Codebreaking, SSL and Bitcoin
Crypto 101: Encryption, Codebreaking, SSL and Bitcoin
 
Iss lecture 2
Iss lecture 2Iss lecture 2
Iss lecture 2
 
Day5
Day5Day5
Day5
 
CISSP Certification Security Engineering-Part2
CISSP Certification Security Engineering-Part2CISSP Certification Security Engineering-Part2
CISSP Certification Security Engineering-Part2
 
Unit 2
Unit  2Unit  2
Unit 2
 
Network Security
Network SecurityNetwork Security
Network Security
 
RC4&RC5
RC4&RC5RC4&RC5
RC4&RC5
 
RC4&RC5
RC4&RC5RC4&RC5
RC4&RC5
 
J45015460
J45015460J45015460
J45015460
 
Wireless hacking and security
Wireless hacking and securityWireless hacking and security
Wireless hacking and security
 
Information and data security block cipher and the data encryption standard (...
Information and data security block cipher and the data encryption standard (...Information and data security block cipher and the data encryption standard (...
Information and data security block cipher and the data encryption standard (...
 
Renas Rajab Asaad
Renas Rajab Asaad Renas Rajab Asaad
Renas Rajab Asaad
 
Rass presentation
Rass presentationRass presentation
Rass presentation
 

More from Mazin Alwaaly

Pattern recognition voice biometrics
Pattern recognition voice biometricsPattern recognition voice biometrics
Pattern recognition voice biometricsMazin Alwaaly
 
Pattern recognition palm print authentication system
Pattern recognition palm print authentication systemPattern recognition palm print authentication system
Pattern recognition palm print authentication systemMazin Alwaaly
 
Pattern recognition on line signature
Pattern recognition on line signaturePattern recognition on line signature
Pattern recognition on line signatureMazin Alwaaly
 
Pattern recognition multi biometrics using face and ear
Pattern recognition multi biometrics using face and earPattern recognition multi biometrics using face and ear
Pattern recognition multi biometrics using face and earMazin Alwaaly
 
Pattern recognition IRIS recognition
Pattern recognition IRIS recognitionPattern recognition IRIS recognition
Pattern recognition IRIS recognitionMazin Alwaaly
 
Pattern recognition hand vascular pattern recognition
Pattern recognition hand vascular pattern recognitionPattern recognition hand vascular pattern recognition
Pattern recognition hand vascular pattern recognitionMazin Alwaaly
 
Pattern recognition Hand Geometry
Pattern recognition Hand GeometryPattern recognition Hand Geometry
Pattern recognition Hand GeometryMazin Alwaaly
 
Pattern recognition forensic dental identification
Pattern recognition forensic dental identificationPattern recognition forensic dental identification
Pattern recognition forensic dental identificationMazin Alwaaly
 
Pattern recognition fingerprints
Pattern recognition fingerprintsPattern recognition fingerprints
Pattern recognition fingerprintsMazin Alwaaly
 
Pattern recognition facial recognition
Pattern recognition facial recognitionPattern recognition facial recognition
Pattern recognition facial recognitionMazin Alwaaly
 
Pattern recognition ear as a biometric
Pattern recognition ear as a biometricPattern recognition ear as a biometric
Pattern recognition ear as a biometricMazin Alwaaly
 
Pattern recognition 3d face recognition
Pattern recognition 3d face recognitionPattern recognition 3d face recognition
Pattern recognition 3d face recognitionMazin Alwaaly
 
Multimedia multimedia over wireless and mobile networks
Multimedia multimedia over wireless and mobile networksMultimedia multimedia over wireless and mobile networks
Multimedia multimedia over wireless and mobile networksMazin Alwaaly
 
Multimedia network services and protocols for multimedia communications
Multimedia network services and protocols for multimedia communicationsMultimedia network services and protocols for multimedia communications
Multimedia network services and protocols for multimedia communicationsMazin Alwaaly
 
Multimedia content based retrieval in digital libraries
Multimedia content based retrieval in digital librariesMultimedia content based retrieval in digital libraries
Multimedia content based retrieval in digital librariesMazin Alwaaly
 
Multimedia lossy compression algorithms
Multimedia lossy compression algorithmsMultimedia lossy compression algorithms
Multimedia lossy compression algorithmsMazin Alwaaly
 
Multimedia lossless compression algorithms
Multimedia lossless compression algorithmsMultimedia lossless compression algorithms
Multimedia lossless compression algorithmsMazin Alwaaly
 
Multimedia basic video compression techniques
Multimedia basic video compression techniquesMultimedia basic video compression techniques
Multimedia basic video compression techniquesMazin Alwaaly
 
Multimedia image compression standards
Multimedia image compression standardsMultimedia image compression standards
Multimedia image compression standardsMazin Alwaaly
 
Multimedia fundamental concepts in video
Multimedia fundamental concepts in videoMultimedia fundamental concepts in video
Multimedia fundamental concepts in videoMazin Alwaaly
 

More from Mazin Alwaaly (20)

Pattern recognition voice biometrics
Pattern recognition voice biometricsPattern recognition voice biometrics
Pattern recognition voice biometrics
 
Pattern recognition palm print authentication system
Pattern recognition palm print authentication systemPattern recognition palm print authentication system
Pattern recognition palm print authentication system
 
Pattern recognition on line signature
Pattern recognition on line signaturePattern recognition on line signature
Pattern recognition on line signature
 
Pattern recognition multi biometrics using face and ear
Pattern recognition multi biometrics using face and earPattern recognition multi biometrics using face and ear
Pattern recognition multi biometrics using face and ear
 
Pattern recognition IRIS recognition
Pattern recognition IRIS recognitionPattern recognition IRIS recognition
Pattern recognition IRIS recognition
 
Pattern recognition hand vascular pattern recognition
Pattern recognition hand vascular pattern recognitionPattern recognition hand vascular pattern recognition
Pattern recognition hand vascular pattern recognition
 
Pattern recognition Hand Geometry
Pattern recognition Hand GeometryPattern recognition Hand Geometry
Pattern recognition Hand Geometry
 
Pattern recognition forensic dental identification
Pattern recognition forensic dental identificationPattern recognition forensic dental identification
Pattern recognition forensic dental identification
 
Pattern recognition fingerprints
Pattern recognition fingerprintsPattern recognition fingerprints
Pattern recognition fingerprints
 
Pattern recognition facial recognition
Pattern recognition facial recognitionPattern recognition facial recognition
Pattern recognition facial recognition
 
Pattern recognition ear as a biometric
Pattern recognition ear as a biometricPattern recognition ear as a biometric
Pattern recognition ear as a biometric
 
Pattern recognition 3d face recognition
Pattern recognition 3d face recognitionPattern recognition 3d face recognition
Pattern recognition 3d face recognition
 
Multimedia multimedia over wireless and mobile networks
Multimedia multimedia over wireless and mobile networksMultimedia multimedia over wireless and mobile networks
Multimedia multimedia over wireless and mobile networks
 
Multimedia network services and protocols for multimedia communications
Multimedia network services and protocols for multimedia communicationsMultimedia network services and protocols for multimedia communications
Multimedia network services and protocols for multimedia communications
 
Multimedia content based retrieval in digital libraries
Multimedia content based retrieval in digital librariesMultimedia content based retrieval in digital libraries
Multimedia content based retrieval in digital libraries
 
Multimedia lossy compression algorithms
Multimedia lossy compression algorithmsMultimedia lossy compression algorithms
Multimedia lossy compression algorithms
 
Multimedia lossless compression algorithms
Multimedia lossless compression algorithmsMultimedia lossless compression algorithms
Multimedia lossless compression algorithms
 
Multimedia basic video compression techniques
Multimedia basic video compression techniquesMultimedia basic video compression techniques
Multimedia basic video compression techniques
 
Multimedia image compression standards
Multimedia image compression standardsMultimedia image compression standards
Multimedia image compression standards
 
Multimedia fundamental concepts in video
Multimedia fundamental concepts in videoMultimedia fundamental concepts in video
Multimedia fundamental concepts in video
 

Recently uploaded

Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...Nistarini College, Purulia (W.B) India
 
Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Patrick Diehl
 
Animal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxAnimal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxUmerFayaz5
 
Boyles law module in the grade 10 science
Boyles law module in the grade 10 scienceBoyles law module in the grade 10 science
Boyles law module in the grade 10 sciencefloriejanemacaya1
 
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptxUnlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptxanandsmhk
 
Orientation, design and principles of polyhouse
Orientation, design and principles of polyhouseOrientation, design and principles of polyhouse
Orientation, design and principles of polyhousejana861314
 
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service 🪡
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service  🪡CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service  🪡
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service 🪡anilsa9823
 
Luciferase in rDNA technology (biotechnology).pptx
Luciferase in rDNA technology (biotechnology).pptxLuciferase in rDNA technology (biotechnology).pptx
Luciferase in rDNA technology (biotechnology).pptxAleenaTreesaSaji
 
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...jana861314
 
Module 4: Mendelian Genetics and Punnett Square
Module 4:  Mendelian Genetics and Punnett SquareModule 4:  Mendelian Genetics and Punnett Square
Module 4: Mendelian Genetics and Punnett SquareIsiahStephanRadaza
 
Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )aarthirajkumar25
 
Grafana in space: Monitoring Japan's SLIM moon lander in real time
Grafana in space: Monitoring Japan's SLIM moon lander  in real timeGrafana in space: Monitoring Japan's SLIM moon lander  in real time
Grafana in space: Monitoring Japan's SLIM moon lander in real timeSatoshi NAKAHIRA
 
Neurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 trNeurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 trssuser06f238
 
The Black hole shadow in Modified Gravity
The Black hole shadow in Modified GravityThe Black hole shadow in Modified Gravity
The Black hole shadow in Modified GravitySubhadipsau21168
 
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfBehavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfSELF-EXPLANATORY
 
zoogeography of pakistan.pptx fauna of Pakistan
zoogeography of pakistan.pptx fauna of Pakistanzoogeography of pakistan.pptx fauna of Pakistan
zoogeography of pakistan.pptx fauna of Pakistanzohaibmir069
 
Recombinant DNA technology( Transgenic plant and animal)
Recombinant DNA technology( Transgenic plant and animal)Recombinant DNA technology( Transgenic plant and animal)
Recombinant DNA technology( Transgenic plant and animal)DHURKADEVIBASKAR
 
Nanoparticles synthesis and characterization​ ​
Nanoparticles synthesis and characterization​  ​Nanoparticles synthesis and characterization​  ​
Nanoparticles synthesis and characterization​ ​kaibalyasahoo82800
 

Recently uploaded (20)

Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...
 
Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?
 
Animal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxAnimal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptx
 
Boyles law module in the grade 10 science
Boyles law module in the grade 10 scienceBoyles law module in the grade 10 science
Boyles law module in the grade 10 science
 
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptxUnlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptx
 
Orientation, design and principles of polyhouse
Orientation, design and principles of polyhouseOrientation, design and principles of polyhouse
Orientation, design and principles of polyhouse
 
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service 🪡
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service  🪡CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service  🪡
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service 🪡
 
Luciferase in rDNA technology (biotechnology).pptx
Luciferase in rDNA technology (biotechnology).pptxLuciferase in rDNA technology (biotechnology).pptx
Luciferase in rDNA technology (biotechnology).pptx
 
The Philosophy of Science
The Philosophy of ScienceThe Philosophy of Science
The Philosophy of Science
 
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
 
Module 4: Mendelian Genetics and Punnett Square
Module 4:  Mendelian Genetics and Punnett SquareModule 4:  Mendelian Genetics and Punnett Square
Module 4: Mendelian Genetics and Punnett Square
 
Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )
 
Grafana in space: Monitoring Japan's SLIM moon lander in real time
Grafana in space: Monitoring Japan's SLIM moon lander  in real timeGrafana in space: Monitoring Japan's SLIM moon lander  in real time
Grafana in space: Monitoring Japan's SLIM moon lander in real time
 
9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service
9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service
9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service
 
Neurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 trNeurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 tr
 
The Black hole shadow in Modified Gravity
The Black hole shadow in Modified GravityThe Black hole shadow in Modified Gravity
The Black hole shadow in Modified Gravity
 
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfBehavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
 
zoogeography of pakistan.pptx fauna of Pakistan
zoogeography of pakistan.pptx fauna of Pakistanzoogeography of pakistan.pptx fauna of Pakistan
zoogeography of pakistan.pptx fauna of Pakistan
 
Recombinant DNA technology( Transgenic plant and animal)
Recombinant DNA technology( Transgenic plant and animal)Recombinant DNA technology( Transgenic plant and animal)
Recombinant DNA technology( Transgenic plant and animal)
 
Nanoparticles synthesis and characterization​ ​
Nanoparticles synthesis and characterization​  ​Nanoparticles synthesis and characterization​  ​
Nanoparticles synthesis and characterization​ ​
 

Information and data security pseudorandom number generation and stream cipher

  • 1.
  • 2. pseudorandom number generation Stream ciphers RC4 True random numbers
  • 3.  Random number is a number generated by a process, whose outcome is unpredictable, and which cannot be sub sequentially reliably reproduced  Random numbers play an important role in the use of encryption for various network security applications. Two Types of Random Numbers  Pseudorandom numbers are numbers that appear random, but are obtained in a deterministic, repeatable, and predictable manner.  True random numbers are generated in non- deterministic ways. They are not predictable. They are not repeatable
  • 4. 1- Key distribution and reciprocal authentication schemes 2- Session key generation.  Session key is a secret key for symmetric encryption generated for use for a short period of time. 3- Generation of keys for the RSA public- key encryption algorithm 4- Generation of a bit stream for symmetric stream encryption  These application give two distinct requirements : Randomness and Unpredictability
  • 5.  Two criteria are used to validate that a sequence of numbers is random: 1. Uniform distribution The distribution of bits in the sequence should be uniform .Frequency of occurrence of 1 and 0 approximately equal . 2. Independence : No one subsequence in the sequence can be inferred from the others UNPREDICTABILITY  Hard to predict next value in sequence.
  • 6.  1-True Random number Generators  Best source is natural randomness in real world  TRNG uses a nondeterministic source to produce randomness  entropy source refer to produce randomness, from physical environment .  Physical environment of the computer and could include things such as disk electrical activity, mouse movements, and instantaneous values of the system clock  TRNG produce randomness.by measuring unpredictable natural processes , such as pulse detectors of ionizing radiation events, gas discharge tubes, and leaky capacitors.
  • 7.  Lava rand is an open source project for creating truly random numbers using inexpensive cameras , open source code, and inexpensive hardware.  TRNG may simply involve conversion of an analog source to a binary output  Problems of bias or uneven distribution in signal  have to compensate for this when sample, often by passing bits through a hash function  Best to only use a few noisiest bits from each sample  RFC4086 recommends using multiple sources of randomness on a computer & hash function to generate true random output , possible sources is  Sound /video input  Disk drivers
  • 8.  Deskewing :methods of modifying a bit stream to reduce or eliminate the bias have been developed  One approach to deskew is to pass the bit stream through a hash function, such as MD5 or SHA-1  There is also an online service (random.org), which can deliver random sequences securely over the Internet.  Operating systems provide a built-in mechanism for generating random numbers. For, Linux uses four entropy sources: mouse and keyboard activity, disk I/O operations, and specific interrupts.
  • 9.  An algorithm that is used to produce an open-ended sequence of bits  Deterministic algorithms to calculate numbers in “relatively random” sequence  Seed is algorithm input .  Produces continuous stream of random bits Pseudo Random Function  Used to produced a pseudorandom string of bits of some fixed length  Takes as input a seed plus some context specific values, such as a user ID or an application ID
  • 10.
  • 11. Hard to determine pseudo-random stream if don’t know seed (but know algorithm) 1- RANDOMNESS A. Uniformity : occurrence of a zero or one is equally likely, n/2where n = the sequence length. B. Scalability : Any test applicable to a sequence can also be applied to subsequences extracted at random C. Consistency : The behavior of a generator must be consistent We have Three test: 1-Frequency test 2-Runs test 3- Maurer’s universal statistical test : detect whether or not the sequence can be significantly compressed without loss of information
  • 12. 2- UNPREDICTABILITY A. Forward unpredictability B. Backward unpredictability 3-SEED REQUIREMENTS For cryptographic applications  The seed that serves as input to the PRNG must be secure. Because the PRNG is a deterministic algorithm  The seed is generated by a TRNG
  • 13.
  • 14.  Two categories.  Purpose-built algorithms: These are algorithms designed specifically and only for the purpose of generating pseudorandom bit streams  Algorithms based on existing cryptographic algorithms: Cryptographic algorithms have the effect of randomizing input.  Three broad categories of cryptographic algorithms are commonly used to create PRNG  - Symmetric block ciphers.  - Asymmetric ciphers.  - Hash functions and message authentication codes
  • 15.  1- Linear Congruential Generator LCG  Most commonly used for generating random integers  generate the next random integer using the previous random integer .  To get started, the algorithm requires an initial ``seed'', which must be provided .  Given suitable values of parameters can produce a long random-like sequence.  Suitable criteria to have are:  Function generates a full-period  Generated sequence should appear random  Efficient implementation with 32-bit arithmetic  Note that an attacker can reconstruct sequence given a small number of values  Have possibilities for making this harder
  • 16.
  • 17.  Cryptographically secure pseudorandom bit generator (CSPRBG).  Named for its developers [BLUM86].  Based on public key algorithms  The security of BBS is based on the difficulty of factoring n  Unpredictable, passes next-bit test  Security rests on difficulty of factoring N  Is unpredictable given any run of bits  Slow, since very large numbers must be used  Too slow for cipher use, good for key generation
  • 18.  p, q: large prime numbers such that: (p mod 4) = (q mod 4) = 3  n = p * q  s: random number relatively prime to n Generation sequence of bits ,Bi: 𝑋0 = 𝑠2 𝑚𝑜𝑑 𝑛 𝑓𝑜𝑟 𝑖 = 1 𝑡𝑜 ∞ 𝑋𝑖 =( 𝑋𝑖−1)2 mod n 𝐵𝑖= 𝑋𝑖 mod 2  Example: p=383 ,q=503 ,s=101355 N=p∗q n= 192649 𝑋0 = 𝑆2 mod n 𝑋0 =20749 𝑋𝑖 = ( 𝑋𝑖−1)2 mod n =14135 𝐵𝑖= 𝑋𝑖 mod2 =1
  • 19.  Is a symmetric encryption algorithm cipher text output is produced bit by bit or byte by byte  Another name for the stream cipher is the state cipher since every digit is dependent on the current state of the cipher  Have a pseudo random key stream  Combined (XOR) with plaintext bit by bit  Randomness of stream key completely destroys statistically properties in message Ci = Mi XOR Stream Keyi  But must never reuse stream key  Otherwise can recover messages
  • 20.
  • 21. 1- Synchronous Stream Ciphers  Called synchronous if key stream does not depend on the plain text (depends on key alone)  Both the sender and receiver must use the same information in order for decryption of the cipher text to be successful.  Example: RC4 ,block cipher in OFB. 2- Self-Synchronizing Stream Ciphers  Key stream depend on the plain text  Cipher Text Auto Key (CTAK). This concept allows the receiver to automatically synchronize with the key stream generator after receiving N cipher text digits.  Example: block cipher in cipher feedback CFB mode
  • 22.
  • 23.  Some design considerations are: Long period with no repetitions Key stream should approximate true random number stream Key must withstand brute force attacks depends on large enough key Comparison to Block Ciphers • Can be as secure as a block cipher with same size key • But Stream ciphers often simpler to implement & faster • Block ciphers can re-use keys
  • 24.
  • 25.  RC4 is a proprietary cipher owned by RSA Security.  Designed by Ron Rivest in 1987  Widely used in the web SSL (Secure Socket Layer)/ TLS (Transport Layer Security), wireless WEP(Wired Equivalent Privacy/WPA( WiFi Protected Access).  Very simple and efficient implementation.  Can use variable length key of from 1-256 bytes (8 to 2048 bits ).  The algorithm is based on the use of random permutation of all 8 bit value
  • 26. Parameters and Variables  Variable length key, K, from 1 to 256 Bytes  State vector, S, 256 Bytes  Temporary vector, T, 256 Bytes Steps  Starts with an array S of numbers: 0..255  Use key to well and truly shuffle  S forms internal state of the cipher for i = 0 to 255 do S[i] = i T[i] = K[i mod keylen ] j = 0 for i = 0 to 255 do j = (j + S[i] + T[i]) (mod 256) swap (S[i], S[j])
  • 27.  Encryption continues shuffling array values  Sum of shuffled pair selects "stream key" value from permutation  XOR S[t] with next byte of message to en/decrypt i = j = 0 for each message byte Mi i = (i + 1) (mod 256) j = (j + S[i]) (mod 256) swap(S[i], S[j]) t = (S[i] + S[j]) (mod 256) Ci = Mi XOR S[t]
  • 28.
  • 29.  Claimed secure against known attacks have some analyses, none practical  Result is very non-linear since RC4 is a stream cipher, must never reuse a key  Have a concern with WEP, but due to key handling rather than RC4 itself  Currently RC4 its regarded as quite secure, if used correctly, with a sufficiently large key