Git Product home page Git Product logo

password-generator's Introduction

password generator

A CLI passphrase generator that builds a passphrase by simulating dice throws and using them to pick components of that passphrase from the Diceware™ wordlist.

The resulting passphrases are cryptographically strong, but easier to remember than regular random-character passwords.

Sample output:

Your passphrase is: ping-paper-edwin-boil-gator-spooky
Copied to clipboard! ✅

Motivation

This is a small project mostly for me to learn Rust. However, if you find it useful, you can install it using the steps below.

Installation

git clone [email protected]:anna-hope/password-generator.git
cd passsword-generator
cargo install --path .

Additional usage options

Some websites require your password to include digits, special characters, or a mix of lowercase and capital letters. You can generate a passphrase that satisfies all of those requirements like this (assuming you've installed the program as described above):

password_generator -s digit -a -c

However, the resulting password will likely be much harder to remember, for example Mv7Town1Ohmic6Sis0'1Kt3^3"6Spurn.

You can see all the available options by running

password_generator --help

How does this work and is it actually secure?

The Diceware FAQ provides a lot of good background information about the algorithm and logic behind this program. I would recommend reading it if you're interested in more information about security, entropy, adequate password length for different scenarios, and more.

The Diceware FAQ recommends using physical dice instead of a computer

That's true.

This program simulates dice throws by using the StdRng in Rust's rand crate, which uses a cryptographically secure algorithm to generate random numbers. The resulting passphrases generated by this program should be strong enough for most applications.

However, if you want to have more certainty in your generated passphrase, please do use physical dice and follow the Diceware instructions manually.

password-generator's People

Contributors

anna-hope avatar

Watchers

 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.