0
$\begingroup$

I am looking for a good pseudo-random number generation algorithm for passwords.

My scenario is that I have to generate 5K pseudo-random bits from a user-supplied password (6 characters). What are possible options and which one would be able to cover for my purposes?

$\endgroup$
  • $\begingroup$ with 6 characters you're doomed. Even with optimistic assumptions that's merely 36 bits of entropy. $\endgroup$ – CodesInChaos Nov 7 '12 at 14:03
3
$\begingroup$

Scrypt is the best function for key-stretching we have. With such a bad password, you'll need all the stretching you can get, so make sure to use a large work parameter and a fast implementation.

But you should really consider using a stronger password. 10 random characters are much better than only 6.

$\endgroup$
  • $\begingroup$ thanks. but i am talking about algorithmic perspective not from the coding perspective. What are other possible options and why do you recommend some specific option? $\endgroup$ – Mushahid Nov 7 '12 at 15:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.