Resource-bound guarantees for Windows CNG/Authenticode verification

Antoine Bourbeau-Callender 0 Reputation points
2026-11-19T01:41:05.95+00:00

We need implementation-specific documentation supporting conservative resource reservations before any candidate read or provider initialization. This is an evidence inquiry, not a request to install, execute or change Windows settings.

Scope is only this NuGet 8.0.0 executable:

https://dist.nuget.org/win-x86-commandline/v8.0.0/nuget.exe

Expected complete raw-file SHA256:

D4DDB222CB8FCA8200B59E82286C0CBA9C29B4FCE6F9835FDFA54E67C9483D07

Reference authority: merged Microsoft WinGet commit 8d52cdc7dddf4a2dbf68f99da9b4bc781701da22.

A complete retained-file digest match must precede signature processing. Ordinary Windows Authenticode success is additionally required under our assumed existing Windows root/disallowed-state baseline. For this exact target we do not require separately published fixed executable leaf/root/TSA fingerprints or claim independent publisher-signature proof. Actual digest and signature checks have not run; primary-signature/current-validity compatibility is unknown.

Required call profile, subject to binding actual implementation identities:

  • CNG: BCryptOpenAlgorithmProvider with BCRYPT_SHA256_ALGORITHM, explicit MS_PRIMITIVE_PROVIDER (L"Microsoft Primitive Provider"), flags 0; one ordinary hash context, incremental BCryptHashData and BCryptFinishHash, flags 0, exactly 32 digest bytes. Hash complete raw bytes from offset 0 through EOF; no PE normalization or exclusions. Require STATUS_SUCCESS and correct output/property sizes. No default-provider fallback, HMAC or reusable hash. Reserve setup/property/context operations and cleanup; destroy the hash with BCryptDestroyHash before BCryptCloseAlgorithmProvider.
  • Retain the same readable ordinary-file handle and ancestor/file identities through verification and handoff. Open read-only/OPEN_EXISTING with FILE_SHARE_READ only; reject unsafe/reparse/recall paths. Sharing alone is not our mutation/race proof.
  • WinVerifyTrust: WINTRUST_ACTION_GENERIC_VERIFY_V2, hwnd=INVALID_HANDLE_VALUE. WINTRUST_FILE_INFO uses that retained hFile and mandatory absolute pcwszFilePath. Independently bind pgKnownSubject to the PE SIP identity before invocation; no automatic subject/provider discovery, catalog fallback or alternate-provider fallback.
  • Correctly size/initialize WINTRUST_DATA: WTD_UI_NONE, WTD_CHOICE_FILE, only pFile populated; fdwRevocationChecks=WTD_REVOKE_WHOLECHAIN; dwProvFlags contains exactly WTD_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT, WTD_CACHE_ONLY_URL_RETRIEVAL, WTD_LIFETIME_SIGNING_FLAG and WTD_DISABLE_MD2_MD4. No UI, revocation bypass, hash-only, policy-usage bypass, auto-cache or auto-cache-flush mode.
  • Initially null hWVTStateData; null pPolicyCallbackData, pSIPClientData and pwszURLReference; WTD_UICONTEXT_EXECUTE. WINTRUST_SIGNATURE_SETTINGS uses WSS_VERIFY_SPECIFIC, dwIndex=0; returned dwVerifiedSigIndex=0 is required. No secondary-signature retry. Only LONG zero passes the WinTrust API stage; warnings or HRESULT/SUCCEEDED interpretation cannot produce success.
  • WTD_STATEACTION_VERIFY must be followed by WTD_STATEACTION_CLOSE after every verification attempt, including refusal. Reserve cleanup before VERIFY; inspect required provider-owned evidence before CLOSE invalidates its lifetime. Preserve first failure; failed/incomplete cleanup or unsettled service ownership prevents success. Zero automatic retries.
  • Require current signer validity at evaluation time from our assumed Windows clock, without backdating or timestamp extension beyond signer expiry. Any participating timestamp needs separately bound signature/imprint/authority/time/chain constraints. Missing, stale, unknown or revoked required offline evidence refuses without refresh, warning downgrade or fallback.

Strong-signature structure/algorithm constraints, exact issuer-bound signed CRL/OCSP inputs, maximum acceptable age, clock tolerance, timestamp constraints and actual root/disallowed-state inputs remain UNSET/UNBOUND. Disabling MD2/MD4 alone is not a complete strong-signature policy.

Inspector ABI/bitness, Windows build, provider/SIP/module/load closure and numeric input/proof/resource limits also remain unbound. No defaults or actual-host compatibility are assumed; please identify which finite parameter limits and configuration bindings your guarantees require. This inquiry does not authorize invocation with missing fields.

Can Microsoft provide documented upper bounds, expressed against finite caller-declared input/proof limits, covering the complete operation:

  1. Total attempted reads and cumulative bytes, including repeated, failed and partial file, certificate-store and cache access.
  2. Parsing/cryptographic work and provider-call counts.
  3. Live/peak and cumulative allocations, handles, threads, processes and delegated service resources, including work outside the caller process.
  4. Initialization, malformed inputs, all failure paths, cleanup and service settlement, with a complete bounded call schedule.

Please identify applicable Windows builds, module/provider/SIP versions, dependencies, registered load paths and configuration prerequisites, together with evidence binding those implementations to the stated bounds.

We also need documented prevention/coverage of prohibited network retrieval and unapproved writes, including cache/store/service effects. Cache-only flags alone are not our proof; no cache warming, root update, certificate import or provider/security configuration change is permitted.

Measurements, caller-buffer sizes, mapping windows and process polling alone cannot satisfy our requirement. If these guarantees are unavailable, please state that explicitly and distinguish unsupported guarantees from available controls. A documented resource bound would not by itself settle our separate identity, trust-freshness, forbidden-effect and retained-handoff requirements.

Windows development | Windows API - Win32
0 comments No comments

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.