Per NIST (National Institute of Standards and Technology):
eine Hash-Funktion verwenden, durchläuft einen HMAC mit einem zufälligen Salz für etwa ein 100 ms Dauer und das Salz mit dem Hash speichern. Verwenden Sie Funktionen wie PBKDF2
, password_hash
, Bcrypt
und ähnliche Funktionen. Es geht darum, den Angreifer dazu zu bringen, viel Zeit mit der Suche nach Passwörtern zu verbringen.
See: How to store your users’ passwords safely
aus der Präsentation Excerptiert "zur besseren Passwort-Anforderungen" von Jim Fenton Informationen basierend auf NIST SP 800-63-3 Draft-Dokument "Digital Authentifizierungsrichtlinien"
Do:
Require an 8 character min, >64 max with no truncation or 6 random digits
Use a dictionary to disallow common passwords against a dictionary list of 10M compromised passwords
Allow all printing characters (Unicode optional) + spaces but MAY canonicalize spaces out
Best to accept Unicode, including emojis (1 “character”/code point)
Limit failed authentication attempts to 100 in 30-day period per account
Offer option to display the secret while typing rather than dots or asterisks
Storing passwords:
Hash with 32-bit random salt using key derivation function such as
PBKDF2 with SHA-1, SHA-2 family, SHA-3 family
with at least 10,000 iterations
Don‘ t:
Require composition rules
Allow hints
Require routine password expiration
Save plain or hashed versions with or without seeding
See: Toward Better Password Requirements von Jim Fenton.
"ohne dieses Passwort im Klartext oder sogar einen Hash davon gespeichert zu haben" - warum? – mayersdesign
Sicherheitsgründe – jm8FE
Funktioniert das Hashing nicht? –