Zxcvbn for Elixir (Rust NIF) - fast password strength estimator

This is a port of the zxcvbn library, originally by Dropbox.

Unlike another similar package which was done in pure Elixir, this one is using zxcvbn-rs written in Rust and implemented as a NIF.

This was done mostly for fun, although the extra performance may be handy for low-latency apps and those using PhoenixLiveView. Difference in local benchmarks is 0-2ms vs 25-50ms depending on the password. If you don’t care about the difference, you can skip this package :nerd_face:

Hex: https://hex.pm/packages/zxcvbn_nif
HexDocs: https://hexdocs.pm/zxcvbn_nif
Source: https://github.com/svileng/zxcvbn

Hope someone finds it useful :v:

13 Likes

I just looked at the elixir impl. and without taking a deep dive it looks like there is room for potential performance improvements. Most of the code look like a 1 to 1 conversion from the coffee script, when you do that you gonna end up with code there is not optimazed for the beam, it might even be possible to simplify some of the code.

2 Likes