Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

md5 hash method is not secure #154

Open
wzxjohn opened this issue Mar 23, 2017 · 5 comments
Open

md5 hash method is not secure #154

wzxjohn opened this issue Mar 23, 2017 · 5 comments

Comments

@wzxjohn
Copy link

wzxjohn commented Mar 23, 2017

Use md5(username + password) to store login password is not secure, please consider use sha256.
用 md5(username + password) 的方式存储密码是不安全的,建议至少使用 sha256.

@wzxjohn wzxjohn changed the title md5 hash method is not securit md5 hash method is not secure Mar 23, 2017
@gyteng
Copy link
Collaborator

gyteng commented Mar 23, 2017

因为第一个版本用的是这种方法,现在一直没有改动,已经在用的用户改动起来比较麻烦

@wzxjohn
Copy link
Author

wzxjohn commented Mar 24, 2017

可以通过登录时更新密码的方式平滑过度,或者直接再加盐 hash,脚本处理 DB 中已有记录。

@jemyzhang
Copy link

建议更新, 类似ss panel加盐的办法. 密码通过email取回的方法都是没问题的

@Codetector1374
Copy link

如果可以实现平滑过度的话是否可以改为Sha 256。 比如把储存密码的Column 格式改成 {method: 'sha256', hash:'xxxxxx', salt: ''} 如果看到旧格式就使用旧验证,如果验证成功就更新到新的格式

@zypA13510
Copy link

zypA13510 commented Jun 11, 2019

SHA256+salt就安全了?密码学原则:不要自己发明实施方法。
为什么不直接scrypt, bcrypt或PBKDF2
https://security.stackexchange.com/q/133239/117921

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants