Package 'riceware'

Title: A Diceware Passphrase Implementation
Description: The Diceware method can be used to generate strong passphrases. In short, you roll a 6-faced dice 5 times in a row, the number obtained is matched against a dictionary of easily remembered words. By combining together 7 words thus generated, you obtain a password that is relatively easy to remember, but would take several millions years (on average) for a powerful computer to guess.
Authors: Francois Michonneau [aut, cre], Arnold G. Reinhold [cph]
Maintainer: Francois Michonneau <[email protected]>
License: MIT + file LICENSE
Version: 0.6
Built: 2024-11-05 02:56:11 UTC
Source: https://github.com/fmichonneau/riceware

Help Index


Check the Token

Description

Checks the validity of the token.

Usage

check_token(token)

Arguments

token

a character vector of length 1 representing the outcomes of 5 rolls of a dice.

Details

The token is a 5-digit number representing the outcomes of 5 rolls of a 6-faced dice. The function returns TRUE if the token is correctly formatted and FALSE otherwise.

Value

TRUE if correctly formatted, FALSE otherwise.

Author(s)

Francois Michonneau


Generates a passphrase

Description

Generates a passphrase.

Usage

generate_passphrase(tokens = generate_token(7), verbose = TRUE, ...)

Arguments

tokens

a vector of character representing the tokens to be used to generate the passphrase. By default, 7 are randomly generated using generate_token(7).

verbose

if TRUE the passphrase is displayed as a message

...

additional parameters to be passed to match_token

Details

Given a wordlist and a number of words, this function generates a passphrase. You can control the wordlist you choose and whether the passphrase uses title case by providing additional arguments that will be passed to match_token.

Value

a character string representing the passphrase

Author(s)

Francois Michonneau

See Also

match_token, generate_token

Examples

generate_passphrase(tokens = generate_token(7, "pseudorandom"),
                      verbose = FALSE)

Generate the tokens

Description

Generates the tokens.

Usage

generate_token(n_words, method = c("pseudorandom", "random"))

Arguments

n_words

The number of tokens to generate.

method

The method used to draw the random numbers. See below for more details.

Details

This function generates as many tokens as needed to create the passphrase. Currently, two methods can be used to generate the random tokens.

  1. The simplest and the default (pseudorandom) uses the function sample to simulate the dice rolls. Numbers generated this way are not truly random but are a decent approximation.

  2. The other option (random) uses the random package that gets truly random numbers by converting atmospheric noise into numbers. The main issue is that someone could monitor your network and intercept the numbers that are being used. If you are concerned about this, use a physical dice.

Note that if you want to use the random method, you will need an internet connection. The service that provides these random numbers (http://www.random.org) has daily quotas, don't go too crazy (if you need to, you can purchase additional bits, see http://www.random.org/quota).

Value

A character vector representing the generated tokens.

Author(s)

Francois Michonneau

See Also

http://www.random.org the website that generates the true random numbers, and the random package from Dirk Eddelbuettel.


Match the token to a word

Description

Retrieves the word corresponding to a given token.

Usage

match_token(token, wordlist = riceware::wordlist_en, title_case = TRUE)

Arguments

token

A correctly formatted token

wordlist

A data.frame with at least 2 columns: one named ‘token’ that contains the tokens, one named ‘word’ that contains the words corresponding to the tokens.

title_case

If TRUE, the first letter of each word in the passphrase will be capitalized

Details

Given a token and a list of words, this function returns the word matching the supplied token.

Value

A character vector of length 1 representing the word corresponding to the token.

Author(s)

Francois Michonneau


Diceware word list (German)

Description

The German Diceware word list as provided at http://world.std.com/~reinhold/diceware_german.txt. This list is provided by Benjamin Tenne under the terms of the GNU General Public License.

Usage

wordlist_de

Format

A data.frame with 2 columns: token a 5-digit number representing the results of 5 rolls of a dice, word the Diceware word corresponding to the dice rolls.


Diceware word list (English)

Description

The English Diceware word list as provided at http://world.std.com/~reinhold/diceware.wordlist.asc. To the extent that a word list is protected by copyright, A G Reinhold licenses its rights to the English Diceware Wordlist under the Creative Commons CC-BY 3.0 license. Diceware is a trademark of Arnold G. Reinhold.

Usage

wordlist_en

Format

A data.frame with 2 columns: token a 5-digit number representing the results of 5 rolls of a dice, word the Diceware word corresponding to the dice rolls.


Diceware word list (Spanish)

Description

The Spanish Diceware word list as provided at http://world.std.com/~reinhold/diceware_espanol/DW-Espanol-1.txt. This list is provided by Manuel Palao, CISM, CISA ([email protected]) under the terms of the GNU General Public License.

Usage

wordlist_es

Format

A data.frame with 2 columns: token a 5-digit number representing the results of 5 rolls of a dice, word the Diceware word corresponding to the dice rolls.


Diceware word list (French)

Description

The French Diceware list as provided at http://weber.fi.eu.org/software/diceware/src/francais.wordlist.asc. This list is provided by Matthieu Weber, no licensing information is provided.

Usage

wordlist_fr

Format

A data.frame with 2 columns: token a 5-digit number representing the results of 5 rolls of a dice, word the Diceware word corresponding to the dice rolls.


Diceware word list (Italian)

Description

The Italian Diceware list as provided at http://www.taringamberini.com/download/diceware_it_IT/word_list_diceware_in_italiano.txt. This list is provided by Tarin Gamberini under a GNU General Public License.

Usage

wordlist_it

Format

A data.frame with 2 columns: token a 5-digit number representing the results of 5 rolls of a dice, word the Diceware word corresponding to the dice rolls.


Diceware word list (Japanese)

Description

The Japanese Diceware list as provided at http://s3.amazonaws.com/dotclue.org/diceware_jp.txt translated by Hiroshi Yuki, and provided in Romaji by J Greely. No license information provided.

Usage

wordlist_jp

Format

A data.frame with 2 columns: token a 5-digit number representing the results of 5 rolls of a dice, word the Diceware word corresponding to the dice rolls.


Diceware word list (Swedish)

Description

The Swedish Diceware list as provided at http://x42.com/diceware/diceware-sv.txt provided by by Magnus Bodin. No license information provided.

Usage

wordlist_sv

Format

A data.frame with 2 columns: token a 5-digit number representing the results of 5 rolls of a dice, word the Diceware word corresponding to the dice rolls.