Skip to main content
PyCon US is happening May 14th-22nd in Pittsburgh, PA USA.  Learn more

Convert cryptographic keys to human-readable phrases, or generate random-yet-memorable passphrases

Project description

PyPI status Build status Documentation Status Updates

A Python port of Niceware, for generating random-yet-memorable passwords. Each word provides 16 bits of entropy, so a useful password requires at least 3 words.

Because the wordlist is of exactly size 2^16, Niceware is also useful for converting cryptographic keys and other sequences of random bytes into human-readable phrases. With Niceware, a 128-bit key is equivalent to an 8-word phrase.

Usage

To insall

$ pip install niceware

To generate an 8-byte passphrase

>>> import niceware
>>> niceware.generate_passphrase(8)
['deathtrap', 'stegosaur', 'nilled', 'nonscheduled']

or from the command line

$ niceware --words 5
tincturing distasting await trusser treadler

Niceware for Python uses os.urandom for entropy.

Credits

Niceware for Python is a port of Niceware, by yan.

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.2.1 (2017-03-25)

  • Add example command line usage

0.2.0 (2017-03-25)

  • Add niceware command to generate passphrase(s)

  • Add examples to docstrings

  • Mark Python 3.6 as supported

0.1.1 (2017-03-12)

  • README fixes, no code changes

0.1.0 (2017-03-11)

  • First release on PyPI.

Supported by

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