Password management is a pain. Ideally we would not still be using passwords. Fortunately we are headed in the direction of easier to use and more secure authentication with FIDO/WebAuthentication, now supported in all current major browsers and in many mobile devices and laptops.
Until sites replace password authentication with Web authentication we will still need to manage passwords. Even in a world of Web authentication it may be common to use passwords as a backup authentication mechanism. So here are some password management ideas.
Caveat: I am not a security expert. I am simply gathering some ideas I have encountered.
Here are a few user experience goals to improve password management:
- No memorization. You don't want to have to remember your passwords.
- No writing down in the clear. You don't want to write them down / store them in your computer in the clear. You probably also shouldn't write them down on sticky notes attached to your computer.
- Available anywhere. If you change browsers (e.g., when using the computer or phone of a friend or family) you still want access to your passwords.
We also have some security goals:
- Unique. You should use a different password on every site. If someone figures out your password for one site, they won't easily be able to break into your other accounts.
- Complex. Passwords should be complex to enhance security (despite NIST guidelines for simpler passwords).
Below we look at how to achieve both security and usability goals:
For some situations where you cannot have both, I would favor security.
2. Computation of Secure Passwords
If you compute your secure password when you need it, you don't have to memorize it or write it down. If you compute your password using the right tools, it will also satisfy our security goals of being unique for each site and complex. Because there are many tools for doing these computations, you don't have to rely on any single tool.
Here's one approach for creating a secure password:
- Choose a secret key that is easy to remember and reused for every password that you create. You should not share your secret key or write it down anywhere. For the example in this document our secret key will be submarine. This secret key increases the difficulty of others guessing your password.
- To create a different password for each Web site we combine the secret key with the Web site site's domain (also called "origin"). I use a "@" in between them for readability. For the domain example.com, the password will be based on firstname.lastname@example.org. For the domain happycat.org, the password will be based on email@example.com.
- We now use a hash function to turn our "key@domain" into a random-looking string of characters. For this discussion, we will use the SHA3 hash with an output size of 512. Fortunately, you don't need to know what this means or anything about hash functions other than they take some input and produce some complex results that will be the basis of your password. Hash calculators are widely available (see below) as apps for your phone or as Web sites. For example, if you feed firstname.lastname@example.org into a SHA3 hash calculator (output size 512) you get results that start with these 16 characters: 2cea44ef8fca4c68. If you run email@example.com through the calculator you get results that start with 16 very different characters: 0cc794b60c6ba782. By using a hash function the results are even more complex and secure.
- Many sites have password requirements like "you have to use at least one uppercase letter" or "you have to use at least one character that is not a number or a letter." Although our hash results are complex and unique, they may not fulfill these extra password requirements. We therefore create a formula that uses the hash results as a "foundation" then enhances them to satisfy common password requirements of Web sites:
- Run firstname.lastname@example.org through a SHA3 calculator and take the first 8 characters. Result: 0cc794b6.
- Add some uppercase letters to the beginning. To make this formula easy to memorize, always choose the same pattern. For example, you might use your initials (e.g., RBG): RBG0cc794b6
- Add a non-number, non-letter "special character" to the end. In this example we choose "!". The resulting password for email@example.com would be: RBG0cc794b6!
In summary, the above password formula combines these parts:
- One or more uppercase letters (e.g., your initials so they are easy to remember).
- The first 8 characters of the SHA3 hash of "key@domain". The "domain" part changes for every site (e.g., happycat.org). They "key" is your secret that you reuse for all your passwords. Don't write it down!
- One special character (not a letter or number). Note: Some sites (unhelpfully) limit which special characters you can use. I don't have guidance on which ones are commonly accepted.
Using the formula consistently will make it easier to remember. It is something of a pain to type your information into a hash calculator, then add the other bits at the beginning and end, especially on a small screen. See below for storing these passwords for convenience in some cases.
Note: A colleague has created a password generator that produces results very similar to the above formula. Like the formula above, it uses a varying piece of information (e.g., the domain name) and a consistent piece of information (our secret key) as inputs. It generates passwords that likely conform to the requirements of most sites since they include a mix of uppercase letters, lowercase letters, numbers, and special characters.
Deviations from the Formula
It is pretty easy to memorize a single formula such as the one above. However, in several situations, the formula is not suficient:
- A site may have password requirements that the formula does not satisfy. If a site requires something special at the beginning or end of the password, you can still use the usual formula, then just add something to the beginning or end as needed.
- A site may ask you to change your password. In thise case, you'll need to deviate from the formula to produce a new password. For example, instead of using happycat.org you might use happycat2.org or happycat3.org the next time you have to change your password.
- You might choose to reset your password for security purposes.
If you want to use a password manager for these situations, you
won't have to remember that the password for this site does not
follow the formula.
But if you don't want to use a password manager, you'll need to
keep track of the fact that your password is not "standard" for
this site. Instead of writing down your password, I recommend
using the formula and writing down only how you deviated. For
example, if you computed your first password with happycat.org,
you can compute the next one with happycat2.org. In this case you
would write a note to yourself: "On November 17 I changed my
password for happycat.org. The password uses the usual formula
except with domain happycat2.org". Remember, don't write down your
If you write this type of note, you want to make sure you can
find it wherever you may be. You might consider storing this
information on your phone and/or on the Web. This is somewhat
inconvenient, but preserves the security of your passwords.
Hash calculators are widely available as mobile apps and Web
sites. They should all produce the same results. Here are a few
examples that support SHA3 (with output size 512); I'm not endorsing them just providing some examples:
- As I mentioned, I am not a security expert. I have pointed out SHA3 as a hashing function, but over time there may be superior choices.
- Hash results depend on what you provide as input. If you have a space at the end of your input, the results will be different than if you don't. Be careful about invisible spaces.
- Some hash calculators can produce results where the letters are all uppercase or all lowercase. If you are using a formulat where you add your own uppercase letters at the beginning, then you should generate lowercase hash results.
- For Unix users: Heads-up that the newline at the end of a string might change the hash results in surprising ways.
3. Storage with a Password Manager
A password manager improves usability. The password manager is a vault, protected by a primary password. It helps achieve our initial goals as follows:
- You create secure passwords and store them in the password manager.
- You protect them with a primary password. That is the only one you really have to remember.
- If the vault lives "in the cloud" you can access your passwords from anywhere.
It is easy to find information on password managers (e.g., this article Before you use a password manager).
You can find password manager apps that run on your phone or
computer. In addition, your browser and operating system may also
act as password managers:
- Browser. Protect your browser-stored passwords by using a primary password. See your browser's documentation for how to do this.
- Operating System. On Apple Products see Apple Keychain). In addition, mobile phones integrate password management protected by biometrics into the browswing experience. When you log into a Web site from your mobile browser, your phone can prompt you to store the password. Then next time you want to log in, your phone prompts you to authenticate (e.g., with biometrics, like a fingerprint or facial recognition) and automatically inserts your stored password in the login form.
Remember, when you store your passwords, other people who can
access your browser will be able to use them to log in to Web
sites. Consider locking your computer or phone so that it can only
be unlocked with biometrics or a password.
If you are not comfortable storing passwords for some sites, just recompute them as needed.
4. More on Creating Secure Passwords
I'd like to thank Dan Connolly for teaching me the first iteration of this approach!
Ian Jacobs, November 2020