Code Monkey home page Code Monkey logo

diceware's Introduction

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

diceware's People

Contributors

dennisslimmers avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.