Take the 2-minute tour ×
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It's 100% free, no registration required.

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?

share|improve this question
    
with 6 characters you're doomed. Even with optimistic assumptions that's merely 36 bits of entropy. –  CodesInChaos Nov 7 '12 at 14:03
add comment

1 Answer 1

up vote 4 down vote accepted

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.

share|improve this answer
    
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? –  james Nov 7 '12 at 15:38
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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