The short version

  • PBKDF2 turns a password, PIN or pattern into an encryption key by repeating a calculation many times.
  • The repetition is the point. It makes every guess cost the attacker the same extra work that you pay once at unlock.
  • OWASP's current guidance for PBKDF2 with HMAC-SHA-256 is 600,000 iterations. RFC 8018 describes the method.
  • A device secret mixed into the key stops an attacker from guessing offline, on their own machine. A weak pattern stays weak.

You draw a pattern. An encryption algorithm wants a long, random-looking key. Something has to bridge the gap, and that something is a key derivation function. PBKDF2 is the best known one, and it has an unusual virtue for a security tool: it is deliberately tiresome.

The guessing problem

A pattern, PIN or password has few possibilities compared with a real key. A 256-bit key has more possibilities than anyone can try. A six-dot pattern has a tiny fraction of that. If an attacker holds a copy of your encrypted files, they do not need to break the cipher. They can try every likely pattern, derive each key and test it against the files. The only limit is how fast their computer does it.

Raw speed is the enemy here. If turning a guess into a key takes a microsecond, billions of guesses cost very little. The defence is to make every guess cost more, and that is the job of the function.

Rounds as a cost per guess

RFC 8018, the specification of password-based cryptography, describes PBKDF2 as applying a pseudorandom function to the password and a salt and repeating it a set number of times. The salt is a random value that makes your key different from everybody else's key for the same password, so an attacker cannot reuse work. The RFC states that a larger iteration count makes each derivation more expensive and so slows trial-based attacks; its text puts it as roughly log2(c) extra bits of strength for a count c.

That wording is useful. Doubling the rounds adds one bit. It is not a miracle, and it is a steady, predictable cost.

For a vault, the cost is paid in two places. You pay it once each time you unlock, which is a fraction of a second. An attacker pays it for every single guess. A pattern with a million plausible candidates costs a million derivations, not a million cheap tests.

How many rounds? The RFC cites a minimum of 1,000, a figure from older NIST guidance that dates from a time when computers were slower. OWASP's Password Storage Cheat Sheet, which is kept up to date, recommends 600,000 iterations for PBKDF2 with HMAC-SHA-256 (and 220,000 for HMAC-SHA-512). The numbers are different because the function and the hardware are not the same ones.

Our own figure is the OWASP one. Vaultario, which is not released, uses 600,000 rounds, and Obscura states 600,000 rounds of key derivation on its pages as well. Vaultaire's site says its pattern goes through PBKDF2 with a keychain salt, and we did not see a round count on the pages we read.

A device secret changes the attack

Rounds slow a guesser down, but the guesser can still run on their own fast hardware, with a copy of your files. A second ingredient changes the problem.

Vaultario mixes the pattern with a device secret that comes from a key held in the iPhone's Secure Enclave. That key never leaves the chip and cannot be copied out, not even from a backup, and it is not in the vault files. A person who copies the files off the phone, and even knows your pattern, lacks one ingredient. Trying patterns on a computer will not work, because the key cannot be rebuilt without that phone. The guesser has to work on your phone, through the app, and after five patterns in a row that open no saved vault the app makes them wait: 30 seconds, then 1 minute, 5, 15, and an hour for each one after. Nothing is deleted along the way. We describe that as one extra barrier and not as an impenetrable wall. Someone holding your phone can still try patterns through the app, at the pace the waits allow.

Vaultaire's site describes a similar arrangement, the pattern combined with a keychain salt.

What a weak pattern still costs you

PBKDF2 multiplies effort. It does not create secrets from nothing. If a thousand patterns are far likelier than the rest, because people start in corners and draw letters, an attacker tries those first, and 600,000 rounds each on a thousand candidates takes little time on a modern computer. Our page on stronger patterns covers how people choose.

Three practical conclusions follow.

  1. Length and oddity matter more than any setting you cannot see. Draw a longer, less guessable path.
  2. Rounds help against copies of the files, not against a person watching you. A shoulder surfer needs no computer.
  3. The count is not a feature to compare in isolation. A page that says "600,000 rounds" and also lets a company reset your code has told you less than it seems.

What PBKDF2 does not do

It is not a defence against a determined lab with custom hardware, and newer functions such as scrypt and Argon2 are built to resist those by demanding memory, not only time. OWASP lists them as alternatives. PBKDF2 stays popular because it is standardised, widely implemented in the system libraries of phones, and good enough when the rest is sound. It is not a reason to relax about the rest.

Questions

Does it slow my unlock noticeably?

It adds a short delay by design, tuned so that it is barely noticeable for one unlock and heavy for millions of guesses.

Is 600,000 a magic number?

No. It is current guidance for one specific variant, and guidance moves. Treat it as a floor for HMAC-SHA-256, and as one question to ask among several.

Sources

Read on 3 December 2026. Listings, prices and policies change; the linked page is the one that counts.

Product names, icons and trademarks belong to their owners and are used only to identify the products. Found something wrong or out of date? Write to support@vaultario.app and we will correct it.

Vaultario isn't out yet

It is an iPhone photo vault where the pattern you draw is the encryption key. Leave your e-mail and we will write once, on the day it opens.

Get notified at launch