How do passwords work? (2024)

Delinea Blog > How do passwords work?

How do passwords work? (1)

Written by
Barbara Hoffman

Share:

Any time you want to make a purchase, post a comment in a forum, or even read content on many websites, you’re prompted to create (and remember!) a password.

But what’s really going on when you create a password? And how does this process help keep your information safe? When you create a password on a website, that password isn’t stored verbatim on the website’s server. That’s because your password would be freely available if the security of the server were compromised.

Instead, your password is put through a process called “hashing,” which significantly improves security (provided your password is strong enough).

How does password hashing work?

Password hashing turns your password (or any other piece of data) into a short string of letters and/or numbers using an encryption algorithm. If a website is hacked, password hashing helps prevent cybercriminals from getting access to your passwords. Instead, they just get access to the encrypted unintelligible “hash” created by your password.

A common hash function is md5(), which returns a 32-character string from any input. Below are a few examples of what a hash looks like:

  1. md5(helloworld) = fc5e038d38a57032085441e7fe7010b0
  2. md5(hell0world) = 0a123b92f789055b946659e816834465
  3. md5(g84js;l238fl-242ldfsosd98234) = 42e7862f4ad5225471866d2023fc4cca#
  4. md5(helloworld) = fc5e038d38a57032085441e7fe7010b0

From these examples, we can learn several things about hashes:

Small changes matter a lot – Take a look at examples 1 and 2. Just one digit has been shifted, from an “o” to a “0.” This is a very small change, and yet the second output is unrecognizable from the first.

The output length never changes – The input in example 3 is considerably longer than the other examples, yet it produces an output of the same length (32 characters). You could input an entire book into the md5() hash function and you would still get a 32-character string as the output.

Repeatable – An input will always give the same output when hashed using the same function. If this weren’t the case, they would just be generating a random output, which would be useless for passwords. (I included the same function in example 1 as example 4 just to see if you were paying attention.)

Hard to reverse – Even though a cybercriminal may be able to tell the function used to create a hash, it’s almost impossible to reverse that function and generate the password. In fact, it’s so hard that trying millions of combinations to try and produce the same end result (a brute-force attack) is typically quicker than the calculations required to reverse the hashing process.

How do passwords work? (2)

Pinpoint risky stored passwords in minutes

Our free Browser-Stored Discovery Tool will find those sneaky passwords.


How is password hashing used for granting access?

Let’s look at how password hashing works in practice:

  • Step 1 – A user visits a site and fills in a form to create their username and password.
  • Step 2 – That password is put through a hash function and the hash is stored in the database.
  • Step 3 – When a user logs in they enter their password again on the site.
  • Step 4 – That entered password is run through the same hashing function as was used before.
  • Step 5 – The server checks this hash against the one stored for the user in the database.
  • Step 6 – If the two hashes match exactly, the user is granted access.

Is hashing sufficient to keep passwords safe?

Knowing that hashes are the same length regardless of the password you choose, you might be tempted to pick a short, memorable password. In fact, you should do the opposite. The password you choose is critical for keeping your data secure.

Once a cybercriminal obtains password hashes from a website, the real process of password hacking begins. This process happens offline, on the cybercriminal’s computer. Cybercriminals put combinations of characters into a hashing function until a hash that matches yours is created.

Because the functions themselves are well known, password cybercriminals can easily calculate hashes for known words and other commonly chosen combinations. Then they match the cracked passwords against these dictionaries.

These dictionaries go far beyond simple words. They include prefixes, suffixes, the practice of changing letters for numbers (e.g. 1 instead of l), and much more. This means weak passwords can be broken very quickly.

You can see how easily simple passwords can be cracked in the blog, Five Most Popular Password Cracking Tools.

For strong password security, you must:

  • Create a long and seemingly random password
  • Change that password periodically
  • Never reuse that password on other websites

Not sure how to create a strong password? Try Delinea's Strong Password Generator.

Password management and PAM

Human beings struggle to create strong, memorable passwords. When we fail to do so, we put our financial and personal data at risk.

For businesses, the risk is even greater. Even if your network security is strong, if people are using the same passwords for your multiple internal systems, applications, and websites, your network could be breached without anyone hacking in. For example, if a user’s personal email is breached, a cybercriminal might try the same password on their work account, possibly gaining access to sensitive business data.

Privileged Access Management (PAM) solutions automatically generate complex passwords and rotate them regularly. So, even if a cybercriminal gains access to a hash, they can’t easily conduct a brute-force attack. PAM solutions help ensure passwords are unique and never shared, so even if cybercriminals get one password, they are less likely to leverage that password to gain additional access.

With PAM, privileged users don’t need to remember passwords or remember to change them. Your enterprise password management happens automatically, behind the scenes, without interrupting a user’s productivity.

So, that’s how passwords work! Now, learn more about privileged access management.

Related Reading: Why you must NOT store enterprise passwords in Excel.

How do passwords work? (3)

FREE TOOL
Secret Server Free

Free privileged password management tool for IT Teams.

Password Management

Other posts you might like

Privileged Password Management 101: What exactly is it?

As the total universe of passwords will likely pass 300 billion in 2020, people and organizations...

4 steps to reduce the risk of shared account passwords

How do you reduce the risk of a security breach when sharing privileged accounts?

There are...

Privileged Password Management 101: What exactly is PPM?

Passwords are one of the top challenges and causes of cyber fatigue for employees. As we move...

How do passwords work? (2024)

FAQs

How do passwords work? ›

Step 1 – A user visits a site and fills in a form to create their username and password. Step 2 – That password is put through a hash function and the hash is stored in the database. Step 3 – When a user logs in they enter their password again on the site.

How does password algorithm work? ›

Password hashing is a process in which algorithms turn plaintext passwords into complex strings of numbers and letters, known as ciphertext. If you run a plaintext password (or any word or phrase) through a hashing algorithm, it produces a unique string of characters, sometimes referred to as a hashed value.

How are passwords stored? ›

The main storage methods for passwords are plain text, hashed, hashed and salted, and reversibly encrypted. If an attacker gains access to the password file, then if it is stored as plain text, no cracking is necessary.

How are passwords authenticated? ›

Username and password authentication is a method of verifying the identity of a user accessing a digital system. The user provides a unique identifier, called a username, and a secret, called a password, to gain access. The system then compares this information with its stored database to verify the user's identity.

How are passwords checked? ›

The next time you try to sign-in and enter your password, the security system runs the password you entered through the same hashing algorithm and checks if the resulting hash matches the hash in the database (a hash is the number that a hashing algorithm spits out). If they match, then you're allowed in.

How do hackers work out passwords? ›

Brute force attacks are basically a trial and error method by hackers to crack passwords. They use powerful computing tools to systematically try countless combinations until they find the correct one. It's a guessing game at scale. Weak and common passwords can quickly be broken in a brute-force attack.

How do hackers get into passwords? ›

Sometimes, the answer is as simple as trial and error. Brute-force attacks use software to guess at user passwords over and over until a match is found. Rather than stealing or purchasing the password, the hacker obtains it through computer-assisted guesswork made more effective by weak or reused passwords.

What is the best strong password? ›

A strong password follows ALL THREE of these tips.
  • Make them long. At least 16 characters—longer is stronger!
  • Make them random. Two ways to do this are: Use a random string of mixed-case letters, numbers and symbols. For example: ...
  • Make them unique. Use a different strong password for each account. For example:

What is the most used password? ›

The world's most common online password is 123456, according to online password management company NordPass. This and the world's other most popular passwords are all simple, short and predictable, leaving people vulnerable to hacking and cybercrime.

What makes a strong password? ›

Create strong passwords

At least 12 characters long but 14 or more is better. A combination of uppercase letters, lowercase letters, numbers, and symbols. Not a word that can be found in a dictionary or the name of a person, character, product, or organization.

What is a weak password? ›

Common words, phrases, or easily guessable information like names, birthdates, or simple sequences (e.g., “abc123”) make a password weak. Such passwords are vulnerable to dictionary attacks, where hackers use a predefined list of common words and phrases to guess passwords.

Why is password authentication bad? ›

Passwords are meant to be used by authorized users only, but they are easily compromised by malicious actors, and thus, they have increasingly become a larger security risk.

Is A username the same as a password? ›

A password is a secret combination of characters that identify a user and grant access to a specific device or website. A password protects the username that a service or website user chooses to keep their account and data private and secure.

Can someone access my saved passwords? ›

Browser account hijacking

This means that bookmarks, browser sessions, extensions, settings, as well as saved passwords are all synchronized and stored in the cloud. And if a hacker gets inside your browser account, all they have to do is log in on another computer using the same account.

Can Google see my passwords? ›

Chrome makes sure that your passwords and username are protected so they can't be read by Google.

Can hackers see my saved passwords? ›

Malware could compromise your credentials

Malware, which is malicious software used to carry out cyber attacks, gives cybercriminals access to your computer. Since browsers are not typically password protected, a cybercriminal would be able to open your browser and view all your passwords in plain text.

Which algorithm is used for password? ›

To protect passwords, experts suggest using a strong and slow hashing algorithm like Argon2 or Bcrypt, combined with salt (or even better, with salt and pepper). (Basically, avoid faster algorithms for this usage.)

What is the 8 4 rule for creating strong passwords? ›

Rule 2 – Password Complexity: Your password should contain at least one character from each of the following groups. This is often called the “8 4 Rule” (Eight Four Rule): 8 = 8 characters minimum length. 4 = 1 lower case + 1 upper case + 1 number + 1 special character.

Can a password hash be reversed? ›

You can't "reverse" password hashes. You can't "unhash" or "dehash" passwords. You can't "reverse" or "invert" MD5, SHA256, bcrypt, SHA1, or similar hashes, salted or unsalted. You (usually) can't "decode" passwords, "decrypt" password hashes or "reverse" or "unscramble" password hashes at all.

What hash starts with $2 y $10? ›

$2y is the hash algorithm (Blowfish in this case) $10 is the cost (or complexity/time) XElWz9WPwSLK3y0jUP6KhO is the salt (always 22 characters)

Top Articles
Latest Posts
Article information

Author: Delena Feil

Last Updated:

Views: 5655

Rating: 4.4 / 5 (65 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Delena Feil

Birthday: 1998-08-29

Address: 747 Lubowitz Run, Sidmouth, HI 90646-5543

Phone: +99513241752844

Job: Design Supervisor

Hobby: Digital arts, Lacemaking, Air sports, Running, Scouting, Shooting, Puzzles

Introduction: My name is Delena Feil, I am a clean, splendid, calm, fancy, jolly, bright, faithful person who loves writing and wants to share my knowledge and understanding with you.