Hi @Mathieu Carlson ,
Thanks for posting your questions.
I haven’t found a public Microsoft reference that specifies the Microsoft Software KSP’s GENERIC_MAPPING or maps each NCrypt operation to its required ACE access mask. The documented answer is therefore limited:
- Generic mapping: The documentation for NCRYPT_SECURITY_DESCR_PROPERTY identifies the property as a persisted key’s security descriptor, but does not define the mapping. Your mask is:
AlthoughGENERIC_READ | GENERIC_WRITE | GENERIC_ALL | 0x001F01FF0x001F01FFequalsFILE_ALL_ACCESS, that numerical match does not establish a supported Software KSP mapping. I would not use it as authoritative justification for supplying the file-object mapping. - Operation-specific rights: Windows defines
WRITE_DACfor modifying a DACL,WRITE_OWNERfor changing ownership, andDELETEfor deleting an object. Access to the auditing SACL requiresACCESS_SYSTEM_SECURITYand the appropriate privilege. These are native Windows security rights, not NCrypt-specific constants. See Standard Access Rights and SACL Access Right. These definitions do not establish every check performed by the corresponding NCrypt calls. For signing, I found no documented Software KSP ACE permission.NCRYPT_ALLOW_SIGNING_FLAGis a key-usage policy flag, not an access-mask bit to pass toAccessCheck. - Read-only verification: I’m not aware of a documented NCrypt API that evaluates an arbitrary token’s authorization for all three operations without performing them. A signature-buffer-size query is documented to return the required size, not to prove signing authorization.
-
AccessCheck: It can evaluate descriptor grants but requires the appropriate object mapping. Its documented inputs include an impersonation token withTOKEN_QUERY, owner and group SIDs in the descriptor, and a desired-access mask without generic bits.WRITE_DACandDELETEidentify the respective standard-right checks; I cannot provide a documented Software KSP mapping or signing mask. See AccessCheck.
Even a correctly configured descriptor check would not evaluate separate key-usage or strong-key UI requirements. Your distinction between opening the key, permitted key usage, and effective authorization is therefore appropriate.
For the supported contract you’re seeking, I'd suggest reporting it through Feedback Hub so it reaches the Windows team directly:
- Press Windows logo key + F (or search for Feedback Hub in Start).
- Search for existing feedback first. If you find a matching report, upvote it and add your details.
- If there isn't one, select Report a problem and choose the category that fits best.
If you found my support helpful, I’d really appreciate it if you could follow this guide so others with similar issue can benefit as well.
Thank you.