“Always choose Argon2id” is good password-storage advice, but it's an incomplete answer for a browser application. A key derivation function that exhausts a participant's tab memory, fails to load, or changes the key for an existing channel isn't a successful security upgrade.
The useful PBKDF2 vs Argon2 comparison starts with what an attacker can capture, what your weakest supported device can tolerate, and how participants reproduce the same encryption key. Algorithm strength matters, but so do deployment, access-key randomness, and migration design.
PBKDF2 and Argon2 Side by Side
Argon2id is the stronger default against GPU and ASIC guessing, while PBKDF2-HMAC-SHA-256 is the portable, standards-friendly option. For client-side encryption, neither verdict should become an automatic implementation decision.
PBKDF2 vs Argon2id at a glance
| Criterion | PBKDF2-HMAC-SHA-256 | Argon2id |
|---|---|---|
| Origin | NIST password-based key derivation guidance | Password Hashing Competition winner |
| Main cost lever | Iteration count, serial computational work | Memory, passes, and parallelism |
| Memory use | Negligible additional memory | Configurable, from modest allocations to substantial working sets |
| Resistance to GPU and ASIC guessing | Limited by its computation-focused design | Stronger when parameters and implementation are appropriate |
| Native browser support | Yes, through the Web Crypto API | No native Web Crypto primitive, generally requires WebAssembly or a library |
| FIPS-140 position | Practical choice where validated implementations are required | Preferred general choice when that requirement doesn't govern selection |
| Guidance status | Retained for FIPS-oriented use | Preferred variant in OWASP and RFC guidance |
The cost rows describe different resources, not interchangeable measures of strength. Increasing PBKDF2's iteration count adds computation; configuring Argon2id also imposes a memory requirement that attackers must accommodate when running guesses concurrently.
The support and compliance rows describe deployment obligations. Native availability reduces what you must ship, while a FIPS requirement concerns the validated cryptographic implementation, not merely whether an algorithm name appears in your source code.
Key derivation isn't server password verification
Here, a participant supplies an access key or passphrase, and the browser derives an encryption key. A server password verifier can upgrade a stored credential after a successful login; a browser channel must let every participant reproduce the original key exactly.
Our explanation of how encryption keys work provides the distinction between the secret a person shares and the cryptographic key an application uses. That distinction prevents a common mistake: treating a readable access key as though it automatically has the unpredictability of the derived encryption key.
Human password practices remain relevant when users choose the input. Finchum Fixes IT's guide to strong password policies for small businesses is useful operational context, but password policy and KDF configuration solve different problems.
Decision rule: Choose the strongest configuration your threat model requires and your weakest supported client can reliably execute.
The table narrows the candidates. It doesn't replace an assessment of offline guessing, client limitations, or compliance requirements.
What Memory Hardness Costs Attackers and Users
A browser KDF has two budgets to satisfy: the attacker's cost per guess and the participant's ability to derive a key reliably. Memory-hard functions raise the cost of parallel guessing by requiring each computation to use a substantial working set. That same allocation comes from the user's device.
PBKDF2 performs sequential work within each derivation, but attackers can run different guesses in parallel. Argon2id adds configurable memory use, making that parallelism more expensive. Time-memory trade-offs and implementation choices still affect the result.

Memory is a security parameter and a client expense
The Password Hashing Competition history records Argon2's selection as the winner in July 2015. Argon2 lets engineers set memory use alongside time and parallelism, rather than increasing computation alone.
That does not make every Argon2 configuration stronger than every PBKDF2 configuration. Low memory, poorly chosen parameters, or implementation defects can weaken the expected benefit. Compare the actual settings, not just the algorithm names.
These reference profiles show how memory, passes, and lanes vary. Derivation time depends on the device and browser, so benchmark on the slowest supported device.
Argon2id parameter profiles
| Profile | Memory | Passes | Lanes |
|---|---|---|---|
| OWASP baseline | 19 MiB | 2 | 1 |
| OWASP alternative, low memory | 7 MiB | 5 | 1 |
| OWASP alternative, low passes | 46 MiB | 1 | 1 |
| Memory-constrained option, RFC 9106 | 64 MiB | 3 | 4 |
| Single pass, 64 MiB | 64 MiB | 1 | 1 |
| First recommendation, RFC 9106 | 2 GiB | 1 | 4 |
The RFC 9106 recommendations specify the two RFC profiles shown above. The memory-constrained recommendation and the first recommendation use different memory and pass settings. Matching only one parameter does not make two profiles equivalent.
More memory isn't a free improvement
Participants pay the derivation cost too. On a constrained phone, a large allocation can cause a long pause or fail. Repeated derivations can also compete with the application and browser for resources.
Benchmark the slowest supported device, not a developer workstation. Check both elapsed time and whether the tab can complete derivation reliably while handling the rest of the application.
- Budget for the whole tab. The KDF shares resources with the browser runtime, message handling, and other activity.
- Bound concurrent work. Prevent repeated joins or interface actions from launching overlapping derivations.
- Treat failures as test results. Allocation errors and browser termination rule out a profile, even when successful runs are fast.
For browser applications, the strongest theoretical setting is not necessarily the best default. A configuration that users' devices cannot execute reliably can prevent legitimate participants from deriving the key at all.
Browser and Server Support Across Platforms
PBKDF2-HMAC-SHA-256 is available through the Web Crypto API, so a browser application can derive keys without shipping its own implementation of the primitive. Argon2id generally requires a WebAssembly module or another cryptographic library.
That difference changes the release process. With an additional implementation, you must review the package, its build process, its dependencies, and the way the application initializes it. Loading failure becomes part of the security-sensitive user journey, not merely a missing interface enhancement.
The browser and server deployment paths are distinct.

What you ship and what you operate
On a server, the operator controls the runtime, installed libraries, and resource budget. Argon2id has implementations across many programming environments, while PBKDF2's mature availability makes it especially useful when different clients and services must reproduce identical results.
In a browser, the user controls much of the environment. An application may encounter restricted execution policies, unsupported library features, limited available memory, or an older device whose behavior differs sharply from a developer workstation.
For client-side encryption, moving derivation onto the server to avoid those constraints changes the trust boundary. If the server receives the secret input or derived key, you no longer have the same client-only key architecture.
Interoperability also extends beyond algorithm availability. Implementations must agree on input encoding, salt bytes, output length, and parameter interpretation. Test identical inputs across supported runtimes before assuming that matching algorithm names guarantee matching keys.
Checks before committing to a browser implementation
- Confirm execution support. Test the actual WebAssembly build and initialization path in your supported browsers, including restricted environments.
- Inspect the dependency. Review maintenance, audit history, release provenance, and update procedures rather than relying on package popularity.
- Exercise the oldest supported device. Measure cold loading, derivation, cancellation, and memory pressure with the application running normally.
A successful library import doesn't prove that its desired memory profile is usable. Test with realistic tab activity and repeated join attempts, and show an actionable error rather than choosing a weaker configuration.
PBKDF2 avoids the additional Argon2 implementation dependency and substantial working-memory allocation. That narrower deployment surface can justify its selection, provided the team still evaluates the cost setting and access-key design rather than treating native support as a security guarantee.
How to Choose Parameters You Can Defend
Start with published reference points, but don't confuse a historical minimum, a password-storage recommendation, and an application-specific setting. They answer different questions.
NIST SP 800-132 listed 1,000 iterations as a minimum and noted that 10,000,000 iterations could suit especially critical keys where performance wasn't a major concern. Those are historical reference points, not a modern safe range to select from without testing.
PBKDF2 iteration reference points
| Setting | Iterations | Hash | Context |
|---|---|---|---|
| NIST SP 800-132 minimum | Historical minimum described above | HMAC with approved hash | No longer adequate for many applications |
| NIST SP 800-132 critical keys | Critical-key figure described above | HMAC with approved hash | Performance not a major concern |
| OWASP current recommendation | 600,000 | SHA-256 | Password storage, FIPS-oriented, per the OWASP Password Storage Cheat Sheet |
| Our browser channel keys | 100,000 | SHA-256 | Compatibility-oriented application setting |
| Password4j documentation example | 48,750 | SHA-512 | 89 ms elapsed in the Password4j example |
The Password4j result isn't a target for browser SHA-256 derivation. Its hash function and execution environment differ, so copying its count would discard the conditions that produced the timing.
A defensible benchmark procedure
- Select the weakest supported device. Use a real low-end client, not desktop CPU throttling alone. Keep its browser version and operating conditions in the benchmark record.
- Measure the complete join operation. Include module initialization where applicable, derivation, and successful decryption of a known test payload. Separate cold-start behavior from subsequent runs.
- Raise cost within an explicit usability budget. For PBKDF2, adjust iterations. For Argon2id, test a complete memory, passes, and lanes profile rather than changing isolated values without recording them.
- Test repeated and concurrent attempts. Measure cancellation, overlapping requests, and allocation failure. A successful isolated derivation doesn't establish resistance to resource exhaustion.
- Record a versioned configuration. Preserve the exact settings required to reproduce the key. A benchmark result without its implementation and parameter record isn't reproducible evidence.
The table gives starting references, not equivalent security levels. The comparatively low historical floor is particularly unsuitable as a default justified only by its appearance in a standards document.
Evaluate the input before fine-tuning the work
The Lamarr Labs password analysis emphasizes that PBKDF2 iterations cannot be compared directly with Argon2's time and memory settings. Similar elapsed time on a client doesn't imply similar attacker cost.
A KDF also can't manufacture unpredictability from a guessable input. Assess how access keys are generated and shared before spending engineering effort on small parameter adjustments.
Practical rule: Benchmark performance against the weakest client, but assess guessing resistance against the attacker's capabilities and the input's entropy.
For review planning, ThreatExploit AI's ASVS scoping advice for pentest teams provides useful context for defining verification scope. Include derivation, dependency loading, concurrency limits, and failure handling in that scope, not just the encryption call.
Where PBKDF2 Is the Defensible Choice
PBKDF2 can be the more defensible choice when deployment assurance outweighs the incremental benefit of memory hardness. That's a conditional engineering decision, not a claim that the algorithms provide equivalent protection.
A FIPS requirement is a clear example. PBKDF2-HMAC-SHA-256 remains a practical option where validated cryptographic components are required, but selecting it doesn't by itself validate an application or satisfy a complete compliance framework.
Before choosing an algorithm for compliance reasons, identify the actual requirement and its system boundary. The MR2 Solutions compliance framework comparison can help teams separate framework obligations from a general preference for familiar cryptography.
A browser-only channel as a worked example
Ciphar derives a 256-bit AES key from the access key and a per-channel salt using PBKDF2-HMAC-SHA-256 at 100,000 iterations. We use that key with AES-256-GCM, keep it in browser memory, and never transmit it to the server.
Our access keys are generated locally using the browser's native cryptographic random source and represented with dictionary words for sharing. Readability isn't the same as user selection: assess the generation process rather than assuming every word-based key is a human-chosen password.
The deployment trade-off is illustrated below.

The channels are short-lived, and access attempts are rate-limited. Those controls reduce server exposure and online guessing opportunities, but they don't establish that captured ciphertext is safe from offline guessing.
Server expiry isn't attacker-side expiry. If someone retains ciphertext and the information needed to test guesses, deleting the relay's copy doesn't make the retained copy disappear. A short retention policy therefore cannot substitute for sufficiently unpredictable access keys.
Conditions that justify the trade-off
PBKDF2 is defensible here if the input provides adequate randomness, derivation remains a bounded participant operation, access controls work as intended, and reviewers examine the browser implementation. Those conditions need evidence rather than assumptions.
The archived OWASP password-storage guidance supports increasing work factors as practical and distinguishes FIPS-oriented PBKDF2 use from the general preference for Argon2id. Its password-verification context doesn't remove the need to benchmark a browser join flow.
The honest gap is that our documented work factor sits below the general password-storage recommendation. Compatibility explains the decision's motivation; it doesn't prove the setting remains appropriate.
Publish device-class measurements and threat assumptions before describing such a configuration as adequate. If supported clients can tolerate a stronger configuration reliably, retaining a lower cost requires a specific justification.
Pick Your Setup and Migrate Without Breaking Channels
Choose the setup that the threat model and the weakest supported device justify. Then treat migration as a protocol change, not a configuration edit.
A KDF is deterministic only when its inputs and settings match. If an existing participant derives under the original settings while a new participant uses updated defaults, they won't obtain the same key even with the correct access key.
Preserve reproducibility during rollout
- Store the algorithm, parameters, and version with the channel. Preserve the information needed to derive its key, not the derived secret itself. Include output length and input-encoding rules in the protocol definition.
- Keep a unique salt per channel. Generate it through the platform's cryptographic random source and preserve its exact bytes. A salt identifies a derivation context; it isn't a replacement for a strong secret.
- Assign the new configuration to new channels. Existing channels should retain their original profile. Don't let an application-wide default reinterpret metadata that was created under an older release.
- Never transmit the derived key. Participants should reproduce it locally. Debugging migration failures by logging or uploading keys defeats the intended trust boundary.
- Load-test representative mobile and desktop clients. Include mixed client versions, slow initialization, repeated joins, and rejected configurations. Test the failure paths before raising either computational or memory cost.
- Retire the old version after its last channel expires. Keep compatibility code available for every live configuration, then remove it through a controlled release.
Our encryption key management guide provides context for separating key handling from ordinary application settings. Version metadata belongs with the channel's derivation contract; secret material doesn't belong in telemetry or support logs.
The rollout requires both configuration discipline and cross-device verification.

Expiring channels simplify retirement, not recovery
Our channels expire after one hour, so an old derivation version can age out with its final live channel. Unlike a persistent encrypted archive, this model doesn't require bulk re-derivation of long-lived content.
There's no key escrow, recovery mechanism, or backdoor. A migration mistake that prevents clients from reproducing a key can therefore make content inaccessible, which is why compatibility testing must precede deployment.
Never silently retry a failed new configuration with a weaker one. Select an explicit, permitted profile and reject unsupported settings predictably.
Before releasing a change, complete this checklist:
- Confirm the threat model. Document whether the main concern is captured ciphertext, online entry attempts, or client resource exhaustion.
- Benchmark the weakest device. Preserve reproducible results and failure behavior.
- Test access controls. Verify server rate limits and client-side concurrency bounds separately.
- Record the version. Confirm that existing channels retain their original derivation settings.
Ciphar offers browser-based encrypted chat with locally derived keys, no account requirement, and self-destructing channels. Visit Ciphar to review the security model and try a channel, then assess its key-derivation trade-offs against your devices and confidentiality requirements.


