uru4000: Improve random seed
Motivation:
- A random seed used for encrypting/decrypting fingerprint image from USB device should exhibit no predictable pattern as much as possible.
- Unfortunately, it seems that the seed always generates the same sequence of numbers each time since it is generated from rand() in libc by default.
- Especially, it has been reproduced on device re-initialization (e.g., unplug and replug the USB cable).
- The choice of a good random seed is crucial in the field of computer security.
Modification:
- If we need a better random number generator, don’t use the libc rand().
- Instead, I propose to use of chacha20 based random number generator from OpenBSD.
- It provides more high quality of statistical randomness.