[TC 10 b10 and RC1] Windows Hello for master password ==> NCryptOpenKey "Keyset does not exist"

Please report only one bug per message!

Moderators: white, sheep, Hacker, Stefan2

glipman
Junior Member
Junior Member
Posts: 31
Joined: 2005-02-09, 20:59 UTC

[TC 10 b10 and RC1] Windows Hello for master password ==> NCryptOpenKey "Keyset does not exist"

Post by *glipman »

I have my FTP (and SFTP) stored connections protected by a master password.

When I select the new 'Windows Hello' checkbox then after entering the master password I get a Total Commander error dialog

Code: Select all

Function not supported!
Windows Hello: NCryptOpenKey

"Keyset does not exist"
This is with the beta 10 (don't know if it happend on older beta's as well)
My computer is a desktop running Windows 10 version 20H2 (build 19042.985)

Note: I have no desire to use Windows Hello (don't really know what it is) so I can simply *not* use the new feature. But I must have accidentaly activated the option and the error message was very confusing.
Last edited by glipman on 2021-05-20, 20:17 UTC, edited 1 time in total.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 41224
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 10 b10] Windows Hello for master password ==> NCryptOpenKey "Keyset does not exist"

Post by *ghisler(Author) »

Thanks, the error you get (NTE_BAD_KEYSET=0x80090016) is different from the one I get when no crypto key is defined (NTE_NO_KEY=0x8009000D).

I will try to catch it too and create a new key for encryption with Windows Hello. Maybe Microsoft changed some error codes in version 20H2.
Author of Total Commander
http://www.ghisler.com
glipman
Junior Member
Junior Member
Posts: 31
Joined: 2005-02-09, 20:59 UTC

Re: [TC 10 b10] Windows Hello for master password ==> NCryptOpenKey "Keyset does not exist"

Post by *glipman »

Tested with the new RC1. Now I get a slightly different error message, still confusing:

Code: Select all

Function not supported!
Windows Hello: NCryptCreatePersistedKey

"Keyset does not exist"
(b10 still gives NCryptOpenKey)

Note: yesterday I upgraded my Windows to 21H1 (OS Build 19043.985). Don't know if that is relevant.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 41224
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 10 b10 and RC1] Windows Hello for master password ==> NCryptOpenKey "Keyset does not exist"

Post by *ghisler(Author) »

That's strange, NCryptCreatePersistedKey should just CREATE the key when it doesn't exist - at least that works here on Windows 10 20H2 and 21H1.

Maybe Windows Hello is disabled on your system?
You need either
1. A fingerprint reader with a recorded fingerprint
or
2. A Microsoft account and enabled login via PIN code in addition to the password

Then you will be asked to scan your fingerprint or enter your PIN code to create the key to securely store the password.
Author of Total Commander
http://www.ghisler.com
glipman
Junior Member
Junior Member
Posts: 31
Joined: 2005-02-09, 20:59 UTC

Re: [TC 10 b10 and RC1] Windows Hello for master password ==> NCryptOpenKey "Keyset does not exist"

Post by *glipman »

Sorry for the confusion: I do not have a fancy camera or a fingerprint reader and I have no desire to use Windows Hello at all.

But I must have accidently activated the checkbox for Windows Hello and I was very confused by the error message I did not expect or understand.

I also just did a test on a virtual Windows 2016 Server (Version 1607 (SO Build 14393.693)
This gives another message (without even hinting Windows Hello)

Code: Select all

Error executing program! (-2146893808)
NCryptCreatePersistedKey

"Access denied."
I am totally fine getting an error message but expect something less cryptic (no pun intended).
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 41224
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 10 b10 and RC1] Windows Hello for master password ==> NCryptOpenKey "Keyset does not exist"

Post by *ghisler(Author) »

Sorry for the confusion: I do not have a fancy camera or a fingerprint reader and I have no desire to use Windows Hello at all.
You don't need either of them. Have you tried setting a pin code for login? This should be sufficient.

Edit: I have tried on a PC without a pin code, and I get the same error as you get. I will hide the Windows Hello checkbox when it is unavailable.
Author of Total Commander
http://www.ghisler.com
User avatar
Hacker
Moderator
Moderator
Posts: 12043
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: [TC 10 b10 and RC1] Windows Hello for master password ==> NCryptOpenKey "Keyset does not exist"

Post by *Hacker »

Christian,
You don't need either of them. Have you tried setting a pin code for login? This should be sufficient.
As I understand glipman does not want to use any of that. He just wonders if there could be a clearer error message when all the Windows Hello stuff is disabled but he checks the "Windows Hello" checkbox by accident.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 41224
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 10 b10 and RC1] Windows Hello for master password ==> NCryptOpenKey "Keyset does not exist"

Post by *ghisler(Author) »

I think the error message "Function not supported!" is quite clear.

It even reports why the function isn't supported:
Windows Hello: NCryptCreatePersistedKey
"Keyset does not exist"

But I think it's better to check this beforehand and disable the Windows Hello option if Windows Hello is present but unavailable. Currently it's only disabled when Windows Hello isn't present at all, e.g. on older Windows versions.
Author of Total Commander
http://www.ghisler.com
glipman
Junior Member
Junior Member
Posts: 31
Joined: 2005-02-09, 20:59 UTC

Re: [TC 10 b10 and RC1] Windows Hello for master password ==> NCryptOpenKey "Keyset does not exist"

Post by *glipman »

On my desktop I could no longer reproduce any problem with RC1 after setting a pincode a few days ago.

I did test with the latest 10.00RC2 on my Virtual Window s2016 server. I now get the same error message but this time at least a title "Windows Hello:" has been added

Code: Select all

Windows Hello:

Error executing program! (-2146893808)
NCryptCreatePersistedKey

"Access denied."
Luckily the checkbox 'Use Windows Hello' has been cleared automatically (as mentioned in history.txt).
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 41224
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 10 b10 and RC1] Windows Hello for master password ==> NCryptOpenKey "Keyset does not exist"

Post by *ghisler(Author) »

I made 2 changes in RC2:
1. Added "Windows Hello:" to tell the user from where the error came
2. Uncheck "Use Windows Hello" for all further uses of the master password dialog, so the user will not get the error again unless he checks "Use Windows Hello" manually again.

I don't know why you get an access denied error. Could you try running Total Commander with elevated rights by right clicking on its icon and choosing "Run As Administrator"?
Author of Total Commander
http://www.ghisler.com
glipman
Junior Member
Junior Member
Posts: 31
Joined: 2005-02-09, 20:59 UTC

Re: [TC 10 b10 and RC1] Windows Hello for master password ==> NCryptOpenKey "Keyset does not exist"

Post by *glipman »

Running elevated as administrator does not make a difference, still the NCryptCreatePersistedKey message

I also tested RC2 on another Windows 10 machine (1909, build 18363.1556) getting the same error message.

These are all machines where I never did anything with Windows Hello. Somehow that leads to this error message.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 41224
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 10 b10 and RC1] Windows Hello for master password ==> NCryptOpenKey "Keyset does not exist"

Post by *ghisler(Author) »

I tried on multiple machines and virutal machines without a Microsoft account and various Windows 10 versions, which never used Windows Hello, and it worked every time just fine.

Maybe you did something different? How did you enable the pin for Windows Hello?
Author of Total Commander
http://www.ghisler.com
glipman
Junior Member
Junior Member
Posts: 31
Joined: 2005-02-09, 20:59 UTC

Re: [TC 10 b10 and RC1] Windows Hello for master password ==> NCryptOpenKey "Keyset does not exist"

Post by *glipman »

Sorry for the confusion.
On the machine where I set a pincode last week everything is working fine: no error messages.

Only on machines where I never ever did something with Windows Hello (no pincode is set, no camera etcetera) do I get the NCryptCreatePersistedKey error message.
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3675
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Re: [TC 10 b10 and RC1] Windows Hello for master password ==> NCryptOpenKey "Keyset does not exist"

Post by *sqa_wizard »

On machines where you never ever did something with Windows Hello, verify at your wincmd.ini that your setting has:
UseWindowsHello=0
#5767 Personal license
glipman
Junior Member
Junior Member
Posts: 31
Joined: 2005-02-09, 20:59 UTC

Re: [TC 10 b10 and RC1] Windows Hello for master password ==> NCryptOpenKey "Keyset does not exist"

Post by *glipman »

sqa_wizard wrote: 2021-05-30, 17:27 UTC On machines where you never ever did something with Windows Hello, verify at your wincmd.ini that your setting has:
UseWindowsHello=0
What does that do?
I know I can prevent the error message by not selecting the checkbox to use Windows Hello. That is not the problem.
The problem is the confusing error message when someone were to accidently activate that option.
Post Reply