Diceware: Random Passphrase Generator

Posted by ISL Admin on Παρασκευή, Δεκεμβρίου 12, 2014 with No comments

You hear all the time that it is crucial for your online security to build a strong password. We have previously outlined the guidelines for a "good" password but sometimes this is not enough. Applications such as e-mail and data encryption, bitcoin wallets and password managers require a grater degree of protection. Securing such applications with a long complex password might just not be enough. Hardly anyone can remember such a password and most of us will write it down to a piece of paper, compromising the entire effort.

Passphrases can be an alternative to this. A passphrase is a bunch of words and characters that you type in to your computer to let it know for sure that the person typing is you. Most newer security programs allow you to enter a passphrase instead of just a short password for added protection against attackers. Some programs also use your passphrase to form a cryptographic key to encrypt your data. Passphrases differ from passwords only in length. Pass words are usually short - six to ten characters. Their greater length makes passphrases more secure. Modern passphrases were invented by Sigmund N. Porter in 1982.

Picking a good passphrase is one of the most important things you can do to preserve the privacy of your computer data and e-mail messages. A passphrase should be:

  • Known only to you
  • Long enough to be secure
  • Hard to guess - even by someone who knows you well
  • Easy for you to remember
  • Easy for you to type accurately
Diceware™ is a method for picking passphrases that uses dice to select words at random from a special list called the Diceware Word List. Each word in the list is preceded by a five digit number. All the digits are between one and six, allowing you to use the outcomes of five dice rolls to select one unique word from the list. The complete list contains 7776 short English words, abbreviations and easy-to-remember character strings. The average length of each word is about 4.2 characters. The biggest words are six characters long.

There are though some important steps to follow before using this method to create a strong passphrase.

  1. You need a regular six-sided dice
  2. You should download the Diceware word list in English or any other language of your choice. Diceware lists are available for Chinese, German, Esperanto, Spanish, Finnish, French, Italian, Japanese, Dutch, Polish, Russian, Swedish and Turkish
  3. Decide how many words you want in your passphrase. A five word passphrase provides a level of security much higher than the simple passwords most people use. We recommend a minimum of six words for use with Hushmail, wireless security and file encryption programs. A seven or eight word pass phrase is recommended for high value uses such as BitCoin, and the like.
  4. For each word in your passphrase roll five times the die. (ex. for a six words long passphrase you need to roll 30 times).
  5. Look up each five digit number in the Diceware list and find the word next to it. (ex. 54321 is word slain).
  6. Once done you should have a list of words that correspond to your passphrase. Memorize them and destroy any evidence of creation.
Recommendations
Because some words on the diceware list are two characters or less, you can get a very short passphrase. If your passphrase, including the spaces between the words, is less than 17 characters long, it is highly advised that you start over and create a new passphrase. You should also start over if your passphrase is a recognizable sentence or phrase. (These situations are very rare.)
Do not use a random number generator! Such utilities are rarely truly random. Just roll the dice.

Extra Option
For extra security without adding another word, insert one special character or digit chosen at random into your passphrase. Here is how to do this securely (example given for a 6-word long passphrase): Roll one die to choose a word in your passphrase, roll again to choose a letter in that word. Roll a third and fourth time to pick the added character from the following table:

Dice rolls 1 2 3 4 5 6
1 ~ ! # $ % ^
2 & * ( ) - =
3 + [ ] \ { }
4 : ; " ' < >
5 ? / 1 2 3 4
6 5 6 7 8 9 0




Some math: (click to expand) It is usual in the computer industry to specify password strength in terms of information entropy, measured in bits, a concept from information theory. Instead of the number of guesses needed to find the password with certainty, the base-2 logarithm of that number is given, which is the number of "entropy bits" in a password. A password with, say, 42 bits of strength calculated in this way would be as strong as a string of 42 bits chosen randomly, say by a fair coin toss. Put another way, a password with 42 bits of strength would require 242 attempts to exhaust all possibilities during a brute force search. Thus, adding one bit of entropy to a password doubles the number of guesses required, which makes an attacker's task twice as difficult. On average, an attacker will have to try half of the possible passwords before finding the correct one.

Each word created with the Diceware™ method has 12.9 bits of entropy (log2(7776)), thus a 6-word passphrase yields 77.5 bits of entropy and a 7-word passphrase a 90.4 bits, and so on...
A 16-character long random password [a-z][A-Z] yields 5.7 (log2(52)) bits per character, thus 91.2 bits, slightly more than a 7-word long passphrase. Inserting a letter at random adds about 10 bits of entropy.
Axiom
Passwords of equal entropy are considered equally secure.

So why use the Diceware™ method? The answer is that it is far more easy to remember six (or more) lowercase common words than to remember a 16-character long stream of random characters.

A large number of password generator programs and websites are available on the Internet. Their quality varies and can be hard to assess if there is no clear description of the source of randomness that is used, and if source code is not provided to allow claims to be checked. Furthermore, and probably most importantly, transmitting candidate passwords over the Internet raises obvious security concerns, particularly if the connection to the password generation site's program is not properly secured or if the site is compromised in some way. Without a secure channel, it is not possible to prevent eavesdropping, especially over public networks such as the Internet. A possible solution to this issue is to generate the password using a client side programming language such as JavaScript. The advantage of this approach is that the generated password stays in the client computer and is not transmitted to or from an external server. JavaScript Password Generator is an example of such a site.