diceware

package module
v0.0.0-...-7a67a82 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2015 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Go implementation of diceware passphrase algorithm

Diceware is a method for creating passphrases, passwords, and other cryptographic variables using an ordinary die from a pair of dice as a hardware random number generator. For each word in the passphrase, five rolls of the dice are required. The numbers from 1 to 6 that come up in the rolls are assembled as a five-digit number, e.g. 43146. That number is then used to look up a word in a word list. In the English list 43146 corresponds to munch. Lists have been compiled for several languages, including Chinese, English, Finnish, German, Italian, Maori, Polish, Romanian, Russian, Spanish and Swedish. A Diceware word list is any list of 6^5 = 7,776 unique words, preferably ones the user will find easy to spell and to remember. The contents of the word list do not have to be protected or concealed in any way, as the security of a Diceware passphrase is in the number of words selected, and the number of words each selected word could be taken from.

Installation

Install and update with go get -u github.com/VojtechBartos/diceware

Example

package main

import (
    "fmt"
    
    "github.com/VojtechBartos/diceware"
)

func main() {
    parts := 6
    passphrase := diceware.GeneratePassphrase(parts)
    
    fmt.Println(strings.Join(passphrase[:], " "))
}

Todo's

  • write tests and add CI

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GeneratePassphrase

func GeneratePassphrase(numberOfParts int) []string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL