【问题标题】:Tools for generating strong passphrases?生成强密码的工具?
【发布时间】:2012-09-20 17:03:50
【问题描述】:

密码短语似乎是传统的不错选择 强密码指南。请参阅http://xkcd.com/936/,了解密码与密码短语的有趣对比。

有许多工具可以生成更传统的密码(例如 pwgen。) 例如,当为用户提供良好的初始密码时,此类工具很有用。

有哪些工具可用于生成好的密码?

您是否有使用它们的经验或对其安全性或其他功能的见解?

【问题讨论】:

  • security.stackexchange.com/questions/6095/… 上有关于密码短语和密码主题的精彩讨论
  • 密码短语很好,因为可能单词的基数很大combinations = numberOfPossibleWords ^ numerOfWordsInPhrase。因此,每个密码短语生成器的好坏取决于它可以从中挑选单词的字典。

标签: passwords utility passphrase


【解决方案1】:

我最近在 GitHub here 上发布了几个 Perl 脚本 gen-passwordgen-passphrase

gen-passphrase 脚本可以满足您的需求。它需要三个参数:用作首字母序列的单词、最小长度和最大长度。例如:

$ gen-passphrase abcde 6 8
acrimony borrowed chasten drifts educable

或者您可以不指定首字母的情况下询问多个单词(我刚刚添加的一个新功能):

$ gen-passphrase 5 6 8
poplin outbreak aconites academic azimuths

它需要一个单词列表;如果存在,它默认使用/usr/share/dict/words。它默认使用/dev/urandom,但可以告诉它使用/dev/random。有关/dev/urandom/dev/urandom 的更多信息,请参阅我在superuser.com 上的this answer

注意:到目前为止,除了我之外,没有人测试过这些脚本。我已尽最大努力让他们生成强密码/密码,但我不保证。

【讨论】:

  • 看起来不错。快速阅读似乎与我的脚本非常相似(也是用 perl 编写的)。我问这个问题是为了在一个地方收集有关本课程中所有工具的信息。希望一个好的密码生成器最终会出现在操作系统发行版中(与 pwgen 和其他密码生成器一起)。
【解决方案2】:

我写了一个基于命令行的 Perl 脚本passphrase-generator

密码生成器默认只有 3 个单词,而不是 XKCD 建议的 4 个单词,但使用了在 /usr/share/dict/words 上的许多基于 linux 的系统中找到的更大字典。它还提供了对生成的密码短语的熵的估计。随机化基于 /dev/urandom 和 SHA1。

示例运行:

$ passphrase-generator 

Random passphrase generator

Entropy per passphrase is 43.2 bits (per word: 14.4 bits.)

For reference, entropy of completely random 8 character (very hard to memorize)
password of upper and lowercase letters plus numbers is 47.6 bits
Entropy of a typical human generated "strong" 8 character password is in the
ballpark of 20 - 30 bits.

Below is a list of 16 passphrases.
Assuming you select one of these based on some non random preference
your new passphrase will have entropy of 39.2 bits.

Note that first letter is always capitalized and spaces are
replaced with '1' to meet password requirements of many systems.

Goatees1maneuver1pods
Aught1fuel1hungers
Flavor1knock1foreman
Holding1holster1smarts
Vitamin1mislead1abhors
Proverbs1lactose1brat
... and so on 10 more

还有一些基于浏览器/javascript 的工具:

CPAN 托管一个用于生成 XKCD 风格密码的 Perl 模块:

【讨论】:

    猜你喜欢
    • 2011-01-17
    • 2020-12-12
    • 1970-01-01
    • 2017-06-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-03-13
    相关资源
    最近更新 更多