Finding a cryptographically strong random secret for applications? <p>While building web applications I'm wondering how long of a secret I need (how many bits) for serving as the key in encryption - and whether I can just mash out a random sequence of characters on my keyboard or if I need some special software to generate something for me? </p> <p>(i.e. stealing the private RSA from something like ssh-keygen)</p> <p><strong>Update</strong>: I manly will be using this key with PHP's <a href="http://php.net/manual/en/book.mcrypt.php" rel="nofollow">mcrypt library</a> but am also interested in c++ options (both on linux).</p>