Authentication & Passwords
Authentication & Passwords
Password-based authentication
checkpw(user, passwd): acct = accounts[user] for i in range(0, len(acct.pw)): if acct.pw[i] passwd[i]: return False return True
* Based on Tenex
Password hashing
checkpw(user, passwd): acct = accounts[user] h = SHA1(passwd) if acct.pwhash h: return False return True
- 5,000 unique passwords account for 20% of users (6.4 million) - Similar statistics confirmed again in 2010 (Gawker break-in)
* Consumer Passwords Worst Practices report by Imperva
Sitekey
Summary
Principle: be explicit