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

Offen
#1,981 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
22/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
c

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
C
Sterne
11.7k
Forks
1.4k
Ø Merge
1 T. 1 Std.
Gemergte PRs (30 T.)
28

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus veracrypt/VeraCrypt

Alle Issues in veracrypt/VeraCrypt

Ähnliche Issues

Weitere Issues zu C

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.