Most people use very short passwords to protect their accounts. We're talking either ridiculously easy to guess passwords, like "password", or words found in a dictionary, which may or may not have numbers at the end. These passwords can be broken easily by criminals who can rent enough computing power. To them it doesn't matter how hard it is for us to remember our passwords, all passwords that have a short enough length can be broken by them.
In this day and age when services getting breached left and right, you wonder how best to protect yourself. Contrary to what experts say, two factor authentication is
not secure enough to entrust your personal details in (
SIM swap scams are the reason why), so the only reasonable alternative is to use extremely long passwords that will take infeasible amounts of time to crack. The question is, how are you supposed to remember a password that long in your head? You can't be expected to remember something like
d7498323ace9137c1e0e9cdf1f955b78, can you?
But what if the password was actually a passphrase with dictionary words in it separated by spaces?
That is what's called a Diceware passphrase. Diceware takes a random selection of words from a list, and puts them together. The selection either comes from a secure random number generator, or physical entropy like coin flips or dice rolls. Diceware passwords can also be constructed entirely without computers. Print a list of words, roll a dice a few times and put the numbers together to pick a word for the list, and repeat as many times as you want to get additional words. Here's an XKCD comic describing how easier they are to remember compared to regular passwords:
There is an online service that can generate these passwords for you without ever sending them across the internet, in other words the selection process is entirely done locally (for the paranoid out there: this page can be downloaded and run locally).
This is the website:
https://www.rempe.us/diceware/#eff, it lets you create a sequence of 5 to 8 words by default, but it also has buttons for adding special characters and more words at the end. This is useful for services that insist you have special characters, numbers and uppercase letters in your password, but currently this tool doesn't generate numbers or uppercase letters, but since this tool is open-source, anyone can implement this support in the future. Then it would be the ultimate solution for all services that don't have a maximum password length. The ones that do have one are likely running ancient authentication software. Banks immediately come to mind.
You can verify that the page doesn't transmit your passwords by opening the browser's DevTools, go to the network tab, and generate some passwords, noticing that there are no network requests made.
But to be extra safe (the site could get hijacked at any time), you should clone this page from github using
git clone https://github.com/grempe/diceware.git (or just download the zip file), navigate into the folder, and run the page on localhost as it won't work correctly if you open index.html directly:
cd diceware
# start a tiny Python web server
# many operating systems come with
# Python pre-installed.
python -m SimpleHTTPServer 8080
# visit http://localhost:8080
This post is supposed to be for the average layman and not for the computer scientist, so measurements of cracking speed and hashes/second will be entirely omitted here. The good news is, the number of words your diceware passphrase has roughly correlates to how strong it is:
- Five words are breakable with a thousand or so PCs equipped with high-end graphics processors. (Criminal gangs with botnets of infected PCs can marshal such resources.)
- Six words may be breakable by an organization with a very large budget, such as a large country's security agency.
- Seven words and longer are unbreakable with any known technology, but may be within the range of large organizations by around 2030.
- Eight words should be completely secure through 2050.
Pick your passphrase size based on the level of security you want.
Another way to think about passphrase length is to consider what security precautions you take to physically protect your computer and data. Here is a list of possible passphrase lengths and commensurate security precautions. The list of precautions is not intended to be complete. I am not trying to discourage anyone from using longer passphrases if they feel up to it, but the added strength without comparable physical security for your computer is of limited value.
5 words- You would be content to keep paper copies of the encrypted documents you are protecting in an ordinary desk or filing cabinet in an un-secured office.
6 words- You need or want strong security, but take no special precautions to protect your computer from unauthorized physical access, beyond locking the front door of your house or office.
Note: Six or more words should be on systems that use the passphrase directly to form a transmission or encryption key. Such systems include Hushmail, password managers, full disk encryption (e.g. Apple's FileVault), Ciphersaber, and WiFi's WPA.
7 words- Your computer is protected from unauthorized access at all times when not in your personal possession by being locked in a room or cabinet in a building where access is controlled 24 hours a day or that is protected by a high quality alarm service.
- Routine cleaning and building maintenance people do not have physical access to your computer when you are not present.
- You regularly use an up-to-date anti-virus program purchased off the floor at a computer store.
- You have verified the signatures on your copy of PGP or GPG, etc.
- You never run unverified downloaded software, e-mail attachments or unsolicited disks received through the mail on your computer.
Note: However I do encourage using seven or more words on high value systems that store money directly, such as BitCoin and other cryptocurrencies. I do not claim to be an expert on BitCoin, but some Internet searching suggests that many BitCoin wallets do very little key stretching. That and the fact that wallets are often used to store large sums of money, make them a very attractive target. I am not saying that a 7 word Diceware passphrase will make BitCoin safe, there are other risks to consider.
8 words- You take all the steps listed under 7 words above, and:
- Your computer is kept in a safe or vault at all times when it is not in sight of you or someone you trust.
- Your computer was purchased off the floor at a randomly selected computer store.
- All the software used on your computer was distributed with a strong, independently verified electronic signature that you checked, or was purchased off the floor in a randomly selected computer store
- Your computer has never been repaired or upgraded by anyone you do not trust completely.
- All disks and tapes used with your computer are either kept in a safe or physically destroyed.
- You take precautions against audio and video surveillance when entering passphrases.
- You change your PGP encryption key regularly (at least once a year).
- You have taken precautions against TEMPEST attacks. See the chapter "Commonsense and Cryptography," in Internet Secrets, from IDG Books Worldwide, for a discussion of what this involves.
For people seeking long term data protection (greater than 10 years) I would recommend adding one word to the above suggestions.
Everyone reading this should be using at least 7 word Diceware for their wallet passwords.
How to remember your passphraseI promised that this method would be easier to remember than a standard passphrase. Well, a bunch of words aren't easily remembered at first, so how do you go about this: There are two different ways you can use to remember it, you are free to use both:
1. Writing it down
Now before everyone comes at me with pitchforks and torches for suggesting this, it's important to understand that writing the passphrase on a piece of paper, and storing that paper somewhere safe like in a wallet where your credit card is, or in a locked box or drawer, or simply in an obscure place in your room that you don't share with anyone, is safer than keeping it in your head. You might forget the passphrase one day, and lose access to your account. The objective in writing down your passphrase is to assist you in remembering it in your head, so that it's stored in two places: One place that you guard, the other that's physically impossible to access (your head). In fact writing it down is the recommended way of saving seed phrases as well, which is more important than a password.
People who don't write down their passwords usually end up forgetting them and using weaker passwords instead, undermining the entire purpose of Diceware.
2. Make the computer speak it
This method is one I use to register the passphrases in my head. Since the passphrase consists entirely of English dictionary words, the computer should have no problem with speaking them. You can use software like Microsoft Narrator, MacOS VoiceOver, or
espeak on Linux (you may need to install it with your package manager first) with the following command:
Warning:
never type passwords directly into commands because they will be saved in bash history.The voice will help you remember some of the words, you can also experiment with changing the voice, pitch or speed to remember the rest of the words.
More information about diceware for those who are interested:
https://theworld.com/~reinhold/diceware.html