Skip to content

Conversation

@carolinecreamer
Copy link
Contributor

@carolinecreamer carolinecreamer commented Nov 17, 2025

Add VBS-Protected Key Attestation Sample.

{
cout << "Creating VBS NCrypt (Key Guard) key...";

wil::unique_ncrypt_key key_guard_key = create_key(MS_KEY_STORAGE_PROVIDER, nullptr, NCRYPT_OVERWRITE_KEY_FLAG | NCRYPT_USE_VIRTUAL_ISOLATION_FLAG);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NCRYPT_OVERWRITE_KEY_FLAG should not be required as the key is ephemeral (name = nullptr).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keeping NCRYPT_OVERWRITE_KEY_FLAG because key is no longer ephemeral.

}

return 0;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should have a comment explaining what the report will contain, similar to the comment on sample_tpm_key_att.cpp.

@carolinecreamer carolinecreamer changed the title Add VBS NCrypt (Key Guard) Key Attestation Sample. Add VBS-Protected Key Attestation Sample. Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants