dropbox /zxcvbn

Low-Budget Password Strength Estimation

★ 16,090⑂ 1,004👁 260⑃ 117● 226▤ 11
下载:v4.4.2zxcvbn-4.4.2 ↓4.4.22017-02-07
+2
日增长
16,090
stars
1,004
forks
260
watchers
117
prs
226
issues
11
releases

README

_________________________________________________/\/\___________________
_/\/\/\/\/\__/\/\__/\/\____/\/\/\/\__/\/\__/\/\__/\/\________/\/\/\/\___
_____/\/\______/\/\/\____/\/\________/\/\__/\/\__/\/\/\/\____/\/\__/\/\_
___/\/\________/\/\/\____/\/\__________/\/\/\____/\/\__/\/\__/\/\__/\/\_
_/\/\/\/\/\__/\/\__/\/\____/\/\/\/\______/\______/\/\/\/\____/\/\__/\/\_
________________________________________________________________________





zxcvbn is a password strength estimator inspired by password crackers. Through pattern matching and conservative estimation, it recognizes and weighs 30k common passwords, common names and surnames according to US census data, popular English words from Wikipedia and US television and movies, and other common patterns like dates, repeats (aaa), sequences (abcd), keyboard patterns (qwertyuiop), and l33t speak.

Consider using zxcvbn as an algorithmic alternative to password composition policy — it is more secure, flexible, and usable when sites require a minimal complexity score in place of annoying rules like "passwords must contain three of {lower, upper, numbers, symbols}".

 __More secure__: policies often fail both ways, allowing weak passwords (P@ssword1) and disallowing strong passwords.
 __More flexible__: zxcvbn allows many password styles to flourish so long as it detects sufficient complexity — passphrases are rated highly given enough uncommon words, keyboard patterns are ranked based on length and number of turns, and capitalization adds more complexity when it's unpredictaBle.
 __More usable__: zxcvbn is designed to power simple, rule-free interfaces that give instant feedback. In addition to strength estimation, zxcvbn includes minimal, targeted verbal feedback that can help guide users towards less guessable passwords.

For further detail and motivation, please refer to the USENIX Security '16 paper and presentation.

At Dropbox we use zxcvbn (Release notes) on our web, desktop, iOS and Android clients. If JavaScript doesn't work for you, others have graciously ported the library to these languages:

 zxcvbn-python (Python)
 zxcvbn-cpp (C/C++/Python/JS)
 zxcvbn-c (C/C++)
 zxcvbn-rs (Rust)
 zxcvbn-go (Go)
 zxcvbn4j (Java)
 nbvcxz (Java)
 zxcvbn-ruby (Ruby)
 zxcvbn-js (Ruby [via ExecJS])
 zxcvbn-ios (Objective-C)
 zxcvbn-cs (C/.NET)
 szxcvbn (Scala)
 zxcvbn-php (PHP)
 zxcvbn-api (REST)
 ocaml-zxcvbn (OCaml bindings for zxcvbn-c)

Integrations with other frameworks:
 angular-zxcvbn (AngularJS)

 Installation

zxcvbn detects and supports CommonJS (node, browserify) and AMD (RequireJS). In the absence of those, it adds a single function zxcvbn() to the global namespace.

 Bower

Install node and bower if you haven't already.

Get zxcvbn:

 shell
cd /path/to/project/root
bower install zxcvbn


Add this script to your index.html:

 html




To make sure it loaded properly, open in a browser and type zxcvbn('Tr0ub4dour&3') into the console.

To pull in updates and bug fixes:

 shell
bower update zxcvbn


Top issues

Latest release

v4.4.2 v4.4.2 2017-02-07
- minor bug fixes

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON