News for hackers. Stuff that matters.
Re:Passwords, Backups and a false sense of security by DavidSJ on Saturday August 04, 2012 @01:40PM (#4339072)
rand() is not cryptographically secure. You should not rely on it in security-sensitive situations.

http://perldoc.perl.org/functions/rand.html

Re:Passwords, Backups and a false sense of security by larrys on Saturday August 04, 2012 @01:48PM (#4339095)
Agree but as I said it also "only generates 7 digits with no UC" which is even worse. My point is simply that you can do this by the command line. And depending on what the purpose of the password is (and how difficult you want it to be) in many cases it fits the purpose.

If I was generating initial passwords for someone's email account for example I probably would also leave out digits and letters that are easily confused, like 0 and O and l and 1 and some other things which isn't a best practice either but might be appropriate for other reasons.

Re:Passwords, Backups and a false sense of security by rane on Saturday August 04, 2012 @03:11PM (#4339336)
Can you give a practical example how this can become a problem if I use rand() to generate a password to be used on a website?
Re:Passwords, Backups and a false sense of security by barrkel on Saturday August 04, 2012 @06:34PM (#4339904)
Many PRNGs only have 32 bits of state. If someone knows your settings (alphabet chosen and length) the max number of passwords to check is 4 billion.