Title: | A Diceware Passphrase Implementation |
Version: | 0.4 |
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. |
URL: | https://github.com/fmichonneau/riceware |
BugReports: | https://github.com/fmichonneau/riceware/issues |
Depends: | R (≥ 3.1.3) |
Imports: | random (≥ 0.2.4) |
License: | MIT + file LICENSE |
LazyData: | true |
Suggests: | testthat |
NeedsCompilation: | no |
Packaged: | 2015-05-20 18:39:51 UTC; francois |
Author: | Francois Michonneau [aut, cre], Arnold G. Reinhold [cph] |
Maintainer: | Francois Michonneau <francois.michonneau@gmail.com> |
Repository: | CRAN |
Date/Publication: | 2015-05-21 09:43:37 |
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 |
verbose |
if |
... |
additional parameters to be passed to |
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
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.
The simplest and the default (
pseudorandom
) uses the functionsample
to simulate the dice rolls. Numbers generated this way are not truly random but are a decent approximation.The other option (
random
) uses therandom
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 |
title_case |
If |
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 (manuel@palao.com) 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.