I'm working on school project, particularly, implementing openssl
genrsa
command.
School project limits available functions to open, close, read, write, malloc, free
.
One of the option flags for genrsa
command is rand
. As I understand from man page, this flag is intended to be used on a systems that does not have API for "machine noise", like dev/urandom
on linux systems, so that seed can be generated from file or a socket.
When repeatedly seeded with an empty file openssl
genrsa
does not output the same key, which probably means that it actually uses some other random seed.
The question: How do I get a randomized output, as does openssl
genrsa
command seeded with an empty file, without using dev/random
or dev/urandom
and with a limited set of functions as specified above?