I need to generate a lot of shared keys for an AES method which uses in various condition, my concern is how can I generate unpredictable keys? I've had some research on Cryptographically secure pseudorandom number generator but I don't know how I should use them?

2 Answers 2


/dev/urandom in unix based systems and CryptGenRandom on Windows. Most programming languages should provide APIs to generate random bytes such as os.urandom in Python.


There are many ways. The answer to this will be based on your expertise in the process.

For example, if you are a developer, as Terry said, you can use APIs.

If you are a Linux person, you can use Linux command line tools.

If you are a windows guy, and not too expert on the command line, there are GUI tools like puttyGen (which i personally has tried and suggested for windows GUI lovers).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .