Yescrypt explained in plain terms means understanding the password hash that guards most Linux logins, a design from 2014 that makes guessing a password expensive in memory as well as time. The central question is why a login system would spend memory on every password check when time alone seems enough, and the answer is that memory is what stops attackers with graphics cards, so yescrypt gives Linux distros a hash that is costly to crack and cheap to run, and that balance is the whole point of the design.
Yescrypt is a password-based key derivation function created by Alexander Peslyak, known as Solar Designer at Openwall, building on Colin Percival’s scrypt from 2009. It turns a password into a key by filling memory with pseudorandom data and mixing it, and it is built on the idea that a hash should be flexible enough for every deployment, which means the design offers modes, upgrades and server relief in one scheme, and that flexibility is what makes it unlike the password hashes of its era.
This article makes the case for yescrypt, explains what it is, how it works, and where its ideas still earn their keep.
Key takeaways
- Yescrypt is a password hash from 2014, by Alexander Peslyak.
- It builds on scrypt and stays compatible with it.
- It was a Password Hashing Competition finalist.
- It is the default password hash in Debian, Fedora and Ubuntu.
- It is marked by the $y$ prefix in /etc/shadow.
What yescrypt is
Yescrypt is a hash that turns a password into a key while filling memory, and that memory use is what makes it unusual among password hashes. A fast hash lets an attacker try billions of guesses, but yescrypt forces each guess to use memory, which means a graphics card cannot try many guesses at once, and because the memory is the cost, the defence scales with hardware.
Its signature feature is its scrypt compatibility. Most password hashes start from scratch, but yescrypt with all its extra flags off produces exactly the same output as classic scrypt, which means an old system can upgrade without rehashing every password, and because the upgrade path is easy, distros could adopt it without breaking logins.
The design was a reaction to the cost of cracking. Password crackers had moved to graphics cards and custom chips, so Peslyak asked how a hash could stay expensive for them while staying cheap for a login server, because a hash that only costs time loses to parallel hardware, and that practicality is what made yescrypt worth submitting to the Password Hashing Competition.
It became one of the best-known password hashes in the world, and it is named in every discussion of the field. Yescrypt is the default password hash in Debian 11, Fedora 35, Ubuntu 22.04, Kali Linux and Arch Linux, it is marked by the $y$ prefix in /etc/shadow, and it is still the first example engineers meet when they learn that memory can be a defence, which means the design survives as a tool even though Argon2 won the competition.
Its most famous property is its feature set. Yescrypt offers hash encryption, hash upgrade, server relief and client-side computation, which means one scheme serves many deployments, and because the features are optional, a simple login can use it without paying for the extras.
Our guide to hashing explains what a hash function does in the first place, and our guide to SHA-3 explains the standard hash that yescrypt builds on through SHA-256.
How yescrypt works
Everything starts with the password and the salt, which are combined first. Yescrypt takes the password and a random salt and runs them through PBKDF2 with SHA-256, which means the starting value depends on both, and because the salt is unique per user, two users with the same password get different hashes.
Each step begins with the memory fill, which is the expensive part. Yescrypt fills a large block of memory with pseudorandom data derived from the password, which means fresh data arrives at every step, and because the memory is large, an attacker must hold it all to test a guess.
The mixing is what makes the design work as a whole. The filled memory is read back in a data-dependent order and mixed with the Salsa20 core, which means the value is scrambled thoroughly, and because the read order depends on the data, the access pattern cannot be predicted in advance.
The ROM hardness spreads the effect further. Yescrypt can use a large read-only table that defenders precompute once, which means an attacker must store the table too, and because the table is big, the attacker’s hardware costs grow with it.
The finalisation is what turns the state into a key. After the mixing, yescrypt runs the result through PBKDF2 once more and formats it with its settings, which means the output depends on the whole computation, and because the format carries its own parameters, a verifier knows exactly how to check it.
The output comes from the final mix, read out as a password hash string. Yescrypt outputs a string starting with $y$ that holds the parameters and the hash, which means the result is self-describing whatever the settings, and that format is exactly what a login system needs to verify a password later.

Comparing yescrypt with other password hashes
Yescrypt is one of several password hashes built for logins, and each was built with a different emphasis. scrypt is the memory-hard hash it builds on, Argon2 is the competition winner that became the recommendation, and yescrypt is the one built for flexibility and easy upgrades, while each approach trades something for something else.
The table below sets out the main contrasts between the leading approaches.
| Aspect | yescrypt | scrypt | Argon2 |
|---|---|---|---|
| Output | Variable | Variable | Variable |
| Memory-hard | Yes | Yes | Yes |
| PHC result | Special recognition | Predates the PHC | Winner |
| Default in | Debian, Fedora, Ubuntu | Older systems | OWASP recommendation |
| Best for | Linux logins | Legacy hashing | New deployments |
The practical result is that yescrypt is the right choice for Linux logins, scrypt suits legacy hashing, and Argon2 fits new deployments instead.
Where yescrypt is used
Linux distributions use it as their default password hash. Debian, Fedora, Ubuntu, Kali and Arch store user passwords with yescrypt, because it is memory-hard and easy to upgrade, and that adoption is the reason it guards millions of logins rather than only appearing in papers.
System administrators use it to protect shadow files. The /etc/shadow file holds a $y$ hash for every user, because a stolen shadow file must resist offline guessing, and that protection is the reason yescrypt earns its keep in server rooms.
Key derivation uses it to stretch passwords into keys. A system that encrypts data with a password-derived key needs a slow, memory-hard step, because a fast derivation lets an attacker try many keys, and that cost is the reason yescrypt appears in encryption tools.
Cloud services use it to hash credentials at scale. A service that checks millions of logins needs a hash that is cheap for one check and expensive for a million guesses, because the two costs must point in opposite directions, and that asymmetry is the reason yescrypt appears in authentication code.
Teaching uses it as the memory-hard example. Courses introduce yescrypt when they explain that memory can be a defence, because it is the clearest case of the idea in a real design, and a student who understands yescrypt understands why time alone is not enough.
Strengths and limits
The greatest strength of yescrypt is its adoption. A hash that is the default in the biggest Linux distributions guards more passwords than any rival, and that strength is real, measured in the distros that ship it and confirmed by the logins it protects.
It is also a strength that the design upgrades cleanly. A hash that can rehash an old scrypt password without asking the user is easy to deploy, and that compatibility is worth more than cleverness in a field where a hash that breaks logins is a hash nobody adopts.
The limits are real, though, and the biggest is its complexity. Yescrypt has more options and modes than its rivals, which means it is harder to review and easier to misconfigure, and a system that needs the simplest safe choice should use Argon2 instead.
Yescrypt checklist
- Use yescrypt for password storage, never for fast hashing.
- Remember it builds on scrypt and stays compatible with it.
- Note the $y$ prefix marks it in /etc/shadow.
- Compare it with Argon2 to see two kinds of memory-hard hash.
- Study the memory fill, which is what slows attackers.
- Check the parameters, since time and memory are tunable.
- Keep real secrets behind proper key management, not passwords alone.
- Read the Openwall docs to see how the modes work.
- Choose Argon2 when a simpler modern default is wanted.
Frequently asked questions
What is yescrypt in simple terms?
It is a 2014 password hash that turns a password into a key by filling memory with pseudorandom data and mixing it.
Who created yescrypt?
Alexander Peslyak, known as Solar Designer at Openwall, who built it on Colin Percival’s scrypt.
How is yescrypt different from scrypt?
Both are memory-hard, but yescrypt adds modes, ROM hardness and an upgrade path while staying compatible with scrypt output.
Is yescrypt still secure?
Yes, it is the default in major Linux distributions, though it is cache-timing unsafe like scrypt and Argon2d.
Where is yescrypt used?
In Debian, Fedora, Ubuntu, Kali and Arch Linux, in shadow files, in key derivation, and in teaching about memory-hard hashing.
When should I use yescrypt?
When you store Linux passwords, when you upgrade from scrypt, or when you study memory-hard hash design.
The bottom line
Yescrypt explained in one line is this: the flexible password hash, a 2014 design of memory filling and scrypt compatibility that became Linux’s default and taught the field that memory can be a defence.
It is proof that flexibility wins adoption, and the reason it still matters is that every password hash designed since has been judged partly by the lesson yescrypt taught.
This article is general information about how yescrypt works, not advice about choosing encryption for a particular device or system.







