concept password in category cryptography

appears as: passwords, password, passwords, password
Real-World Cryptography

This is an excerpt from Manning's book Real-World Cryptography.

Imagine the following scenario: you have a website (which would make you a webmaster) and you want to have your users be able to register and login. So you create two web pages for these two respective features. Suddenly, you wonder: how are you going to store their passwords? Do you store them in clear in a database? There seems to be nothing wrong with this at first, you think. It is not perfect though, people tend to re-use the same password everywhere and if (or when) you get breached, and attackers manage to dump all of your users' passwords, it will be bad for them and it will be bad for the reputation of your platform. You think a little bit more, and you realize that an attacker who would be able to steal this database would then be able to log-in as any users. Storing the passwords in clear is now less than ideal and you would like to have a better way to deal with this.

A naive way to implement the previous user authentication flow is to store the user password at registration, and then ask the user for it at login time (as illustrated in figure 11.3). As covered in chapter 3, once successfully authenticated a user is typically given a cookie that she can send in every subsequent requests instead of her username and password.

Figure 11.3. A password-based authentication flow. Alice sends her username and password in clear to the server (the server sees the password), and the server checks if it matches what it has in its database. If it does, Alice successfully authenticates.
password

But wait, if the server stores your password in clear, then any breach of their databases will reveal your password to the attackers. These attackers will then be able to use it to log into any websites where you used the same password to register. A better way to store passwords would be to use a password hashing algorithm like the standardized Argon2 you’ve learned about in chapter 2. This would effectively prevent the server to see your password every time you log in (although they would still see it at registration time). Yet, a lot of websites and companies still store passwords in clear.

Moreover, humans are naturally bad at passwords. We are usually most comfortable with small and easy-to-remember passwords. And if possible, we would want to just reuse the same password everywhere.

The problem of weak passwords and password reuse has led to many silly and annoying design patterns that attempt to force users to take passwords more seriously. For example, some websites will require you to use special characters in your passwords, or will force you to change password every 6 months, and so on.

Furthermore, many protocols attempt to "fix" passwords or to get rid of them altogether. Every year, new security experts seem to think that the concept of password is dead. Yet, it is still the most widely used user authentication mechanism.

password is dead

So here you have it, passwords are probably here to stay. Yet, there exist many protocols that improve or replace passwords. Let’s take a look at them!