For a software, I don't want the user to choose weak keys, so I plan to just read the needed number of bytes from /dev/random to create the needed secret keys. Is it safe to do so?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
Yes, in any algorithm where keys are just random numbers, reading them from
However, in practice, it is very easy to make a port of
So, in particular in a non-mainstream implementation of
Update per otus's comment: In the above I'm thinking of ports on various things with a unix derivative, like embedded development board, set-top box, internet box or appliance, firewall, payment terminal. On mainstream PC linux or unix distributions, especially in user code, I tend to trust