Skip to main content

Diceware Utilities

Build Status PyPI version shields.io PyPI license PyPI pyversions PyPI status

A collection of tools to make diceware passphrase conform with "password policy"

Update

  • (2017.05.22) Allow "weak" password generation.
>>> from diceware_utils.generate import GeneratePassword
>>> GeneratePassword().generate(weak=True)
'+"75ImposeRompSudoku'

Installation

pip install diceware_utils

or

pipenv install -e git+https://github.com/patarapolw/diceware_utils.git#egg=diceware_utils

Usage

>>> from diceware_utils.policy import Conformize
>>> conformize = Conformize()
>>> conformize.conformize(['unlikely', 'piezo', 'electric', 'grounds'])
';U$Piezo33lGrounds'
>>> conformize.update_policy(new_policy)
>>> from diceware_utils.wordlist import Wordlist
>>> Wordlist().get_random_word()
'ladybug'
>>> from diceware_utils.generate import GeneratePassword
>>> GeneratePassword().generate()
',Ab17HaRLanky-RoyalS'

Adapting to the policy of your choice

  • Policy is now updateable. It is of format:
both_upper_and_lower: true
digit_count: 2
punctuation_count: 2
length:
  min: 10
  max: 20

Database sources

leetspeak.yaml, policy.yaml and Conformization algorithm are original. Wordlists are taken from pwgen-passphrase, which belongs to the respective authors.

Main wordlist to generate the password is eff-long.txt, which is from Electronic Frontier Foundation.

Another interesting wordlist in this series is aspell-en.txt which is maintained by Kevin Atkinson. I exported these two files to the Android app below.

The idea of diceware password is from https://xkcd.com/936/.

Web demo

http://diceware-utils.herokuapp.com

Mobile application

Please see Keepass DX - memorable password -- an Android password manager with this generator.

I might plan to create a dedicated app for this password generator (probably without manager), because of the relatively slow start-up time of the SentenceMaker.

Related projects

  • randomsentence - a random sentence maker based on a list of keywords.

Metadata

Release files for diceware_utils 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for diceware_utils 0.6.0
File Size Uploaded
diceware_utils-0.6.0.tar.gz 1.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for diceware_utils 0.6.0
File Interpreter ABI Platform
diceware_utils-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 2.5 MB

Release files / diceware_utils-0.6.0.tar.gz

Download URL diceware_utils-0.6.0.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
973f99754bb17c12e228810e7e31fcf5d21f95d807b48ce263495f83611a2be6
BLAKE2b-256 checksum
How to use checksums
db004116abaf637ba744a1a943427cc3a3bd28dcc5198e6e1452def971e35f5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / diceware_utils-0.6.0-py3-none-any.whl

Download URL diceware_utils-0.6.0-py3-none-any.whl
Size 1.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
da500f60f8fe2c4e016996e9017ead833a12061ede182e6c4858edafec7aebb5
BLAKE2b-256 checksum
How to use checksums
027b7c2704437cbb9c59016506d63080350948892a372a94f41451fc4ae8a350
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page