Giter Site home page Giter Site logo

fastword's Introduction

Fastword

This is a simple diceword passphrase generator script which uses a limited dictionary to create easy-to-memorize and fast-to-type passphrases of known entropy.

Installation

Just clone the repo and run from the repo root.

Usage

./fastword.rb [word count (default 5)]

Goals

  1. Memorability
  2. Ease of typing
  3. Known password strength

Premises

  1. Grammatical differences are hard to memorize
  2. Abstract words are harder to remember than multiple concrete words
  3. Even a long password is fast to type if it contains only lower case letters and is made of real words

For example, here is a randomly generated four word traditional diceware passphrase (51.7 bits of entropy):

reacquire relapsing evacuee boondocks

Here is a six word passphrase generated by fastword (52.5 bits):

fish nod rope cut hope suit

This passphrase contains more words, but because it is limited to short words, it actually ends up being shorter โ€“ even with spaces (more on that later). And because the words in the dictionary are chosen to be concrete, it is easier to remember the fastword phrase.

By contrast, the traditional diceware password is hard to memorize. Not only do you have to remember the concept of "acquire", but you have to remember that it's "reacquire". Not only do you have to somehow incorporate "relapse" into a memorable concept, you have to remember that it's "relapsing", not "relapse", "relapsed", or "relapses". And that's to say nothing of "evacuee" and "boondocks".

The dictionary

The dictionary is chosen to fit the following properties:

  1. All words are relatively common
  2. All words should be easy to incorporate into a mental image
  3. All verbs are infinitives, all nouns are singular. No grammatical nuance should be required to remember your password.
  4. The list of words satisfies the "uniqueness" property tested by proveunique.rb. See below for further details, but this means that passwords generated can be used without spaces or uppercase letters without loss of entropy.

The resulting dictionary is just 431 words long. Compare that to the EFF's long word list, which is 7776 words. That means that fastword has fewer bits of entropy per word. But because the effect of dictionary size is logarithmic, growing the dictionary has diminishing returns. Fastword's dictionary provides ~8.75 bits of entropy per word, while the EFF dictionary provides ~12.92.

The result is that fastword passphrases need about 50% more words to achieve the same strength. But in exchange, it never forces you to memorize and type a word like "vagrantly" or "extenuate".

Uniqueness

This section is going to get a little bit in the weeds, so here's the tl;dr: Every time it is updated, the word list is tested to make sure that it is safe to use generated passphrases without spaces or uppercase letters. That is, you can type the example passhprase above as fishnodropecuthopesuit without weakening the password.

Included in this repo is the script proveunique.rb. This checks to ensure that it is not possible to generate multiple passwords with the current list which have the same sequence of letters.

For example, if you add the word "hate" to the word list, this property is lost, because you can generate both:

  • hat ear man tar meat
  • hate arm ant arm eat

Therefore, for the reported entropy of 43.77 bits to be accurate, you must type those phrases with either spaces, or capitalization to separate the words (i.e. HatEarManTarMeat vs HateArmAntArmEat).

Disclaimer

Use this at your own risk. This script is small side project I made for my own personal use. There may be errors in implementation which I'm unaware of which significantly weaken the passphrases generated. I encourage you to read the code yourself and convince yourself of its correctness before using it.

fastword's People

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.