2012-09-28 76 views
1

口令似乎是傳統的 強密碼準則的一個很好的選擇。請參閱http://xkcd.com/936/以瞭解密碼與密碼短語的有趣對比。生成強密碼短語的工具?

有很多用於生成更多傳統密碼的工具(例如pwgen)。 當爲用戶提供良好的初始密碼時,此類工具很有用。

什麼工具可用於生成好的密碼?

您是否有使用它們的經驗或對其安全性或其他功能的瞭解?

+0

有關密碼和密碼主題的精彩討論,請訪問http://security.stackexchange.com/questions/6095/xkcd-936-short-complex-password-or-long-dictionary-passphrase –

+0

密碼短語是好,因爲可能的單詞的基礎是如此之大'combination = numberOfPossibleWords^numerOfWordsInPhrase'。所以每一個口令生成器都和它可以從中選擇單詞的字典一樣好。 – martinstoeckli

回答

1

我寫了一個基於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託管Perl模塊生成XKCD風格密語:

1

我最近公佈的一對夫婦的Perl腳本,gen-passwordgen-passphrase的,在GitHub上here

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

注意:到目前爲止,除我以外沒有人測試過這些腳本。我盡了最大的努力讓他們生成強大的密碼/密碼,但我什麼也沒有保證。

+0

看起來不錯。在快速閱讀看起來非常類似於我的腳本(也寫在Perl中)。我問了這個問題,在一個地方收集了這門課所有工具的信息。希望一個好的密碼生成器最終會在操作系統發行版中(與pwgen和其他密碼生成器一起)。 –