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

#java# 规范 1.8.4 条修订建议 #40

Open
hyfree opened this issue May 29, 2021 · 0 comments
Open

#java# 规范 1.8.4 条修订建议 #40

hyfree opened this issue May 29, 2021 · 0 comments

Comments

@hyfree
Copy link

hyfree commented May 29, 2021

1、问题描述
建议采用随机盐+明文密码进行多轮哈希后存储密码。

2、解决建议

【必须】随机盐必须是符合密码学安全的随机数。禁止使用Random类生产。
【必须】随机盐的长度不能太短,建议至少256比特。
【建议】盐值至少和哈希函数的输出一样长
【必须】每次使用的盐必须随机化和一次性,禁止使用共享的随机盐,注册或者修改密码时,都应该使用新的盐值进行加密。
【必须】使用哈希函数必须是sha256或以上
【建议】建议使用受业界认可的慢哈希算法
【建议】多轮的次数应该充分多
【建议】可以记录多轮的次数和加密算法,以便进行后续的维护升级

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

1 participant