Pet*_*ter 22 password openssl md5
我一直在想,为什么每次运行“echo 'helloworld' | openssl passwd -1 -stdin”都会产生不同的结果?如果我将任何哈希值放在 /etc/shadow 中,我可以将它们用作我的密码和登录到我的系统,它是如何工作的?
computer:/ user$ echo 'helloworld' | openssl passwd -1 -stdin
$1$xlm86SKN$vzF1zs3vfjC9zRVI15zFl1
computer:/ user$ echo 'helloworld' | openssl passwd -1 -stdin
$1$/0.20NIp$pd4X9xTZ6sF8ExEGqAXb9/
computer:/ user$ echo 'helloworld' | openssl passwd -1 -stdin
$1$sZ65uxPA$pENwlL.5a.RNVZITN/zNJ1
computer:/ user$ echo 'helloworld' | openssl passwd -1 -stdin
$1$zBFQ0d3Z$SibkYmuJvbmm8O8cNeGMx1
computer:/ user$ echo 'helloworld' | openssl passwd -1 -stdin
$1$PfDyDWER$tWaoTYym8zy38P2ElwoBe/
Run Code Online (Sandbox Code Playgroud)
我认为因为我使用这个哈希值向系统描述我的密码应该是什么,所以我每次都应该得到相同的结果。我为什么不呢?
Mic*_*ton 37
他们都有不同的盐。每次都选择一种独特的盐,因为盐不应重复使用。为每个密码使用唯一的盐使它们能够抵抗彩虹表攻击。
| 归档时间: |
|
| 查看次数: |
2928 次 |
| 最近记录: |