Skip to content

KeychainAccess: Replace CRYPTPROTECT_LOCAL_MACHINE by 0 #1

Closed

Description

@infeo

The class WindowsProtectedKeychainAccess implements the SPI KeychainAccessProvider, to store safely user passphrases. It uses the Windows Data Protection API, namly the (native) functions CryptProtectData and CryptUnprotectData.

Looking at the native code implementation, the the first funciton is called with CRYPTPROTECT_LOCAL_MACHINE as the dwFlag parameter, leading to the behaviour, that any user account on the system is able to decrypt the encrypted passphrase:

BOOL success = CryptProtectData(&cleartextBlob, NULL, &saltBlob, NULL, NULL, CRYPTPROTECT_LOCAL_MACHINE, &ciphertextBlob);

This is undesired and should be changed to only the creating user account can "unprotect" the data it created.

Activity

  1. added this to the 0.2 milestone on Dec 10, 2020
  2. added a commit that references this issue on Dec 11, 2024
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions