News for hackers. Stuff that matters.
Re:How To Safely Store A Password by tptacek on Tuesday December 14, 2010 @02:19PM (#2005344)
Yes.
Re:How To Safely Store A Password by miGlanz on Tuesday December 14, 2010 @02:21PM (#2005352)
So the original question remains, is it possible with bcrypt?
Re:How To Safely Store A Password by tptacek on Tuesday December 14, 2010 @02:26PM (#2005375)
I don't know, but Oliver Hunt suggested just validating the password on the next login and upgrading it on the fly, which, to be honest, is what I'd probably do.
Re:How To Safely Store A Password by marcinw on Tuesday December 14, 2010 @02:30PM (#2005385)

  import bcrypt
  hashed = bcrypt.hashpw(password, bcrypt.gensalt(log_rounds=13))
Increasing log_rounds by one increases the work factor exponentially (2 * * log_rounds).
Re:How To Safely Store A Password by csytan on Tuesday December 14, 2010 @06:16PM (#2006162)
I rigged up a small test on my Macbook. Do you think 50,000 iterations would be enough for a general website (such as HN)?

    import timeit
    
    t = timeit.Timer(stmt="""\
    def test(pwd, n_iter):
        for i in range(n_iter):
            pwd = hashlib.sha1(pwd).hexdigest()
    test('hello', 50000)
    """, setup='import hashlib')

    print t.timeit(100) / 100
    
    >>> 0.126629960537