# What is password hashing?

Japanese: ハッシュ化 (はっしゅか)

**In one line:** Password hashing turns a password into a fixed-length string of symbols (a hash) with a set math recipe. It can’t be turned back, so sites store the hash instead of the password.

Many people think hashing means locking a password with a secret code. But a code has a key that opens it again. Hashing has no key. It mixes the letters with a fixed math recipe. Out comes a jumble of symbols, always the same length. The same password always makes the same jumble. So the website just checks if the two jumbles match. It is like orange juice. You can’t turn it back into an orange. But short passwords can still be guessed, one try at a time. The weakest part is not the math. It is “1234.”

**Common mix-up:** Hashing is not encryption. Encryption can be undone with a key, but hashing is one-way. Weak passwords can still be guessed by trying many candidates.

**How does a site check it’s you?**

A hash function squeezes any input, short or long, into a string of a fixed length. The same input always gives the same hash, but working backward from the hash is extremely hard. So a website keeps only the hash. When you log in, it hashes what you typed and compares the two. Even people inside the company can’t see your actual password.

**Salting and stretching**

The weak spot is a precomputed list: attackers hash common passwords in advance and look for matches. IPA’s guide to secure websites recommends adding a different random string, a salt, to each password before hashing. Identical passwords then produce different hashes. Hashing over and over on purpose to slow down guessing is called stretching.

**Why it shows up in breach news**

After an October break-in at the e-book store Comic Cmoa, its operator NTT Solmare said email addresses and hashed passwords were among the leaked data. On November 20 it reopened purchases and asked users who reuse the same email and password elsewhere to change them there. Hashing buys time; not reusing passwords is the real fix.

**How people use it**

- “We store your password only as a salted hash.”
- “Even if it was hashed, change it if you reused it.”

**FAQ**

- Is hashing the same as encryption? — Hashing is not encryption. Encryption can be undone with a key, but hashing is one-way. Weak passwords can still be guessed by trying many candidates.
- If hashed passwords leak, am I safe? — Safer than plain text, but short or common passwords can be found by hashing guesses and comparing. If you used the same password elsewhere, change it there too.
- What is a salt? — A salt is a random string added to each user’s password before hashing. The same password then gives different hashes, so ready-made answer tables don’t work. Japan’s IPA recommends storing salted hashes.
- Does the company know my password? — If it stores only hashes, no. It hashes what you type at login and checks if it matches. That is why “forgot password” gives you a reset, not your old password.

Topic: Tech
Published: 2026-11-21T12:20:00+09:00
Source URL: https://eli5.net/en/w/password-hashing
日本語: https://eli5.net/w/password-hashing
