Supported TPM 2.0 NV Counter and Extend provisioning on Windows 10/11

NERCAM 0 Reputation points
2026-11-03T09:35:43.5366667+00:00

On Windows 10/11 x64 with a normally Windows-provisioned TPM 2.0, is there a supported application route to create and subsequently reopen an application-owned, non-ORDERLY 8-byte NV Counter and non-ORDERLY SHA-256 NV Extend index?

Please clarify these separate authorization boundaries:

1. Windows/TBS command admission

Which supported Windows versions, editions and servicing channels permit the required NV_DefineSpace, NV_ReadPublic, NV_Read, NV_Increment, NV_Extend, StartAuthSession and FlushContext operations through TBS? What caller privileges are required?

2. First-time hierarchy authorization

What supported API or provisioning mechanism supplies the owner/platform hierarchy authorization, or satisfies an applicable hierarchy policy, for the initial NV_DefineSpace?

Tbsi_Get_OwnerAuth(TBS_OWNERAUTH_TYPE_STORAGE_20) is documented as retrieving retained authorization, but its availability under normal Windows provisioning is unclear.

Administrator or SYSTEM privileges alone should not be assumed to provide TPM hierarchy authorization.

3. Authorization after creation

How should the application provision and protect its own per-index authorization, then reopen and authenticate the existing indices after reboot or an application update? Please distinguish this from the hierarchy authorization needed to create them.

4. Installer requirements

Which operations require an explicitly elevated installer, and which can run in a service or ordinary user context? Are there supported index-allocation, resource or lifecycle requirements?

5. Lifetime binding

Is there a supported way to bind both NV Names to an application TPM-backed key so that TPM Clear or replacement invalidates the previous binding instead of permitting silent recreation?

The required route must work without TPM Clear, changing OSManagedAuthLevel, altering Windows TPM ownership or security policy, bypassing TBS/driver restrictions, or obtaining system secrets through unsupported methods.

Please provide applicable Microsoft documentation or an authoritative platform support reference. If no such route is supported under these constraints, please state that explicitly.

Windows development | Windows API - Win32
0 comments No comments

2 answers

Sort by: Most helpful
  1. Gatlin Le (WICLOUD CORPORATION) 1,385 Reputation points Microsoft External Staff Moderator
    2026-11-03T11:01:23.8433333+00:00

    Hi @NERCAM

    I could not find Microsoft documentation that defines a supported route for this scenario. I tested it on one configuration: Windows 11 Pro x64 build 26300.9457, Microsoft vTPM 2.0, elevated, OSManagedAuthLevel = 5. Tbsi_Get_OwnerAuth(STORAGE_20) returned authorization that created both non-ORDERLY indices, the 8-byte Counter and the SHA-256 Extend index. A fresh process reopened them with their own authorization values, reads, increments, and extends behaved as expected, and both indices were removed without clearing the TPM or changing ownership or policy. Reboot, application updates, physical TPMs, Windows 10, and the VM's provisioning history were not verified.

    On documentation, Using TBS states that standard users and administrators can open a TBS context while certain commands stay blocked, and Command Blocking states that the TPM 2.0 allow list has been fixed in the driver since Windows 10 version 1809. Neither gives a per-command matrix by version, edition, servicing channel, or caller. Change the TPM owner password describes the default OSManagedAuthLevel of 5 as keeping the lockout authorization, and Tbsi_Get_OwnerAuth only returns authorization stored in the local registry, so neither documents STORAGE_20 availability under default provisioning. My result is an observation, not a documented guarantee.

    I could not find any Microsoft documentation for per-index authorization after creation, which is defined by the TPM 2.0 specification, an installer/service/user split, NV handle allocation or quota, or binding NV Names to a CNG key. TBS also doesn't virtualize counters or NV storage, which must be shared cooperatively between software stacks (Resource Virtualization).

    If your organization has a Microsoft support plan, please open a request through Microsoft Engage Center and ask whether Tbsi_Get_OwnerAuth(TBS_OWNERAUTH_TYPE_STORAGE_20) is a supported source of owner hierarchy authorization under default provisioning, and whether TBS admits TPM2_NV_DefineSpace and TPM2_NV_Extend for administrator or service callers on your target Windows versions.

    I hope this helps clarify the available documentation and the appropriate next step. If you found my explanation above was truly helpful or informative to you, I would greatly appreciate it if you could follow this guidance so others with the same issue could benefit as well.

    Thank you.

    Was this answer helpful?


  2. AI answer

    2026-11-03T09:37:14.28+00:00

    Under the stated constraints, Microsoft does not document a supported general-purpose Windows application route for creating those application-owned TPM 2.0 NV Counter and NV Extend indices on a normally provisioned Windows 10/11 device.

    1. TBS command admission

    TBS provides a raw command transport through Tbsi_Context_Create and Tbsip_Submit_Command; successful submission only means TBS accepted the request—the TPM can still return an error in the response buffer.^1^

    • On Windows 8 and later, standard users and administrators can create TBS contexts. Therefore, elevation by itself is not the general TBS access boundary.^2^
    • TBS separately applies command blocking. For TPM 2.0 it uses an allowlist, and beginning with Windows 10 version 1809 that allowlist is fixed in the TPM driver and cannot be expanded through the documented registry mechanism.^3^
    • The Windows TPM 2.0 hardware profile includes StartAuthSession, FlushContext, NV_DefineSpace, NV_ReadPublic, NV_Read, and NV_Increment. NV_Extend is optional, so its presence cannot be assumed across Windows-compatible TPMs.^4^

    That hardware profile is not a per-version TBS admission guarantee. The published material supplied here does not provide a Windows 10/11 build-by-build and caller-class matrix proving that every listed command is admitted by TBS. In particular, TPM implementation support for optional NV_Extend and TBS admission are separate checks.

    A desktop process can request a TPM 2.0 context as follows:^5^

    TBS_CONTEXT_PARAMS2 p{};
    p.version = TPM_VERSION_20;
    p.includeTpm20 = 1;
    
    TBS_HCONTEXT context{};
    TBS_RESULT result =
        Tbsi_Context_Create(
            reinterpret_cast<PCTBS_CONTEXT_PARAMS>(&p),
            &context);
    
    if (result != TBS_SUCCESS) {
        // Handle TBS_E_TPM_NOT_FOUND or another TBS error.
    }
    

    Actual deployment qualification must submit the intended command set on every supported Windows build and distinguish:

    1. a TBS rejection;
    2. a TPM authorization failure;
    3. an unsupported TPM command;
    4. an NV allocation or attribute error.

    2. Initial hierarchy authorization

    TPM2_NV_DefineSpace still requires authorization for the selected hierarchy or a policy satisfying that hierarchy. Being Administrator, SYSTEM, or an installer does not supply that TPM authorization.

    Tbsi_Get_OwnerAuth is only a retrieval API: it returns authorization if it is available in the local registry, and otherwise returns TBS_E_OWNERAUTH_NOT_FOUND.^6^ It is not an API that grants hierarchy authority or provisions an application-specific delegation.

    This is decisive for normally provisioned systems:

    • Windows automatically initializes and takes ownership of the TPM.^7^
    • Starting with Windows 10 version 1607, Windows does not retain the TPM owner password during normal provisioning; it sets a random high-entropy value and discards it.^8^
    • The documented policy can retain additional authorization, but that requires changing OSManagedAuthLevel, which the question explicitly excludes.^9^

    No documented API in these sources asks Windows to perform an application’s arbitrary NV_DefineSpace, supplies the missing storage-hierarchy authorization, or installs an applicable hierarchy policy on the application’s behalf. Consequently, first-time creation cannot be made generally supported merely by elevating the installer.

    3. Authorization after creation

    If an index had already been created by an authorized provisioning authority, its later authorization would be separate from hierarchy authorization:

    • The hierarchy authorization controls initial definition and hierarchy-level lifecycle operations.
    • The index’s authValue and/or authPolicy, together with its attributes, control later NV_Read, NV_Increment, or NV_Extend operations.
    • NV_ReadPublic can recover public metadata and the NV Name; it does not recover a secret authorization value.

    The application would therefore need to generate an independent high-entropy per-index secret, set the required index attributes at definition time, and persist that secret under access control appropriate to the service or user. The available Microsoft documentation does not define a Windows-managed secret-provisioning or reopening API specifically for arbitrary application NV indices. Raw TBS leaves TPM command construction, sessions, secret storage, handle discovery, Name validation, and update migration to the application.

    This post-creation design does not solve the missing authorization for the initial NV_DefineSpace.

    4. Installer, allocation, and lifecycle

    There is no supported “elevated installer” exception to the hierarchy boundary. Elevation may be needed for ordinary machine-wide installation tasks, but it neither changes the TPM authorization value nor bypasses the TPM 2.0 command allowlist.

    NV allocation is also device-dependent. TPM errors distinguish insufficient NV space, an already-defined index, invalid size, locked state, and authorization failure.^10^ The supplied documentation does not assign a third-party application NV-handle range, reserve NV capacity, or specify a Windows lifecycle contract for arbitrary application indices. An installer therefore cannot assume that a chosen handle or sufficient NV storage is available.

    5. Binding and TPM Clear/replacement detection

    A supported way to obtain an application key tied to the current TPM is the Microsoft Platform Crypto Provider. It creates TPM-protected keys whose private material is non-removable and unique to that TPM.^11^

    An application protocol can have that key sign a record containing both NV Names and retain or remotely register the signed record. After TPM Clear or replacement, the original private key is unavailable; clearing destroys TPM-created keys and protected data.^12^

    However:

    • Microsoft does not document a direct Windows API that cryptographically attaches arbitrary NV Names to a CNG key.
    • A signed binding record only prevents silent recreation if the prior key identity or signed record is anchored somewhere that cannot also be replaced—such as a remote service, administrator-controlled store, or independently protected state.
    • Purely local state that is recreated along with the TPM key cannot, by itself, distinguish legitimate reprovisioning from silent recreation.

    Therefore, TPM-backed key binding can support clear/replacement detection at the application-protocol level, but it does not supply the hierarchy authorization needed to create the two NV indices. Under all the listed restrictions, the complete provisioning route is not publicly documented as supported.


    References

    1. Tbsip_Submit_Command function (tbs.h)
    2. Using TBS
    3. Command Blocking
    4. TPM V2.0 Command and Signal Profile
    5. Tbsi_Context_Create function (tbs.h)
    6. Tbsi_Get_OwnerAuth function (tbs.h)
    7. Trusted Platform Module Technology Overview
    8. Change the TPM owner password
    9. TPM Group Policy settings
    10. COM Error Codes (TPM, PLA, FVE)
    11. How Windows uses the Trusted Platform Module
    12. Troubleshoot the TPM
    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.