zxcvbn

  1. zxcvbn
    1. Author
    2. Repository
    3. Description
    4. Usage
      1. Entropy Estimation

Author

Thomas Chust

Repository

https://chust.org/repos/chicken-zxcvbn

Description

This egg is a CHICKEN wrapper around zxcvbn-c. The C source code for zxcvbn is included in the egg.

Usage

 (import zxcvbn)

Entropy Estimation

[procedure] (zxcvbn-match passwd #!optional [userdict '()])

Match the string passwd against the internal dictionaries, the optional list of words in userdict, and automatically generated variations thereof. Return an inexact number of bits that is an estimate for the entropy in the password — the higher the better.

[procedure] (zxcvbn-match* passwd #!optional [userdict '()])

Match the string passwd against the internal dictionaries, the optional list of words in userdict, and automatically generated variations thereof. In addition to the entropy estimate returned by zxcvbn-match, a second return value provides information about the matching process.

The match information return value is a list of lists, each of which has the following structure:

 ([*] type begin length entropy multipart-entropy)

If the list starts with a literal *, it indicates a repeated match.

The type can be one of the following symbols: brute, dict, dict/leet, user, user/leet, repeats, sequence, spatial, date, year.

begin and length indicate the start position in the passwd string and the length of the match in bytes.

entropy and multipart-entropy are estimates for the entropy contribution of the individual match.