Makwa Explained: The Password Hash You Can Hand to a Stranger

Makwa explained in plain terms means understanding the password hash you can hand to a stranger, a design from 2015 that turns a password into a value by squaring it again and again modulo a large number. The central question is why a password hash would be built on modular arithmetic when memory-hard designs were winning the race, and the answer is that modular arithmetic lets someone else do the heavy work without learning the password, so Makwa gives defenders a hash they can delegate, and that delegation is the whole point of the design.

Makwa is a password hashing function created by Thomas Pornin, submitted to the Password Hashing Competition that ran from 2013 to 2015. It turns a password into a verification token by repeated squaring modulo a Blum integer, and it is built on the idea that a hash should be algebraic, which means the design is meant for delegation above all, and that focus is what makes it unlike the password hashes of its era.

This article explains what Makwa is, how it works, and where its ideas still earn their keep.

Key takeaways

  • Makwa is a password hash from 2015, by Thomas Pornin.
  • It is built on repeated squaring modulo a Blum integer.
  • It is the only password hash that supports delegation.
  • It allows the work factor to rise without the password.
  • It is named after the Ojibwe word for the black bear.

What Makwa is

Makwa is a hash that turns a password into a token with one core operation, and that smallness is what makes it unusual among password hashes. Each squaring multiplies the work by the same step, which means the cost is set by a work factor, and because the operation is modular arithmetic, the hash can be split across machines.

Its signature feature is delegation. Most password hashes must run where the password lives, but Makwa lets an untrusted server do the squaring, which means a small device can borrow a big machine, and because the password is blinded before it leaves, the helper learns nothing.

The design was a reaction to the cost of slow hashing. Password hashes must be slow to resist guessing, so Pornin asked how a slow hash could run on rented muscle, because a phone cannot afford a heavy hash but a cloud can, and that practicality is what made Makwa worth submitting to the competition.

It became one of the best-known delegation hashes in the world, and it is named in every discussion of the field. Makwa was a candidate in the Password Hashing Competition, it is still the first example engineers meet when they learn that a hash can be delegated, which means the design survives as a tool even though Argon2 won the competition.

Our guide to yescrypt explains the PHC finalist built on scrypt, and our guide to BLAKE2 explains the fast hash that modern password tools pair with slow hashing.

How Makwa works

Everything starts with the password, which is first pre-hashed into a fixed value. Makwa feeds the password through a key derivation step, which means passwords of any length become one value, and because the step is salted, the same password gives different values under different salts.

Each step begins with a squaring, which multiplies the value by itself modulo n. Makwa squares the running value again and again, which means the work grows with the work factor, and because n is a Blum integer, each squaring is a one-way step without the factors.

The modulus is what makes the design work as a whole. Makwa uses a Blum integer n, the product of two primes that are both three more than a multiple of four, which means squaring is a permutation on the residues, and because the factors stay secret, reversing the squarings is hard.

The delegation spreads the effect further. Makwa blinds the value with a random factor before sending it to a helper, which means the helper squares a masked number, and because the blinding is removed on return, the helper never sees the real value.

The work factor is what turns the cost into a dial. Makwa raises its work factor by squaring more times, which means a stronger setting costs more time, and because old hashes can be squared forward, the factor can rise without the original password.

The result comes from the final squaring, read out as a token of fixed size. Makwa outputs the squared value directly as the verification token, which means the result is a fixed size whatever the password, and that size is exactly what a login system needs to verify a password later.

A dark office desk with a laptop showing a glowing green cipher diagram, a brass key and a notebook beside it
A dark office desk with a laptop showing a glowing green cipher diagram, a brass key and a notebook beside it, shows how Makwa works: values take turns being squared modulo a large number, step after step, until a token emerges.

Comparing Makwa with other password hashes

Makwa is one of several password hashes built for logins, and each was built with a different emphasis. Argon2 is the memory-hard hash that won the competition, scrypt is the memory-hard hash both build on, and Makwa is the one built on modular arithmetic for delegation, while each approach trades something for something else.

The table below sets out the main contrasts between the leading approaches.

Aspect Makwa Argon2 scrypt
Output Variable Variable Variable
Core Repeated squaring Memory filling Memory filling
Cost CPU only Memory and time Memory and time
Delegation Yes No No
Best for Delegated hashing General logins Legacy hashing

The practical result is that Makwa is the right choice for delegated hashing, Argon2 suits general logins, and scrypt fits legacy hashing instead.

Where Makwa is used

End-to-end encrypted backup uses it to offload hashing. A backup system that derives keys from passwords can delegate the squaring to a server, because a phone cannot afford a heavy hash, and that offload is the reason Makwa earns its keep in backup designs.

Login servers use it where delegation matters. A server that must verify passwords without doing all the work itself chooses Makwa, because rented machines can carry the cost, and that sharing is the reason Makwa appears in delegation designs.

Escrow systems use it to recover passwords. Makwa can merge a hashed password with an escrowed copy into one value, because the algebra allows the two to combine, and that merging is the reason Makwa appears in recovery schemes.

Research uses it as the delegation example. Papers still cite Makwa when they discuss offloading password hashing, because it is the clearest example of the idea in a real design, and that citation is the reason the design survives in the literature.

Teaching uses it as the modular example. Courses introduce Makwa when they explain that a hash can be algebraic, because it is the clearest case of the idea in a real design, and a student who understands Makwa understands why structure enables delegation.

Strengths and limits

The greatest strength of Makwa is its delegation. A hash that lets an untrusted machine do the work gives defenders far more computing power than their own servers, and that strength is real, measured in the competition’s own review and confirmed by the backup systems that use it.

It is also a strength that the design can raise its work factor offline. A hash whose cost can grow without the original password is easy to maintain, and that maintainability is worth more than cleverness in a field where a hash that cannot age is a hash nobody trusts.

The limits are real, though, and the biggest is that it is not memory-hard. Makwa’s cost is CPU only, which means custom hardware can run it cheaply, and a system that needs the strongest margin should use Argon2 instead.

Makwa checklist

  • Use Makwa for delegated password hashing, never for fast hashing.
  • Remember it is built on repeated squaring modulo a Blum integer.
  • Note the work factor is CPU only and tunable.
  • Compare it with yescrypt to see two kinds of PHC hash.
  • Study the delegation, which is what lets strangers do the work.
  • Check the modulus, since it must be at least 1280 bits.
  • Keep real secrets behind proper key management, not passwords alone.
  • Read the Makwa specification to see how the squaring was built.
  • Choose Argon2 when memory hardness is wanted.

Frequently asked questions

What is Makwa in simple terms?

It is a 2015 password hash that turns a password into a token by squaring it many times modulo a large number, so the work can be handed to another machine.

Who created Makwa?

Thomas Pornin, who submitted it to the Password Hashing Competition and named it after the Ojibwe word for the American black bear.

How is Makwa different from Argon2?

Both slow down guessing, but Makwa is built on modular arithmetic and can be delegated while Argon2 is built on memory hardness and cannot.

Is Makwa still secure?

It is well studied and its squaring is one-way without the factors, though it is not memory-hard, so it is mainly a subject for delegation research.

Where is Makwa used?

In encrypted backup, in delegated login designs, in escrow systems, in research, and in teaching about password hashing.

When should I use Makwa?

When hashing must be delegated to an untrusted machine, when the work factor must rise offline, or when you study modular password design.

The bottom line

Makwa explained in one line is this: the password hash you can delegate, a 2015 design of repeated squaring and Blum arithmetic that let strangers do the heavy work and taught the field that algebra can share the load.

It is proof that a hash can be both slow and shareable, and the reason it still matters is that every delegated design since has been judged partly by the lesson Makwa taught.

This article is general information about how Makwa works, not advice about choosing encryption for a particular device or system.

Latest articles

Scroll to Top