Skip to content

refactor(auth): authHash to Argon2id-MODERATE with versioned distinct salt#862

Merged
rohan-chaturvedi merged 1 commit intofeat/org-sso-gatingfrom
auth/strengthen-authhash-derivation
Apr 27, 2026
Merged

refactor(auth): authHash to Argon2id-MODERATE with versioned distinct salt#862
rohan-chaturvedi merged 1 commit intofeat/org-sso-gatingfrom
auth/strengthen-authhash-derivation

Conversation

@nimish-ks
Copy link
Copy Markdown
Member

Bumps passwordAuthHash from INTERACTIVE (~64MiB / ~100ms) to MODERATE (~256MiB / ~1s) and prefixes its salt input with "auth-v1:".

deviceKey  = argon2id(pw, blake2b(email, 16),               MODERATE)  // unchanged
authHash   = argon2id(pw, blake2b("auth-v1:" + email, 16),  MODERATE)  // bumped tier + distinct salt
  • The server-bound credential carries the same crack resistance per guess as the local-only deviceKey, instead of being ~6× cheaper to brute-force from a DB dump.
  • Distinct salts give explicit domain separation, versioned for future rotation.
  • deviceKey derivation untouched — existing wrapped_keyring blobs decrypt unchanged. authHash is net-new on this branch (no prod data to migrate).
  • 32/32 unit tests pass.

Net diff: -20/+9 in frontend/utils/crypto/users.ts.

… salt

Bump passwordAuthHash from INTERACTIVE (~64MiB / ~100ms) to MODERATE
(~256MiB / ~1s) and prefix its salt input with "auth-v1:". Symmetric
work factor with deviceVaultKey, explicit domain separation, no change
to deviceKey derivation.

Tests pass (32/32).
@nimish-ks nimish-ks self-assigned this Apr 27, 2026
@rohan-chaturvedi rohan-chaturvedi merged commit 812429c into feat/org-sso-gating Apr 27, 2026
@rohan-chaturvedi rohan-chaturvedi deleted the auth/strengthen-authhash-derivation branch April 27, 2026 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants