Skip to content

Latest commit

 

History

History
149 lines (92 loc) · 5.2 KB

passphrase.md

File metadata and controls

149 lines (92 loc) · 5.2 KB

PASSPHRASE

NAME

Passphrase - Tool to generate cryptographically secure passphrases and passwords

DESCRIPTION

usage: passphrase [-h] [--version] [--insecure] [--no-newline] [-m] [-v]
                  [-e ENTROPYBITS] [--uuid4] [--coin] [-p [PASSWORD]]
                  [--use-uppercase [USE_UPPERCASE]]
                  [--use-lowercase  [USE_LOWERCASE]] [--use-digits] [--use-alphanumeric] 
                  [--use-punctuation] [-w WORDS] [-n NUMBERS] [-s SEPARATOR] [-o OUTPUT] [-i INPUT] [-d]

Passphrase v1.2.1 by HacKan (https://hackan.net) FOSS under GNU GPL v3.0 or newer

Generates a cryptographically secure passphrase, based on a wordlist, or a password, and prints it to standard output. By default, it uses an embedded EFF Large Wordlist for passphrases. Passphrases with less than 6 words are considered insecure. A safe bet is between 6 and 7 words, plus at least a number. For passwords, use at least 12 characters, but prefer 16 or more, using the complete characters set.

Instead of words and numbers, a password (random string of printable characters from Python String standard) can be generated by**-p** | --password, specifying the length. It uses uppercase, lowercase, digits and punctuation characters unless otherwise specified. Also, a UUID v4 string can be generated by --uuid4 or a coin can be thrown with --coin. A custom wordlist can be specified by -i | --input, the format must be: single column, one word per line. If -d | --diceware is used, the input file is treated as a diceware wordlist (two columns). Optionally, -o | --output can be used to specify an output file (existing file is overwritten). The number of words is 6 by default, but it can be changed by -w | --words. The number of numbers is 0 by default, but it can be changed by -n | --numbers. The generated numbers are between 100000 and 999999. The default separator is a blank space, but any character or character sequence can be specified by -s | --separator.

Example output:

Default parameters: chalice sheath postcard modular cider size

Words=3, Numbers=2: depraved widow office 184022 320264

Password, 20 chars: sF\#s@B+iR\#ZIL-yUWKPR

Optional arguments:

-h, --help

show this help message and exit

--version

print program version and licensing information and exit

--insecure

force password/passphrase generation even if the system's entropy is too low

--no-newline

don't print newline at the end of the passphrase/password

-m, --mute

muted mode: it won't print output, only informational, warning or error messages (usefull with -o | --output)

-v, --verbose print additional information (can coexist with -m | --mute)

-e ENTROPYBITS, --entropybits ENTROPYBITS

specify the number of bits to use for entropy calculations (defaults to 77)

--uuid4

generate an UUID v4 string

--coin

generate a random coin throw: heads or tails

-p [PASSWORD], --password [PASSWORD]

generate a password of the specified length from all printable or selected characters

--use-uppercase [USE_UPPERCASE]

use uppercase characters for password generation or give the amount of uppercase characters in the passphrase: zero or no input for all uppercase or any number of uppercase characters wanted (the rest are lowercase)

--use-lowercase [USE_LOWERCASE]

use lowercase characters for password generation or give the amount of lowercase characters in the passphrase: zero or no input for all lowercase (default) or any number of lowercase characters wanted (the rest are uppercase)

--use-digits

use digits for password generation

--use-alphanumeric

use lowercase and uppercase characters, and digits for password generation (equivalent to --use-lowercase --use-uppercase --use-digits)

--use-punctuation

use punctuation characters for password generation

-w WORDS, --words WORDS

specify the amount of words (0 or more)

-n NUMBERS, --numbers NUMBERS

specify the amount of numbers (0 or more)

-s SEPARATOR, --separator SEPARATOR

specify a separator character (space by default)

-o OUTPUT, --output OUTPUT

specify an output file (existing file is overwritten)

-i INPUT, --input INPUT

specify an input file (it must have the following format: single column, one word per line)

-d, --diceware

specify input file as a diceware list (format: two colums)

AUTHOR

Passphrase was written by HacKan ⟨hackan@gmail.com⟩.
Check the Passphrase repository for more information.

COPYING

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/.