DICEWARE(1)

๐Ÿ“ฆ
version 1.0.1 ยท 4 versions
, in debian trixie, fedora 43, ubuntu questing, ubuntu resolute, ubuntu stonking

๐Ÿ’– DICEWARE โ€” bestie's guide to making passphrases ๐Ÿ’–

okay so real talk, diceware is a User Commands legend and honestly it's giving main character energy. โœจ


๐ŸŒธ NAME ๐ŸŒธ

diceware โ€” create passphrases ๐ŸŽ€


โœจ SYNOPSIS โœจ

diceware [OPTION]... [FILE]

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so basically diceware generates passphrases by concatenating words that get randomly picked from wordlists. no cap. it also supports real dice for passphrase generation, which is such a vibe honestly ๐ŸŽฒ

it's based on the proposals of Arnold G. Reinhold over at <http://diceware.com> . iconic behavior, we stan ๐Ÿ’…


๐Ÿ‘‘ OPTIONS ๐Ÿ‘‘

๐Ÿ“ positional arguments:

  • FILE โ€” optional input wordlist. if you pass - it will read from stdin. should contain one word per line, bestie, one word, that's the whole deal ๐Ÿ’–

๐Ÿงš optional arguments:

  • -h, --help โ€” show help message and exit. the classic. ๐Ÿซถ
  • -n NUM, --num NUM โ€” number of words to concatenate. default is 6.
  • -c, --caps โ€” capitalize words. this is literally the default already. โœจ
  • --no-caps โ€” turn off capitalization. bye bye capital letters ๐Ÿ‘‹
  • -s NUM, --specials NUM โ€” insert NUM special chars into the generated word. sprinkle sprinkle ๐ŸŒˆ
  • -d DELIMITER, --delimiter DELIMITER โ€” separate words by DELIMITER. empty string by default. so like, nothing between them unless you say so.
  • -r SOURCE, --randomsource SOURCE โ€” get randomness from this source. possible values: realdice, system. default: system.
  • -w [NAME [NAME ...]], --wordlist [NAME [NAME ...]] โ€” use words from this wordlist. possible values: ca, de, de_8k, en, en_8k, en_adjectives, en_eff, en_nouns, en_orig, en_securedrop. es, it, pt-br. default: en_eff. yes the list has a lil period typo in the middle and we are preserving it exactly, periodt ๐Ÿ’€
  • -v, --verbose โ€” be verbose. use several times for increased verbosity. stack it, bestie, go off ๐Ÿ“ข
  • --version โ€” output version information and exit.
  • --dice-sides N โ€” number of sides of dice. default: 6.

๐Ÿ’œ ENVIRONMENT VARIABLES ๐Ÿ’œ

  • XDG_CONFIG_HOME โ€” if set and not empty, this variable determines the directory to use for user-local configuration files. we then lookup ${XDG_CONFIG_HOME}/diceware/diceware.ini and values set here override system-wide config files. it's giving "my rules now" ๐Ÿ‘‘
  • XDG_CONFIG_DIRS โ€” if set and not empty, this variable is interpreted as colon-separated list of directories, that might contain system-wide configuration files. we lookup <DIR>/diceware/diceware.ini for each directory set in $XDG_CONFIG_DIRS.
  • XDG_DATA_HOME โ€” if set and not empty, this variable determines a directory to search for additional wordlists. we then lookup ${XDG_DATA_HOME}/diceware for any existing wordlist files. ๐Ÿ“‚
  • XDG_DATA_DIRS โ€” if set and not empty, this variable is interpreted as colon-separated list of directories, that might contain additional wordlist files. see below. we lookup <DIR>/diceware/ then for each directory set in the list.

๐ŸŒˆ FILES ๐ŸŒˆ

depending on environment variables set (or not set) we lookup certain directories for configuration files called diceware.ini and for wordlist files. yes, it's a whole little scavenger hunt ๐Ÿ•ต๏ธโ€โ™€๏ธ

๐ŸŽ€ CONFIGURATION FILES

configuration settings for diceware can be spread over several configuration files. we parse configuration values from the files given below, but values set in former files take precedence over values set in latter ones. so like, earlier = more powerful. hierarchy, we love to see it ๐Ÿ’…

  • ~/.diceware.ini โ€” your personal diceware configuration file. values set here override values from any other configuration file. this one is the queen bee ๐Ÿ‘‘
  • $XDG_CONFIG_HOME/diceware/diceware.ini โ€” additional location for your personal diceware configuration. values set here will override any system-wide valid values but can be overridden by ~/.diceware.ini.
  • $HOME/.config/diceware/diceware.ini โ€” alternative location for diceware configuration, only used if ${XDG_CONFIG_HOME} is empty or unset.
  • /etc/xdg/diceware/diceware.ini โ€” if $XDG_CONFIG_DIRS is not set or empty, we look here for a system-wide configuration file. values set here take least precedence. poor thing, last place ๐Ÿ˜ญ

๐ŸŒธ WORDLIST FILES AND WORDLIST DIRECTORIES:

diceware comes with a set of wordlists but enables you to add new wordlists by putting them into certain directories. the paths where the lists are stored (including the built-in ones) is shown using --show-wordlist-dirs. go peek, it's right there โœจ

wordlist files are expected to contain lines with one term on each line and they must have a certain filenames to be found. (yes, the original says "a certain filenames", we're keeping it, it's part of the lore ๐Ÿ’€)

wordlist filenames have to follow the pattern: wordlist_<NAME>.txt where <NAME> can be any name consisting of letters, numbers, underscores and hyphens. for instance wordlist_en_eff.txt is the filename of the EFF (electronic frontier foundation) word list. en_eff is the name of this list. ๐Ÿฆ‹

we support .txt and .asc as filename extensions for wordlists, where .txt files are expected to be plain wordlists and .asc files should provide a PGP-signature. ๐Ÿ”

if wordlists with the same name are found in different directories then the one in the directory with the highest precedence is taken only. the following locations are ordered by precedence (highest first). therefore built-in wordlists cannot be overridden by custom wordlists. you can, however, use custom wordlists with a different name. so don't try it bestie, the built-ins are protected ๐Ÿ›ก๏ธ

directories we look up that do not exist (in part or completely) are silently skipped when searching for wordlist files. no drama, no error, just vibes ๐Ÿ™ˆ

  • <INSTALL-DIR>/wordlists/ โ€” the directory containing the built-in wordlists as part of the installation. these are the wordlists that are always available, regardless of configuration values and their exact location depends on the installation location of the diceware package. โญ
  • $XDG_DATA_HOME/diceware/ โ€” if $XDG_DATA_HOME is set and not empty, we look in this directory for wordlists.
  • $HOME/.local/share/diceware/ โ€” if $XDG_DATA_HOME is unset or empty, we look into this directory for wordlists.
  • <DIR>/diceware from $XDG_DATA_DIRS โ€” if $XDG_DATA_DIR is set and not empty, it is interpreted as a colon-separated list of directories with /diceware appended. so, /foo/bar:/baz will make us look into /foo/bar/diceware/ and /baz/diceware/ in that order.
  • /usr/local/share/diceware/, /usr/share/diceware โ€” if $XDG_DATA_DIRS is unset or empty, we look into these two directories for wordlists.

๐Ÿ”ฅ EXAMPLES ๐Ÿ”ฅ

  • diceware create a passphrase using defaults. outputs something like "WheelDyeHonkCanvasWitsPuck" ๐ŸŽ‰
  • diceware -d "-" -n 3 create a passphrase with three words, separated by dash ("-"). results in something like "Wheel-Dye-Honk" ๐Ÿ’ซ
  • diceware --no-caps create a passphrase without capital words. creates something like "wheel-dye-honk".
  • diceware -r realdice use real dice to create a passphrase. the program will tell you what to do (roll dice and tell what numbers appear) and in the end present a passphrase. it's interactive bestie, get your dice out ๐ŸŽฒ๐ŸŽฒ
  • diceware -r realdice --dice-sides 20 use real dice, as shown above, but this time use dice with 20 faces, instead of standard, 6-sided dice. fancy dice arc ๐Ÿ”ฎ
  • diceware mywordlist.txt create a passphrase with words from file "mywordlist.txt". the file should contain one word on each line. ๐Ÿ“
  • diceware -w en_securedrop -s 2 create a passphrase with two special chars spread over the generated passphrase and containing words from wordlist "en_securedrop". this is one of the wordlists that come included with diceware. creates something like: "PlayaBrigVer{SeesNe-tsGets". the chaos is the point ๐Ÿ˜Œ
  • diceware -w en_adjectives en_nouns -n 2 create two syntactically meaningful phrases, each one consisting of an adjective and a noun. results in something like: "CruelAttendeesCleanCoffee". grammar? in MY passphrase? it's more likely than you think โœจ

Copyright (C) 2015-2024 Uli Fouquet and contributors

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see < <http://www.gnu.org/licenses/> >.

diceware is a concept invented by Arnold G. Reinhold, Cambridge, Massachusetts USA.

The Securedrop wordlist (file wordlists/wordlist_en_securedrop.asc) by Heartsucker is licensed under the MIT license (see <http://mit-license.org/> ).

The EFF wordlist (file wordlsts/wordlist_en_eff.txt) is licensed by the Electronic Frontier Foundation under the Creative Commons CC-BY 3.0 US license (see <https://creativecommons.org/licenses/by/3.0/us/> ).

The copyright for the the Diceware SecureDrop list is owned by @heartsucker. Copyright for the EFF large list by Joseph Bonneau and EFF. Copyright for the brazilian portuguese list by @drebs. Copyright for the english adjective and noun lists by NaturalLanguagePasswords.

"Diceware" is a trademark of Arnold G Reinhold, used with permission.


๐Ÿซถ AUTHOR ๐Ÿซถ

Written by Uli Fouquet and contributors


and that's the whole page bestie, every flag, every path, every XDG variable, nothing skipped, no cap ๐Ÿ’ฏ

this was diceware version 1.0.1, dated December 2024 โ€” sending you love from the User Commands girlies, now go make a passphrase that slays ๐Ÿ”โœจ๐Ÿ’…

๐Ÿ“ฆ where this page comes from