PASSWORD_HASHERSのベンチマーク
BCryptPasswordHasher、PBKDF2PasswordHasher、PBKDF2SHA1PasswordHasherが遅い。
その他は桁違いに速いが、後方互換性のために実装が用意されているだけで、セキュリティ上使うべきでないとコメントされている。
## user sys total real PBKDF2PasswordHasher 12.1800 0.0300 12.2100 12.2704 PBKDF2SHA1Passwor... 10.9300 0.0200 10.9500 10.9721 BCryptPasswordHasher 34.8800 0.0700 34.9500 35.2495 SHA1PasswordHasher 0.0100 0.0000 0.0100 0.0201 MD5PasswordHasher 0.0100 0.0100 0.0200 0.0196 UnsaltedSHA1Passw... 0.0000 0.0000 0.0000 0.0006 UnsaltedMD5Passwo... 0.0000 0.0000 0.0000 0.0003 CryptPasswordHasher 0.0100 0.0100 0.0200 0.0088 ## Ranking real UnsaltedMD5PasswordHasher 0.0003 (100.0%) ************************* UnsaltedSHA1PasswordHasher 0.0006 ( 56.4%) ************** CryptPasswordHasher 0.0088 ( 4.0%) * MD5PasswordHasher 0.0196 ( 1.8%) SHA1PasswordHasher 0.0201 ( 1.7%) PBKDF2SHA1PasswordHasher 10.9721 ( 0.0%) PBKDF2PasswordHasher 12.2704 ( 0.0%) BCryptPasswordHasher 35.2495 ( 0.0%) ## Ratio Matrix real [01] [02] [03] [04] [05] [06] [07] [08] [01] UnsaltedMD5PasswordHasher 0.0003 100.0% 177.2% 2518.6% 5631.8% 5759.3% 3145603.6% 3517817.5% 10105762.6% [02] UnsaltedSHA1PasswordHasher 0.0006 56.4% 100.0% 1421.6% 3178.7% 3250.7% 1775469.9% 1985558.3% 5703985.6% [03] CryptPasswordHasher 0.0088 4.0% 7.0% 100.0% 223.6% 228.7% 124895.3% 139674.0% 401246.5% [04] MD5PasswordHasher 0.0196 1.8% 3.1% 44.7% 100.0% 102.3% 55854.5% 62463.6% 179441.6% [05] SHA1PasswordHasher 0.0201 1.7% 3.1% 43.7% 97.8% 100.0% 54617.5% 61080.3% 175467.7% [06] PBKDF2SHA1PasswordHasher 10.9721 0.0% 0.0% 0.1% 0.2% 0.2% 100.0% 111.8% 321.3% [07] PBKDF2PasswordHasher 12.2704 0.0% 0.0% 0.1% 0.2% 0.2% 89.4% 100.0% 287.3% [08] BCryptPasswordHasher 35.2495 0.0% 0.0% 0.0% 0.1% 0.1% 31.1% 34.8% 100.0%