xkcd-phrase


Namexkcd-phrase JSON
Version 1.0.0 PyPI version JSON
download
home_page
SummaryGenerate secure multiword passphrases, inspired by XKCD
upload_time2023-02-04 23:11:54
maintainer
docs_urlNone
author
requires_python>=3.8
license
keywords xkcd passphrase
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # xkcd-phrase

A flexible and scriptable password generator which generates strong passphrases, inspired by [XKCD 936][xkcd].

```
$ xkcd-phrase
Move Barbed Unplug Huskiness 
```

This password generator is inspired by [XKCD 936][xkcd] and the version provided by [Adam Birds](https://github.com/adambirds/xkcd-pass-python) With the original code from [redacted/xkcd-password-generator](https://github.com/redacted/XKCD-password-generator).. The defaults have been configured in a way to give this tool the most compatibility out of the box with passphrase requirements and the flexibility to adjust for site specific requirements. The defaults provide:
* A phrase containing 4 words between 4 and 9 characters (The default wordfile `eff-long` only contains words between 4 and 9 characters).
* The first letter of each word is capitalized.
* A seperator for human readability.

This allows the phrase generator to provide phrases by default which will be strong, easy to remember, difficult to brute-force and still pass the usual requirements of at least one upper-case letter, one lower-case letter and a special character.

[xkcd]: https://xkcd.com/936/
![](https://imgs.xkcd.com/comics/password_strength.png)


## Install
`xkcd-phrase` can easily be installed with the following command:

```
pip install xkcd-phrase
```

or manually by:

```
python -m pip install <path><package>
```

## Source
The source code can be found [here](https://github.com/pauljosephanderson/xkcd-phrase).

## Requirements
Python 3 (Version 3.8 or later).

## Running `xkcd_phrase`
`xkcd-phrase` can be called with no arguments with an output using the default wordfile and settings.
```
$ xkcd-phrase
> Spiffy Deceit Unease Pushover
```
The default settings return a single phrase made up of 4 words each having: its first letter capitalized and spaces between the words for readability.

It can also be called with a mixture of multiple arguments for example:

```
$ xkcd-phrase -d _ -c 5 --min 5 --max 7 --numeric-char-num 4 --numeric-char-append
Cause_Resale_Moody_Arise6814
Suggest_Bundle_Cruelly_Suggest4674
Sleeve_Resort_Plastic_Drool5351
Hazily_Skimmed_Islamic_Gigolo6475
Salvage_Sphinx_Tightly_Banter9381
```

This will return:
* `-d _` words joined by `_`.
* `-c 5` 5 passwords to choose from.
* `--min 5 --max 7` words between 5 and 7 characters long.
* `--numeric-char-num 4` Include 4 numerical characters in the passphrase.
* `--numeric-char-append` Include the numerics on the end of the passphrase.

```
$ xkcd-phrase -V -n 6 --numeric-char-num 2 --special-char-num 2
The total possible number of symbol choices in the phrase is
77 possible symbols comprising:
        52 alphabetic characters
        10 numeric characters
        15 special characters

The phrase length is 53 with the entropy of the phrase is calculated as:
        log2(possible_symb (77) ^ phrase_len (53)) = 332.14

The phrase is: I)licit0y Dugout Reproduce Overfed De:al Sque3ze
```

This will return:
* `-V` verbose output explaining the entropy of the passphrase.
* `-n 6` Use 6 words in the phrase.
* `--numeric-char-num 2` Include 2 numerical characters in the passphrase.
* `--special-char-num 2` Include 2 special characters in the passphrase..
* Note the default behaviour to substitute the numeric and special characters randonly into words.

As an aide memoire, you can choose an acrostic for example:
```
$ xkcd-phrase -a queen
> Quadrant Uncover Enforced Excretion Nacho
```


A full overview of the available options can be accessed by running following command:

```
xkcd-phrase --help
```

## Bash-Completion
`xkcd-phrase` also supports bash-completion. To set this up you need to add the below to your `.bashrc` file:

```
eval "$(register-python-argcomplete xkcd-phrase)"
```

This will then take effect the next time you login. To enable bash-completion immediately, you can run:

```
source .bashrc
```

## Word Lists

Several word lists are provided with the package. The default, eff-long, was specifically designed by the EFF for [passphrase generation](https://www.eff.org/deeplinks/2016/07/new-wordlists-random-passphrases) and is licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/us/). As it was originally intended for use with Diceware ensure that the number of words in your passphrase is at least six when using it. Two shorter variants of that list, eff-short and eff-special, are also included. Please refer to the EFF documentation linked above for more information.

Note that `xkcd-phrase` can be used with any word file of the correct format: a file containing one word per line.

## Changelog

* **Version 1.0.0**
    * Initial Release

## License

This project is released under the [GNU GENERAL PUBLIC LICENSE v3](https://github.com/pauljosephanderson/xkcd-phrase/blob/main/LICENSE). However the original code from [redacted/xkcd-password-generator](https://github.com/redacted/XKCD-password-generator) is licensed under the [BSD 3-Clause license](https://github.com/pauljosephanderson/xkcd-phrase/blob/main/LICENSE.BSD).

## Contributing

Contributions welcome and gratefully appreciated!

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "xkcd-phrase",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "xkcd,passphrase",
    "author": "",
    "author_email": "Paul Anderson <p.anderson@iinet.net.au>",
    "download_url": "https://files.pythonhosted.org/packages/84/3f/c1abb22249f43f8763cd921a1ef55934eef500952ee5a059a6d51bb5a0e6/xkcd-phrase-1.0.0.tar.gz",
    "platform": null,
    "description": "# xkcd-phrase\n\nA flexible and scriptable password generator which generates strong passphrases, inspired by [XKCD 936][xkcd].\n\n```\n$ xkcd-phrase\nMove Barbed Unplug Huskiness \n```\n\nThis password generator is inspired by [XKCD 936][xkcd] and the version provided by [Adam Birds](https://github.com/adambirds/xkcd-pass-python) With the original code from [redacted/xkcd-password-generator](https://github.com/redacted/XKCD-password-generator).. The defaults have been configured in a way to give this tool the most compatibility out of the box with passphrase requirements and the flexibility to adjust for site specific requirements. The defaults provide:\n* A phrase containing 4 words between 4 and 9 characters (The default wordfile `eff-long` only contains words between 4 and 9 characters).\n* The first letter of each word is capitalized.\n* A seperator for human readability.\n\nThis allows the phrase generator to provide phrases by default which will be strong, easy to remember, difficult to brute-force and still pass the usual requirements of at least one upper-case letter, one lower-case letter and a special character.\n\n[xkcd]: https://xkcd.com/936/\n![](https://imgs.xkcd.com/comics/password_strength.png)\n\n\n## Install\n`xkcd-phrase` can easily be installed with the following command:\n\n```\npip install xkcd-phrase\n```\n\nor manually by:\n\n```\npython -m pip install <path><package>\n```\n\n## Source\nThe source code can be found [here](https://github.com/pauljosephanderson/xkcd-phrase).\n\n## Requirements\nPython 3 (Version 3.8 or later).\n\n## Running `xkcd_phrase`\n`xkcd-phrase` can be called with no arguments with an output using the default wordfile and settings.\n```\n$ xkcd-phrase\n> Spiffy Deceit Unease Pushover\n```\nThe default settings return a single phrase made up of 4 words each having: its first letter capitalized and spaces between the words for readability.\n\nIt can also be called with a mixture of multiple arguments for example:\n\n```\n$ xkcd-phrase -d _ -c 5 --min 5 --max 7 --numeric-char-num 4 --numeric-char-append\nCause_Resale_Moody_Arise6814\nSuggest_Bundle_Cruelly_Suggest4674\nSleeve_Resort_Plastic_Drool5351\nHazily_Skimmed_Islamic_Gigolo6475\nSalvage_Sphinx_Tightly_Banter9381\n```\n\nThis will return:\n* `-d _` words joined by `_`.\n* `-c 5` 5 passwords to choose from.\n* `--min 5 --max 7` words between 5 and 7 characters long.\n* `--numeric-char-num 4` Include 4 numerical characters in the passphrase.\n* `--numeric-char-append` Include the numerics on the end of the passphrase.\n\n```\n$ xkcd-phrase -V -n 6 --numeric-char-num 2 --special-char-num 2\nThe total possible number of symbol choices in the phrase is\n77 possible symbols comprising:\n        52 alphabetic characters\n        10 numeric characters\n        15 special characters\n\nThe phrase length is 53 with the entropy of the phrase is calculated as:\n        log2(possible_symb (77) ^ phrase_len (53)) = 332.14\n\nThe phrase is: I)licit0y Dugout Reproduce Overfed De:al Sque3ze\n```\n\nThis will return:\n* `-V` verbose output explaining the entropy of the passphrase.\n* `-n 6` Use 6 words in the phrase.\n* `--numeric-char-num 2` Include 2 numerical characters in the passphrase.\n* `--special-char-num 2` Include 2 special characters in the passphrase..\n* Note the default behaviour to substitute the numeric and special characters randonly into words.\n\nAs an aide memoire, you can choose an acrostic for example:\n```\n$ xkcd-phrase -a queen\n> Quadrant Uncover Enforced Excretion Nacho\n```\n\n\nA full overview of the available options can be accessed by running following command:\n\n```\nxkcd-phrase --help\n```\n\n## Bash-Completion\n`xkcd-phrase` also supports bash-completion. To set this up you need to add the below to your `.bashrc` file:\n\n```\neval \"$(register-python-argcomplete xkcd-phrase)\"\n```\n\nThis will then take effect the next time you login. To enable bash-completion immediately, you can run:\n\n```\nsource .bashrc\n```\n\n## Word Lists\n\nSeveral word lists are provided with the package. The default, eff-long, was specifically designed by the EFF for [passphrase generation](https://www.eff.org/deeplinks/2016/07/new-wordlists-random-passphrases) and is licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/us/). As it was originally intended for use with Diceware ensure that the number of words in your passphrase is at least six when using it. Two shorter variants of that list, eff-short and eff-special, are also included. Please refer to the EFF documentation linked above for more information.\n\nNote that `xkcd-phrase` can be used with any word file of the correct format: a file containing one word per line.\n\n## Changelog\n\n* **Version 1.0.0**\n    * Initial Release\n\n## License\n\nThis project is released under the [GNU GENERAL PUBLIC LICENSE v3](https://github.com/pauljosephanderson/xkcd-phrase/blob/main/LICENSE). However the original code from [redacted/xkcd-password-generator](https://github.com/redacted/XKCD-password-generator) is licensed under the [BSD 3-Clause license](https://github.com/pauljosephanderson/xkcd-phrase/blob/main/LICENSE.BSD).\n\n## Contributing\n\nContributions welcome and gratefully appreciated!\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Generate secure multiword passphrases, inspired by XKCD",
    "version": "1.0.0",
    "split_keywords": [
        "xkcd",
        "passphrase"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b6d4674cbb13912e2916310e0ea3bdb225a7799cd702699b3d28d8b0d15eb093",
                "md5": "64bb939b6383a1e3167b658615ecea37",
                "sha256": "c5c523882db344fbe5e5536d5dea3eeb26b24d762a1c06f0bb6bf1cda47b8629"
            },
            "downloads": -1,
            "filename": "xkcd_phrase-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "64bb939b6383a1e3167b658615ecea37",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 77473,
            "upload_time": "2023-02-04T23:11:52",
            "upload_time_iso_8601": "2023-02-04T23:11:52.616811Z",
            "url": "https://files.pythonhosted.org/packages/b6/d4/674cbb13912e2916310e0ea3bdb225a7799cd702699b3d28d8b0d15eb093/xkcd_phrase-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "843fc1abb22249f43f8763cd921a1ef55934eef500952ee5a059a6d51bb5a0e6",
                "md5": "7d90a4ad0f85ed9f499d4f9cfe5762c7",
                "sha256": "1cca8bd690781e96d0c1de888fc887ed2f5cf1391a14e31ead304d6a3bb28959"
            },
            "downloads": -1,
            "filename": "xkcd-phrase-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "7d90a4ad0f85ed9f499d4f9cfe5762c7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 76581,
            "upload_time": "2023-02-04T23:11:54",
            "upload_time_iso_8601": "2023-02-04T23:11:54.809514Z",
            "url": "https://files.pythonhosted.org/packages/84/3f/c1abb22249f43f8763cd921a1ef55934eef500952ee5a059a6d51bb5a0e6/xkcd-phrase-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-02-04 23:11:54",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "xkcd-phrase"
}
        
Elapsed time: 0.05071s