Dale's Notebook Logo TekStuff Logo

About Encryption and Random Number Generation

  These items are combined because they dependant upon each other.  Encryption needs random numbers for key generation, initialation vectors (IVs) and nonces.  Encryption algorithms can be used for random number generation (actually pseudorandom).

  I started out thinking I could just program an Advanced Encryption Standard (AES) function, and begin encrypting/decrypting files and communication links.  Wrong!  Before that a secure source of pseudorandom numbers for keys and IVs is needed.  Okay, wrote code for secure hash, and for pseudorandom number generator (PRNG) using the secure hash.  With some more reading it became clear that to get secure random numbers a source of truely random, or at least truely unpredictable numbers is needed to seed the PRNG.  In the process I also learned there are requirements for key storage and distribution, and that a flaw in the implimentation of any of these pieces compromises the entire effort.

  So I broke it up into separate tasks, starting true random/ unpredictable.  This section is about, any implementing code will be TekStuff/Software.

About subsection includes:
  1. Security Introduction.  Read first.
  2. True Random/Unpredictable for seed.
    1. Computer Sources
    2. Human Interaction Sources
    3. Dedicated Hardware Sources
  3. Pseudo Random Number Generators (PRNGs)
Original portions Copyright 2010 by Dale Yarker
Click here for full notice.