我了解更多的 sha-rounds 使得在 /etc/shadow 中暴力破解散列密码变得困难。在执行sudo
命令和登录 Unix 帐户时,更高的轮次也会使用更多的 CPU 处理。但真正的沙轮是什么?该chpasswd
手册并没有真正给出 sha-rounds 的技术定义。
-s, --sha-rounds ROUNDS
Use the specified number of rounds to encrypt the passwords.
The value 0 means that the system will choose the default number of rounds for the crypt method (5000).
A minimal value of 1000 and a maximal value of 999,999,999 will be enforced.
You can only use this option with the SHA256 or SHA512 crypt method.
By default, the number of rounds is defined by the SHA_CRYPT_MIN_ROUNDS and SHA_CRYPT_MAX_ROUNDS variables in /etc/login.defs.
SHA-2 wiki 也没有真正说:
SHA-256 and SHA-512 ... use different shift amounts and additive constants, but their structures are otherwise virtually identical, differing only in the number of rounds.
在 chpasswd 手册和 SHA-2 wiki 中,没有足够的上下文来确定“sha-rounds”是什么或它们与 SHA512 的关系。