All Projects → michaelbironneau → garbler

michaelbironneau / garbler

Licence: MIT license
Generator of memorable passwords, written in Go

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to garbler

longtongue
Customized Password/Passphrase List inputting Target Info
Stars: ✭ 61 (+3.39%)
Mutual labels:  password-generator
Passky-Server
API and Database for Passky (password manager)
Stars: ✭ 77 (+30.51%)
Mutual labels:  password-generator
sandpass
Password manager for Sandstorm
Stars: ✭ 26 (-55.93%)
Mutual labels:  password-generator
MagicPassword
Need to generate a password? Try Gaowanliang Strong Password Generator. Just need a master password to generate secure passwords to keep your network safe.
Stars: ✭ 19 (-67.8%)
Mutual labels:  password-generator
chinese-diceware
Diceware word lists in Chinese
Stars: ✭ 27 (-54.24%)
Mutual labels:  password-generator
moac
Generate passwords and analyze their strength given physical limits to computation
Stars: ✭ 16 (-72.88%)
Mutual labels:  password-generator
cryptopocket
🔐 Encrypt anything, then Decrypt by providing a required key.
Stars: ✭ 22 (-62.71%)
Mutual labels:  password-generator
gpgpwd
Moved to GitLab
Stars: ✭ 22 (-62.71%)
Mutual labels:  password-generator
password-generator
A secure password/passphrase generator built with React
Stars: ✭ 47 (-20.34%)
Mutual labels:  password-generator
webpassgen
Simple web-based password generator
Stars: ✭ 111 (+88.14%)
Mutual labels:  password-generator
Cryptography
Some simple cryptographic examples on C# 6.0
Stars: ✭ 14 (-76.27%)
Mutual labels:  password-generator
alfred-passwords-workflow
An Alfred 4 workflow that allows you to quickly generate strong passwords.
Stars: ✭ 42 (-28.81%)
Mutual labels:  password-generator
mopass
A OpenSource Clientless & Serverless Password Manager
Stars: ✭ 40 (-32.2%)
Mutual labels:  password-generator
password-gen-cli
🔥 Generates random password and copies it to your clipboard
Stars: ✭ 26 (-55.93%)
Mutual labels:  password-generator
otp-authenticator-webapp
A 'Google Authenticator' like Single Page Application
Stars: ✭ 69 (+16.95%)
Mutual labels:  password-generator
Passky-Desktop
Desktop application for Passky (password manager)
Stars: ✭ 47 (-20.34%)
Mutual labels:  password-generator
cryptorious
CLI Password Manager
Stars: ✭ 15 (-74.58%)
Mutual labels:  password-generator
krypta
Generating random bits, passwords, recovery phrases and Bitcoin private keys / addresses (including QR codes) from text seed and salt.
Stars: ✭ 18 (-69.49%)
Mutual labels:  password-generator
simple-password-gen
Simple Ruby-powered password generator
Stars: ✭ 16 (-72.88%)
Mutual labels:  password-generator
password-list
Password lists with top passwords to optimize bruteforce attacks
Stars: ✭ 174 (+194.92%)
Mutual labels:  password-generator

Garbler

Author: Michael Bironneau License: MIT

Generator of memorable passwords, written in Go. Available both as a command-line tool and as a Go library.

Please see here for Godocs or read on for examples.

What makes the passwords memorable?

The password generation method is inspired by the environ passwords, which are designed to be pronouncable, and therefore easier to memorize. For extra security, the method originally used to generate environ passwords has been generalized to meet any password strength requirement that can be expressed in minimum/maximum length, minimum number of digits, minimum number of punctuation characters, and/or minimum number of uppercase letters.

A few example passwords:

  • Denwiqil628-
  • Riwwabolmi556:
  • .!Bonhomiqvi984-:!
  • ZizqoRuK293?

Garbler has no external dependencies and is fast enough for bulk use: it can generate 10-20k passwords per second depending on the preset used (Intel core i7 Pro).

BenchmarkParanoid	   10000	    193711 ns/op
BenchmarkMedium	       20000	     88755 ns/op

Installation

Run go get github.com/michaelbironneau/garbler. If you want to use it as a command line tool, you will also need to run go install to get the binaries. I can provide links to pre-built binaries if there is enough interest - please open an issue if you would like this to happen.

Code examples

The API is simple, clean, and comes with presets and sensible defaults:

import (
	garbler "github.com/michaelbironneau/garbler/lib"
	"fmt"
)

func main() {
	//use defaults
	p, _ := garbler.NewPassword(nil)
	fmt.Println(p)

	//use Strong preset (Insecure/Easy/Medium/Strong/Paranoid are available)
	p, _ = garbler.NewPassword(&garbler.Strong)
	fmt.Println(p)

	//guess requirements from existing password
	reqs := garbler.MakeRequirements("asdfGG11!")
	p, _ = garbler.NewPassword(&reqs)
	fmt.Println(p)

	//specify requirements explicitly:
	//if specifying requirements you should not ignore error return,
	//in case the requirements are impossible to satisfy (eg. minimum length is
    //greater than maximum length)
	reqs = garbler.PasswordStrengthRequirements{MinimumTotalLength: 20, Digits:10}
	p, e := garbler.NewPassword(&reqs)
	if e != nil {
		fmt.Println(e)
		return
	}
	fmt.Println(p)
}

Generating multiple passwords

You can use NewPasswords instead of NewPassword to get a string slice of passwords:

passwords, _ := garbler.NewPasswords(&garbler.Strong, 10) //generates 10 passwords with Strong preset

Using Garbler to check password strength

You can also use Garbler to check a given password against strength requirements. For example,

reqs := PasswordStrengthRequirements{MinimumTotalLength: 8, Punctuation: 1, Uppercase: 1, Digits: 1}
if ok, message := reqs.Validate(password); !ok {
	fmt.Println("your password failed validation because" + message)
}

Command-line usage

This assumes that $GOPATH/bin has been added to your $PATH environment variable. If that is not the case, you should either do that or first change your current working directory to $GOPATH/bin before attempting the following.

The garbler command, without any arguments, will spit out 10 passwords that:

  • are 12 characters long
  • have 3 digits
  • have 1 punctuation character
  • have 1 uppercase character

You can use the following flags to modify the behavior:

  • n : number of passwords to generate (eg. garbler -n=20)
  • min: minimum length of generated password (eg. garbler -min=10)
  • max: maximum length of generated password (eg. garbler -max=10)
  • digits: minimum number of digits in password (eg. garbler -min=15 -max=20 -digits=5)
  • punctuation: minimum number of punctuation characters (eg. garbler -punctuation=5)
  • uppercase: minimum number of uppercase characters (eg. garbler -uppercase=3)

Golang API

To use Garbler within your Go application, install it as described above, then import github.com/michaelbironneau/garbler/lib, as in the example.

See the godocs here.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].