Windows: Password Cache Causes Excessive Argon2 KDF Delays with High PIM Values

未关闭
#1,981 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
22/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
c

调研方向

Start with ReadVolumeHeaderWCacheWithAbort() in src/Common/Cache.c, which loops over cached passwords and PIMs, and with its caller in src/Driver/Ntvol.c. Trace how ReadVolumeHeaderWithAbort() picks the PRF and reaches the Argon2 path when the PIM is above 31. Done means cached attempts no longer trigger the expensive derivation on Windows, with the cache behaviour checked against the Linux/macOS work in PR #1972. This touches crypto and kernel-driver code, so it is not a good first task without maintainer guidance.

由索引模型根据 Issue 内容生成。

描述

bug
Source verification against VeraCrypt 1.26.30

The Windows password-cache path still contains the behavior described in this issue.

  1. In [src/Common/Cache.c](https://github.com/veracrypt/VeraCrypt/blob/VeraCrypt_1.26.30/src/Common/Cache.c#L58-L151), ReadVolumeHeaderWCacheWithAbort() stores cached passwords and PIM values, but does not retain the PRF/KDF that successfully opened each volume.

  2. When the supplied password is empty, the function iterates through cached passwords and calls ReadVolumeHeaderWithAbort() for each candidate using the same pkcs5_prf and the candidate's cached PIM.

  3. The Windows driver invokes this function through [src/Driver/Ntvol.c](https://github.com/veracrypt/VeraCrypt/blob/VeraCrypt_1.26.30/src/Driver/Ntvol.c#L622-L652).

  4. With KDF autodetection enabled and PIM values above 31, unsuccessful cached-password attempts can enter the expensive Argon2 derivation path. This can require approximately 1 GiB of memory per attempt, with computational cost increasing alongside PIM.

The Linux/macOS cache work in [PR #1972](https://github.com/veracrypt/VeraCrypt/pull/1972) does not cover the Windows driver. Its description explicitly identifies src/Common/Cache.c as unchanged. The same Windows-side limitation is also documented in [#1969](https://github.com/veracrypt/VeraCrypt/issues/1969).

Version reviewed: VeraCrypt 1.26.30
Tag: [VeraCrypt_1.26.30](https://github.com/veracrypt/VeraCrypt/tree/VeraCrypt_1.26.30)
Runtime qualification: The original Windows behavior was reported on 1.26.29. The persistence in 1.26.30 is confirmed by source inspection, not by a new runtime reproduction on that release.

主要语言
C
星标
11.7k
派生
1.4k
平均合并
1 天 1 小时
30 天内合并 PR
28

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

veracrypt/VeraCrypt 的其他 Issue

查看 veracrypt/VeraCrypt 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。