<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Fayaz on Medium]]></title>
        <description><![CDATA[Stories by Fayaz on Medium]]></description>
        <link>https://medium.com/@fmfayaz24?source=rss-7c543ea09805------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*zwahlTOUzCb7TCNC.jpg</url>
            <title>Stories by Fayaz on Medium</title>
            <link>https://medium.com/@fmfayaz24?source=rss-7c543ea09805------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 05:07:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@fmfayaz24/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[I built a 3KB alternative to replace zxcvbn (389KB) without detection loss]]></title>
            <link>https://medium.com/@fmfayaz24/i-built-a-3kb-alternative-to-replace-zxcvbn-389kb-without-detection-loss-9a6ab6f44e55?source=rss-7c543ea09805------2</link>
            <guid isPermaLink="false">https://medium.com/p/9a6ab6f44e55</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Fayaz]]></dc:creator>
            <pubDate>Thu, 11 Jun 2026 04:40:03 GMT</pubDate>
            <atom:updated>2026-06-11T04:40:03.992Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*CjwqHCFFxj_m2Btt" /><figcaption>Photo by <a href="https://unsplash.com/@yuya_uzu?utm_source=medium&amp;utm_medium=referral">Yuya Uzu</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>zxcvbn is the most widely used password strength estimator with ~1M npm downloads a week. It’s also 389KB gzipped and hasn’t shipped a commit since 2017. Most sign-up forms are hauling that around just to block password123.</p><p>Poor password UX is a real conversion problem. A strength meter that adds 389KB to your bundle delays page load — on mobile, measurably so. Users who hit a slow registration page don’t wait. They leave. The irony is that most of that weight goes toward catching passwords nobody is actually using to register on your site.</p><p>So I built <a href="https://github.com/Fayazzzzz/passcore">passcore</a> — 3.0KB gzipped and 98.4% detection rate on real breach data — same as zxcvbn, benchmarked against a deduped list of passwords pulled live from RockYou, Adobe, HIBP, and other major leak lists.</p><p>zxcvbn takes ~9.7ms to load — it’s parsing 389KB of dictionary into memory on every cold start. passcore loads in ~0.2ms. It evaluates a password in ~2,600 nanoseconds. For a registration form, it’s effectively invisible — no jank, no layout shift, no contribution to your Core Web Vitals score. The strength meter shows up before the user finishes typing their first character.</p><p><strong>How it works:</strong></p><p>passcore runs five detection layers on every password:</p><ol><li>Dictionary — All entries sourced directly from breach data, not a generic word list</li><li>Keyboard patterns — qwerty , asdf , 1234 , numpad walks</li><li>Repeats - aaaa , ababab</li><li>Sequences - abcdef , 123456</li><li>L33t speak - decodes p@ssw0rd → password , m0nk3y → monkey , then dictionary lookup</li></ol><p>The dictionary is small by design. Every entry was chosen because it appears in real breach data — not because it’s a common English word. Password1! is caught not by a 40k word list but by stripping the suffix and checking if the core word is in the breach list. It is.</p><p><strong>The scoring model:</strong></p><p>passcore returns a score from 0 to 4 — same scale as zxcvbn.</p><p>The detection layers run first. A dictionary match, keyboard pattern, repeat, sequence, or l33t substitution scores 0 or 1 immediately — no further calculation. If none of those fire, scoring falls through to length and character variety: uppercase, lowercase, digits, symbols. A password that clears all five layers but is only 6 characters long still scores low.</p><p>There’s also a length floor, aligned with NIST SP 800–63B: passwords 20+ characters score at least 3, passwords 30+ characters score 4, regardless of character variety. A passphrase like correct-horse-battery-staple is vastly harder to crack than P@ss1 - the scoring reflects that.</p><p><strong>The research:</strong></p><p>Getting to 98.4% detection required more than a dictionary lookup. A few problems that came up during development:</p><p><em>Word+affix patterns:</em> Password1!, Admin123, Welcome1 - extremely common in breach data, none of them are in any dictionary as-is. The fix was a matchCommonRoot layer: strip leading and trailing non-alpha characters, check if what&#39;s left is a breach word. It is, every time, for this class of password.</p><p><em>L33t speak with separators:</em> N0=Acc3ss decodes to no=access. A naive l33t decoder finds no dictionary match and passes it. The fix was to split the decoded string on non-alpha characters and check each segment independently. access is in the breach list. Caught.</p><p><em>Missing critical roots:</em> Running against real breach lists exposed that admin, test, user, login, pass weren&#39;t in the dictionary - meaning Admin123, test1234, user2024 all slipped through. Added those five. Caught.</p><p><strong>Switching from zxcvbn to passcore looks like this:</strong></p><pre>// before<br>import zxcvbn from &#39;zxcvbn&#39;;<br>const { score } = zxcvbn(password);<br><br>// after<br>import { passcore } from &#39;passcorelib&#39;;<br>const { score } = passcore(password);</pre><p>One caveat: result.feedback.warning becomes result.warning, making it one level flatter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lX363zuCvbgxcN0sjbclUQ.png" /><figcaption>Benchmark report</figcaption></figure><p><strong>The tradeoff:</strong></p><p>The tradeoff is dictionary size: 329 entries vs 40k+. But the passwords responsible for most credential stuffing aren’t obscure literary references — they’re Password1!, baseball123, keyboard walks, and l33t variants of the top breach list. passcore catches those.</p><p>So that’s the bet passcore makes: that 329 targeted entries catch more of what actually matters than 40,000 words that cover everything, including passwords no one uses and/or no attacker is trying. The benchmark agrees — 98.4% detection rate across 370 real breach passwords, same as zxcvbn, at 130x less weight. For the 1% that need exhaustive coverage, use zxcvbn.</p><blockquote><strong><em>TL;DR</em></strong><em> — zxcvbn is 389KB and abandoned. passcore is 3KB, same detection rate, actively maintained. If bundle size matters to you, it’s a near drop-in swap.</em></blockquote><blockquote><a href="https://github.com/Fayazzzzz/passcore"><em>GitHub</em></a><em> · </em><a href="https://www.npmjs.com/package/passcorelib"><em>npm</em></a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9a6ab6f44e55" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>