Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leonklingele/passphrase
A library to generate diceware passphrases
https://github.com/leonklingele/passphrase
correct-horse-battery-staple crypto diceware random secure
Last synced: about 2 months ago
JSON representation
A library to generate diceware passphrases
- Host: GitHub
- URL: https://github.com/leonklingele/passphrase
- Owner: leonklingele
- License: unlicense
- Created: 2017-03-11T00:28:20.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2021-01-18T09:30:27.000Z (almost 4 years ago)
- Last Synced: 2024-10-05T17:41:17.189Z (3 months ago)
- Topics: correct-horse-battery-staple, crypto, diceware, random, secure
- Language: Go
- Homepage:
- Size: 38.1 KB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Passphrase generator in Go
[![Build Status](https://travis-ci.org/leonklingele/passphrase.svg?branch=master)](https://travis-ci.org/leonklingele/passphrase)
A simple library to generate passphrases.
## tl;dr
```sh
# Install library
go get -u github.com/leonklingele/passphrase
``````go
// .. and use it. Generate a 7-word long passphrase
s, err := passphrase.Generate(7)
// Example output: discover thinner scared escalate security glitch getting
``````go
// You can even specify your own word-separator
passphrase.Separator = "-"
s, err := passphrase.Generate(7)
// Example output (notice the dash!): discover-thinner-scared-escalate-security-glitch-getting
```## Recommended number of words
Make sure to generate passphrases with at least 7 words. This yields around 90 bits of entropy ([ld(7776^7)](https://www.wolframalpha.com/input/?i=ld(7776%5E7))) which is more than enough.
## Wordlist
This library uses [EFF's large wordlist](https://www.eff.org/files/2016/07/18/eff_large_wordlist.txt).