Skip to main content

Generate diceware wordlists.

Project description

diceware-list

Build Status sources | issues

Create wordlists for diceware in a reproducable and easy manner.

This is not a diceware implementation, but only a helper to create appropriate wordlists.

The main target of diceware-list is to provide “good” wordlists. Wordlists are considered “good” if they

  • contain enough terms for use with a certain diceware application (for instance 6^6 = 7776 terms if used with six dice)

  • contain terms as short as possible (to reduce typing)

  • (optionally) contain no words with non-ASCII chars (to enable use with non-localized keyboards)

  • contain no offending terms

The wordlists generated by diceware-list are not meant to be kept secret. You might put them on the internet, publish on facebook or print them in the New York Times. Instead the security of the diceware technique relies on the entropy or (in this case) “randomness” of your dice, computer, etc.

In other words: Your passphrases will not be safe because of hiding your wordlist. They will be safe because there are so many possible combinations of words you can pick from your wordlist. That means: longer lists are more secure than shorter ones (if really used to full extent by your source of randomness with diceware).

Install

Clone repository from github:

$ git clone https://github.com/ulif/diceware-list.git

Please consider using virtualenv for deployment.

In an active virtualenv you can install an executable script of diceware-list running:

(venv) $ python setup.py install
(venv) $ diceware_list --help
usage: diceware_list [-h] [-l LENGTH] [-k] [--use-416] [-v] DICTFILE

But you can also run the one and only script directly:

$ python diceware_list.py --help
usage: diceware_list [-h] [-l LENGTH] [-k] [--use-416] [-v] DICTFILE

Usage

First, you need a file with words as “dictionary”. On typical Debian systems such files can be found in /usr/share/dicts/.

This file can then be fed to diceware-list to create a wordlist suitable for use with diceware.:

$ python diceware_list.py /usr/share/dict/words
!
!!
!!!
...
alan
alana
alar
...
zzz
zzzz

By default lists of 8192 (=2**13) words are created. This value can be changed with the -l option.

With -n you can tell diceware_list to put numbers into each line, representing dice throws [1]

$ python diceware_list.py -n -l 7776 /usr/share/dict/words
11111 !
11112 !!
...
12353 alan
12354 alana
12355 alar
...
66665 zzz
66666 zzzz

See –help for other options.

diceware_list follows loosely the recommendations given on http://diceware.com/ by Mr. Reinhold.

Testing

Tests require py.test being installed. In an activated virtualenv it can be installed with pip:

(venv)$ pip install pytest

Afterwards, you can run tests like so:

(venv)$ py.test

If you also install tox:

(venv)$ pip install tox

then you can run all tests for all supported platforms at once:

(venv)$ tox

Coverage

To get a coverage report, you can use the respective py.test plugin:

(venv)$ pip install pytest-cov
(venv)$ py.test --cov=diceware_list.py --cov-report=html

Skip the –cov-report option (or use term or term-missing instead of html) to get a report on commandline.

Changes

0.1 (2016-02-09)

  • Initial release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

diceware_list-0.1.tar.gz (27.8 kB view hashes)

Uploaded Source

Built Distribution

diceware_list-0.1-py3-none-any.whl (9.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page