EFS private key is normally encrypted by users Windows password, but when PIN (and TPM magic) is used to sign user in using Windows Hello, the user's passphrase is not used at all…so how can Windows access EFS private key since user password is not given?

So, how are user EFS privatekey protected and unprotected as Windows Hello PIN is used?

(I have literally searched everywhere for answers, but got none)

2 Answers 2


Firstly see Microsoft's documentation on Windows Hello. Basically, when your’re using Windows hello, the traditional user password is replaced by a mixture of a PIN and the Trusted Platform Module, for authentication. **The TPM is a hardware component that securely stores cryptographic keys, sorta like Apple’s secure enclave.

During the setup of Windows Hello, the EFS private key is protected by the TPM. The user’s PIN or biometric data (e.g. fingerprint, face recognition) is used to unlock the TPM, which then releases the decryption key for the EFS private key. Simple!

Technology like MS’s Credential Guard and Virtual Secure Mode are used by Windows to help isolate and protect sensitive information including the cryptographic keys. The point of these is basically to make sure that even without the user's password, the EFS private key can be securely accessed using the TPM and the authentication data (I discussed) provided by Windows Hello.

I was able to find all of this information directly from https://learn.microsoft.com, just to let you know!

  • 1
    Thank for your quick and efficient answer. :)
    – mmja
    Commented Jul 9 at 3:50
  • @mmja No worries I hope you understand now! Commented Jul 9 at 4:11

There was a very interesting deep dive into Windows Hello presented at CanSecWest 2019.
Link: https://sec.today/events/talk/da40a559-1760-46b8-bcb3-eac02591c65b/
Presenter: https://sites.google.com/g.skku.edu/meoseriful/publication
Slides: https://drive.google.com/file/d/1IVB6MWnrH_G0eA495IiR1ZqogM0H2mbi/view

I no longer fully remember the details, but one of the things the researcher found is that the Windows Hello PIN is used to derive a key that is used to unwrap a private key, which in turn is used to unwrap several more private keys. One of those private keys (PK2 for local accounts, see slide 43) is used to decrypt HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\NgcPin\Credentials\EncryptedPassword, which is either the user's actual password or a digest derived from it and used internally by Windows for authentication purposes. Basically, the PIN is - through a substantially stronger password hashing algorithm than the old MD4-based NTLM hashing - used to get a key that gives access on the local computer (and for local network requests) to the secrets normally protected by the password. For Microsoft accounts, PK3 is used for local login instead (see slides 44-45), and I'm not clear whether it also is used to unwrap local authentication secrets or if that's still PK2.

I don't know if one of the PIN-protected private keys is used to decrypt the EFS private key directly, indirectly through an intermediate key specific to Windows Hello, or indirectly through the path by which the user's password normally provides access to EFS (which is itself through PK2 or PK3). Either way, though, the OS obviously has access to the EFS, DPAPI, and NTLMv2 secrets after Windows Hello local authentication.

It is also likely, on machines where a TPM is available, that the decryption process for those local secrets (EFS, DPAPI, NTLMv2), looks different than in the slides. In particular, the private keys, and possibly the secrets themselves, likely live in the TPM. However, at the end of the day, the OS does need access to them, so even if the TPM prevents you from extracting the private keys, or indeed protects the EFS, etc. private keys directly, the secrets will still be available to the OS after authentication.

  • By "PIN protected privatekey" you mean "TPM encrypted privatekey that is unlocked from TPM by PIN"? Right? RIGHT?!?
    – mmja
    Commented Jul 13 at 16:36
  • On machines with an available TPM, that is probably true. On machines without a TPM, or where the TPM is disabled, or where it is otherwise unavailable to the OS (e.g. on many virtual machines, the TPM is not accessible, and I'm not sure if very old TPMs are still supported), no, obviously not. The research was conducted on a machine configured without a TPM, so I can't confirm which keys are protected by the TPM. Do please read the last paragraph of my answer though, I already addressed that point (also, the private keys themselves are useless without the data that they protect).
    – CBHacking
    Commented Jul 14 at 23:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .