Skip to main content

A password generator inspired by https://xkcd.com/936/

Usage

Simply install the package with pip install makepass, then run the make_pass command:

$ make_pass
CorrectHorseBatteryStaple7

The password is written to stdout, from which it can be captured via your pipelined capture mechanism of choice.

Process & Constraints

Makepass generates a memorable, readable password by combining N unique, random common english words, which are sourced from the Google Common English Words repository. By default, the list of 20,000 english words is used. The set of words is constrained to words between m and n characters long, inclusive, to promote memorability and prevent common words. A random numeral is appended, to satisfy the common requirement that passwords contain a letter and a number. The final password will be between L and M characters long; up to S passwords are generated internally until a password of appropriate length is found.

All of the above can be configured; run make_pass -h for a list of the flags that modify its behavior, as well as options for display of entropy information

Defaults

All of the following parameters can be changed:

  • N = 4

  • m = 4

  • n = 8

  • L = 24

  • M = ∞

  • S = 10,000

  • Random numeral is appended

  • Random specical character is not appended

  • Word set: 20k. Can be repaced with the 10k set.

  • Special character set: -_()/.,?!;:. Should be accepted by most password filters.

These default parameters produce passwords with an entropy of approximately 57.561 bits.

Security Disclaimer

While I am confident in its basic soundness, makepass has not undergone any kind of security review or audit, and I am not an expert in the field of password security. Use at your own risk.

makepass is built around use of random.SystemRandom, which in turn is based on os.urandom. os.urandom is described by the Python documentation as “suitable for cryptographic use.” For more information about the use of os.urandom and /dev/urandom in secure contexts, see this article.

The most obvious security hole I’m currently aware of in makepass is that it writes to your terminal, which may be logged or cached to disk. Make sure to pipe it into a secure destintion when creating a password you actually intend to use; I’m personally partial to the say command on OSX, which speaks the password out loud through your speakers.

Release files for makepass 0.11.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 makepass 0.11.0
File Size Uploaded
makepass-0.11.0.tar.gz 82.8 kB Details

Built distribution (wheel)

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

Total release size: 168.4 kB

Release files / makepass-0.11.0.tar.gz

Download URL makepass-0.11.0.tar.gz
Size 82.8 kB
Tags Source
SHA-256 checksum
How to use checksums
04d8d01795c09b88e825fb735219e19d2fc4b317461cd0e891afc7fcf8235b99
BLAKE2b-256 checksum
How to use checksums
c953cf67a4c4879c7681243edeff440d714cc22e13d2685406f443d6e7ef3da8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / makepass-0.11.0-py3-none-any.whl

Download URL makepass-0.11.0-py3-none-any.whl
Size 85.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ac0d8c8f41c3196a3083f3e10d3c3f0e4fafb030d160f173f48ee7fe9c5665bd
BLAKE2b-256 checksum
How to use checksums
3e991167265f0bb7ce5fd70990a9df98d117eacb49c1caedcd1b45dd0a75f921
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.11.0 This release

2 release files

0.10.2

2 release files

0.9.8

2 release files

0.9.7

2 release files

0.9.6

2 release files

0.9.5

2 release files

0.9.4

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 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