Lecture 9: Pseudorandom Numbers and Stream Ciphers (random numbers, DRBG, stream ciphers, OTP, visual cryptography, A5 cipher, RC4 cipher, ChaCha) Flashcards
What is a deterministic algorithm?
an algorithm that, given a particular input, will always produce the same output, with the underlying machine always passing through the same sequence of states
What are stream ciphers constructed from?
(pseudo)random number
generators
What are examples of stream ciphers widely deployed?
1) A5 cipher used in GSM mobile phones
2) AES in counter (CTR) mode
What is the goal of randomness?
any specific string of bits is exactly as
random as any other string
What are the two types of generators of random strings?
1) True random number generator (TRNG)
2) Pseudorandom number generator (PRNG)
What is a true random number generator (TRNG)?
a physical
process which outputs each valid string independently with
equal probability
What is a pseudorandom number generator (PRNG)
deterministic algorithm which approximates a TRNG
What provides a seed for a PRNG?
using a TRNG
What is NIST Special Publication 800-90B (Jan. 2016)?
Framework for design and validation of TRNG algorithms, called entropy sources
Specification of statistical tests for validating the suitability
of entropy sources
What is an entropy source?
basis for the non-deterministic operation of the randomizer
What does an entropy source include?
1) A physical noise source
2) A digitization process
3) Post-processing stages
What is the output of an entropy source?
any requested number
of bits
What is a periodic health test used for i.t.o TRNG?
ensure continuing reliable operation of TRNG
When did Intel introduced TRNG into Ivy Bridge processors?
2012
What is NIST Special Publication 800-90A (June 2015)?
Recommendation of specific PRNG algorithms, named
deterministic random bit generator (DRBG)
What does DRBG stand for?
deterministic random bit generator
What is DRBG based on?
hash functions, a specific MAC (known
as HMAC) and block ciphers in counter mode
What does each PRBG generator takes as an input?
a seed
What does each PRBG output? What is this before?
a bit string before updating its state
How often should the seed for a PNGR be updated?
after some number of calls
What can the seed for a PRNG be obtained from?
a TRNG
List the functions of DRBG
1) instantiate
2) generate
3) reseed
4) test
5) uninstantiate
Outline the instantiate function of DRBG
setting the initial state of the DRBG using a
seed
Outline the generate function of DRBG
providing an output bit string for each request
Outline the reseed function of DRBG
inputting a new random seed and updating the
state
Outline the test function of DRBG
checking correct operation of the other functions
Outline the uninstantiate function of DRBG
deleting (zeroising) the state of the DRBG
What is backtracking resistance i.t.o DRBG?
an attacker who obtains the
current state of the DRBG should not be able to distinguish
between the output of earlier calls to the function Generate
and random strings
What is forward prediction resistance i.t.o DRBG?
an attacker who obtains the current state of the DRBG should not be able to distinguish between the output of later calls to the function Generate
and random strings
What mode does CTR_DRBG uses and what is the recommended block cipher and key size?
counter (CTR) mode
AES with 128-bit keys
For CTR_DRBG, what initialises the seed and what is the seed’s length?
DRBG initialised with a seed
length is equal to the
key length PLUS the block length
–> 128 + 128 = 256 for AES with 128-bit master keys
What does the seed define in CTR_DRBG?
Is there a separate nonce?
Seed defines a key K and a counter value ctr
No separate nonce as in a normal CTR mode
How is the CTR mode encryption run in CTR_DRBG?
iteratively, with no plaintext
added
What forms the CTR_DRBG output?
CTR output blocks
How many bits does the update function of DRBG generate per request i.t.o CTR_DRBG?
up to 2^19 bits
From the generate function in CTR_DRBG, whose state must be updated, when and how?
(K, ctr)’s state must be updated after each request by generating 2 blocks using the current key to obtain the new key and a counter
What does the update function provide?
backtracking resistance
What is the restriction on the number of requests to the generate function for CTR_DRBG before require reseeding?
up to 2^48
What does each re-seed provided i.t.o CTR_DRBG?
forward prediction and backtracking resistance
What is Dual_EC_DRBG based on?
elliptic curve discrete logarithm problem
BUT:
no security proof exists
many flaws
Comment on the speed of Dual_EC_DRBG compared with other DRBGs in the standard
much slower
What are stream ciphers characterised by?
the generation of a keystream using a
short key and an initialisation value IV