Skip to content

deps(crypto): upgrade argon2 to 0.6 without breaking stored password hashes - #330

Merged
tonibergholm-codento merged 2 commits into
mainfrom
deps/argon2-0.6
Nov 9, 2026
Merged

tonibergholm-codento merged 2 commits into
mainfrom
deps/argon2-0.6

Conversation

@tonibergholm-codento

Copy link
Copy Markdown
Collaborator

Dependabot's argon2 0.6 bump (#323) fails to compile: 0.6 removed SaltString and changed hash_password to take only the password. This ports scl-crypto's password hashing to the new API, and the hashes it writes don't change.

  • hash_password now calls hash_password_with_salt with the same 16 random bytes from OsRng. The output is still a $argon2id$v=19$m=19456,t=2,p=1$... PHC string, because the default parameters are the same in 0.6.
  • A new test checks that a hash made by argon2 0.5.3 still verifies with the right password and fails with a wrong one. Password rows that earlier sc-forge builds stored keep working.

Supersedes #323.

Proof: the 0.5.3 fixture verifies under 0.6, and fmt, clippy (-D warnings) and the scl-crypto and scl-forge tests pass locally.

Reviewed with sol-loop: 1 round with gpt-6.1-sol on high. Sol verdict: approved

Created with Claude Opus 5.5 in T3 Code (Claude Code harness).

Port hash_password to the 0.6 API (hash_password_with_salt, phc::PasswordHash)
and pin with a test that a hash made by argon2 0.5.3 still verifies, so
password rows stored by earlier sc-forge builds keep working.

Supersedes #323.
@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3a8f3f60-d6ee-4e02-b924-6fa0c99bad67
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-09T05:50:41.668449Z c26a9d6 New commits
🔒 Security Review ✅ Completed 2026-11-09T05:54:02.850169Z c26a9d6 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Comment thread crates/crypto/src/credentials.rs Dismissed
Comment thread crates/crypto/src/credentials.rs Dismissed
@tonibergholm-codento
tonibergholm-codento merged commit 671e1af into main Nov 9, 2026
12 checks passed
@tonibergholm-codento
tonibergholm-codento deleted the deps/argon2-0.6 branch November 9, 2026 06:02
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.

3 participants