Skip to content

dennisslimmers/Diceware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Diceware

Diceware is a password generator that uses a word dictionary to create solid passphrases. This dictionary contains a total amount of 7776 (6^5 = 7776) words. For each word we generate 5 cryptographic pseudo-random numbers (CSPRN) between 1 and 6. These numbers represent the dots on a regular cubic dice. If we concatinate the numbers, we get a key that corresponds with a random word in the dictionary. For example: 1 - 4 - 5 - 2 - 6 -> 14526 -> baker. For a theoretically safe passphrase we need a minimum of 5 dice rolls.

This python implementation of diceware uses secrets.SystemRandom to generate cryptosafe numbers. So the certainty of your randomness heavily depends on your source of random.

$ python run.py
    ____  _                                 
   / __ \(_)_______ _      ______ _________ 
  / / / / / ___/ _ \ | /| / / __ `/ ___/ _ \
 / /_/ / / /__/  __/ |/ |/ / /_/ / /  /  __/
/_____/_/\___/\___/|__/|__/\__,_/_/   \___/

Started generating at: 2018-04-09 20:59:01.305850
Finished generating at: 2018-04-09 20:59:01.306351
Elapsed generation time: 0.001173s

Passphrase: Aussiedeckkaternboottebasakelei
The passphrase is copied to your clipboard, press CTRL + V to paste

Optional arguments

With the --help command you can see every optional argument that can be provided to generate different outcomes.

$ python diceware.py --help
Diceware passphrase generator

arguments:
    --help       shows argument list and exits
    --version    shows application version and exits
    -h           hashes the generated passphrase with bcrypt
    -s           seperates the words with dashes (-)
    -u           capitalizes the passphrase
    -n INT       amount of dice rolls (words)
    -l [NL, EN]  dictionary language
    -log         log the passphrase to a log file

Releases

No releases published

Packages

No packages published

Languages