Skip to content

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

Open

Description

@ABiswasDev

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](#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](#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.

Activity

  1. flatstik commented on Nov 1, 2026

    @flatstik
    Contributor

    This is a duplicate of #1969 . Please close as redundant and make your AI to actually read the #1969

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions