English subtitles

← 02-10 Prng Implementation

dummy description

Get Embed Code
2 Languages

Showing Revision 1 created 01/24/2021 by vikrant mehta.

  1. So this is a good start
  2. for a basic design for pseudo-random
    number generator
  3. We have some pool of randomness.
  4. We extract a seed from that pool.
  5. We use that seed as the key
  6. to our encryption algorithm.
  7. And as the messages
  8. we use a counter.
  9. So, lets suppose we use AES-128,
  10. so that means the key size and
  11. the block size are 128 bits
  12. and so each time we do this,
  13. we get a 128 bits out,
  14. which we use as our random values.
  15. And this counter
  16. will go up to (2^128)-1
  17. and then go back to zero.
  18. So now, I have a quiz
  19. about how well this works.
  20. So the question is does this produce a
  21. sequence that appears random and lets say—
  22. for the first 2^70 outputs—?
  23. So certainly if we have more than
  24. 2^128 outputs,
  25. well, these counter values repeat.
  26. So that would be non-random.
  27. The choices are ‘yes’,
  28. ‘no, because it repeats values
    too frequently,’
  29. or ‘no, because it repeats values too