TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Correct Horse Battery Staple password generator

44 pointsby quantum5almost 5 years ago

19 comments

atoponcealmost 5 years ago
I audit web-based password generators as a hobby, and this one does well.<p>What it does well on:<p>The source code is open source licensed. Passwords are generated in the client, not on the server. The generator is random. The generator is cryptographically secure. The generator is unbiased. Mobile devices are supported. There are no JavaScript trackers loaded on the page. The site is not calling out to external resources without SRI.<p>Unfortunately, by only choosing 4 random words, the security margin of the passphrase is 52 bits (13 bits per word). This is practical for a hobbyist password cracker to exhaust in an offline attack. The security would be better if 6 random words were chosen instead.<p>Audit: <a href="https:&#x2F;&#x2F;docs.google.com&#x2F;spreadsheets&#x2F;d&#x2F;1ucaqJ4U3X3nNEbAAa06igbBkITHaA98blftOwT8u0I4&#x2F;edit?usp=sharing" rel="nofollow">https:&#x2F;&#x2F;docs.google.com&#x2F;spreadsheets&#x2F;d&#x2F;1ucaqJ4U3X3nNEbAAa06i...</a>
评论 #23542867 未加载
CPLXalmost 5 years ago
Can someone explain to me why 1password doesn&#x27;t have something like this built in? You can use words, or random&#x2F;symbols, but not both. Which fails miserably every time you&#x27;re faced with some sort of silly password requirement to have a symbol and a number and a capital or whatever.
评论 #23537818 未加载
评论 #23534772 未加载
评论 #23536718 未加载
staplersalmost 5 years ago
While I would love to use something like this, almost every site I can think of enforces worthless password rules like &quot;Must include number, letter, special character&quot; etc which effectively blocks these types of passwords.
评论 #23534471 未加载
评论 #23534580 未加载
评论 #23534427 未加载
评论 #23534697 未加载
评论 #23534545 未加载
mlacialmost 5 years ago
Problem with generators and this scheme, they allow regeneration. Most people not using the first version, they generate a new until they like it enough to stop, which is not that random anymore as they think.
评论 #23545239 未加载
评论 #23537273 未加载
quantum5almost 5 years ago
Background: I liked the xkcd-style password generation scheme as it was easy to remember, but existing generators online (that I could find, at least) all use Math.random() or other cryptographically insecure random number generators. While an actual attack on the RNG seems far-fetched, the very idea doesn&#x27;t sit well with my crypto nerd side. So I decided to create my own that uses a CSPRNG that I can trust. This was a while ago.<p>Recently, I decided to package it up with a nice domain name and publish it in hopes that it would be useful to others.
评论 #23534251 未加载
评论 #23537863 未加载
beardedwizardalmost 5 years ago
So we are really getting passwords from remote hosted websites? Are people really about to copy, paste and use these right out of the browser?
评论 #23537796 未加载
shaggyfrogalmost 5 years ago
Nice work!<p>A passphrase, as opposed to a password, has spaces between each word.<p>If you added those it would be easier to read, especially for mobile, if you used a multiline textarea, because the generated content isn’t fully readable at a glance. (Or don’t use a form input field at all — just put the passphrase in a div so the word breaks flow normally.)
评论 #23535571 未加载
评论 #23534868 未加载
chaoticmassalmost 5 years ago
I have bookmarked this site for my own personal use. I also shared it with my co-workers in the IT dept.<p>I think your site works well on selling itself if you assume the audience is coming from HN. From what I have observed, your site does not market itself well to a typical corporate IT dept who are not all programmers.<p>I think if we want to promote wider adoption of this good password technique, we&#x27;ll need a different approach.<p>This is not a criticism-- You&#x27;ve done a job I admire. I think I might fork it and make another version that is approachable to a wider audience. Thank you!
lozfalmost 5 years ago
Reminds me of the perl module `hsxkpasswd`[0] which has more configure options, and also powers the online generator at <a href="https:&#x2F;&#x2F;xkpasswd.net&#x2F;s&#x2F;" rel="nofollow">https:&#x2F;&#x2F;xkpasswd.net&#x2F;s&#x2F;</a><p>[0]: <a href="https:&#x2F;&#x2F;github.com&#x2F;bbusschots&#x2F;hsxkpasswd" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;bbusschots&#x2F;hsxkpasswd</a>
tzsalmost 5 years ago
For passwords I might have to enter by hand, such as WiFi passwords, I liked the pronounceable password option that 1Password used to have. The passwords were several single syllables string together by a separator. An example: neg-pen-nau-eng-fri-dot. There were options to change the separator, and to toss in digits and upper case if I remember correctly. Syllables were 2 to 4 letters long, I believe.<p>At some point 1Password dropped that, replacing it something similar to &quot;correct horse battery staple&quot;. It&#x27;s words (3-10) separated by hyphen, space, period, comma, or underscore. E.g., &quot;plasma.haggis.arrange.stultify&quot;.
评论 #23534619 未加载
chrisbaialmost 5 years ago
I rely on the built in password generator of Passfindr <a href="https:&#x2F;&#x2F;passfindr.com" rel="nofollow">https:&#x2F;&#x2F;passfindr.com</a> using the same random number generator as mentioned in correcthorse.pw. When using a Password Manager, and one should, different passwords for every internet account is straight forward.
arbirkalmost 5 years ago
You forgot the translate to Finnish step
ThA0x2almost 5 years ago
You can achieve this with a one-liner:<p>shuf -n 4 &#x2F;usr&#x2F;share&#x2F;dict&#x2F;words
评论 #23534650 未加载
评论 #23534665 未加载
评论 #23534608 未加载
评论 #23534446 未加载
评论 #23536690 未加载
评论 #23537369 未加载
评论 #23534476 未加载
评论 #23534664 未加载
评论 #23534416 未加载
professorTuringalmost 5 years ago
lower, upper and numbers = 62 options | wordlist = 10 000 options:<p><pre><code> 62^12 = 1e21 10 000^5 = 1e20 </code></pre> The problem is you not using a word generator and instead relying in your invention, most of the people will use top 5000 words (5000^5 = 1e18), imagine you can even lock one of the words (a color maybe?).<p>So this way of thinking might be good if you know what you are doing and use uppers and lowers and symbols, if not, it is actually a bad advice.
throwaway8941almost 5 years ago
If I may egregiously misuse the famous quote, &quot;those who do not understand Unix are condemned to reinvent it, poorly.&quot;<p><pre><code> $ shuf --random-source=&#x2F;dev&#x2F;urandom -n6 &#x2F;usr&#x2F;share&#x2F;dict&#x2F;cracklib-small | paste -sd- circulant-conjured-reigning-buzzed-awaiting-typifies</code></pre>
nlawalkeralmost 5 years ago
See also <a href="https:&#x2F;&#x2F;theworld.com&#x2F;~reinhold&#x2F;diceware.html" rel="nofollow">https:&#x2F;&#x2F;theworld.com&#x2F;~reinhold&#x2F;diceware.html</a> (the &quot;original&quot;, as far as I know).<p>KeePassXC has a passphrase generator, although it doesn&#x27;t use the Diceware list as far as I know. <a href="https:&#x2F;&#x2F;keepassxc.org&#x2F;images&#x2F;screenshots&#x2F;linux&#x2F;screen_006.png" rel="nofollow">https:&#x2F;&#x2F;keepassxc.org&#x2F;images&#x2F;screenshots&#x2F;linux&#x2F;screen_006.pn...</a><p>EDIT: Love the simplicity of <a href="https:&#x2F;&#x2F;correcthorse.pw&#x2F;" rel="nofollow">https:&#x2F;&#x2F;correcthorse.pw&#x2F;</a>, good work!
hprotagonistalmost 5 years ago
I tend to rely on <a href="https:&#x2F;&#x2F;www.rempe.us&#x2F;diceware&#x2F;#eff" rel="nofollow">https:&#x2F;&#x2F;www.rempe.us&#x2F;diceware&#x2F;#eff</a> for my typeable password needs.<p>80% of my passwords are just line noise, because they live in a keepass database. 20% (workstation account logins, etc) are diceware.
评论 #23534615 未加载
NickBuseyalmost 5 years ago
Shout out to the open source Bitwarden project which includes this out of the box. Check out bitwarden_rs for a good sefhosted option.
matmann2001almost 5 years ago
I know XKCD made a comic and everything, but isn&#x27;t this type of password exactly why dictionary attacks exist?
评论 #23534568 未加载
评论 #23534558 未加载
评论 #23534614 未加载