Join our Newsletter — 33% off our NHI Course
Home› FAQ› Foundations & NHI Taxonomy› How does Cryptography API: Next Generation work?
Foundations & NHI Taxonomy

How does Cryptography API: Next Generation work?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated October 18, 2026 Domain: Foundations & NHI Taxonomy

Cryptography API: Next Generation is a Windows cryptographic framework that lets applications use system cryptography through a common interface. It works by exposing providers for hashing, encryption, signing and key storage, while the operating system manages many implementation details. Security teams should check which providers and algorithms applications use and whether keys are hardware-protected where required.

How CNG exposes cryptographic services to applications

Cryptography API: Next Generation, or CNG, is not a single algorithm library so much as a Windows framework for brokering cryptographic services. Applications call a common interface, and the operating system routes requests to the appropriate provider for hashing, encryption, signing, or key storage. That abstraction lets software consume cryptography without hard-coding one implementation.

In practice, that means the application usually asks for a capability such as “hash this data” or “sign this payload,” and CNG handles provider selection, algorithm implementation, and much of the plumbing. The key point for practitioners is that the security properties are shaped not only by the algorithm name, but also by the specific provider, mode, and key handling path the application actually uses.

What CNG changes about hashing, encryption, signing, and key storage

CNG separates the cryptographic operation from the underlying implementation details. A provider may supply hashing, symmetric encryption, public-key signing, or storage for long-term keys and certificates, while Windows mediates access through the framework. This makes the interface consistent across applications, but it also means two apps using the “same” algorithm may still have different assurance depending on provider choice and configuration.

That distinction matters because cryptography is not just about mathematical correctness. It is also about whether the key material is generated, stored, and used in a way that limits exposure. If a workload uses software-backed keys when hardware-backed protection is required, or if it relies on an outdated provider configuration, the framework can be working correctly while the security outcome is still weak.

For teams reviewing an application stack, the useful questions are simple: which CNG provider is in use, which algorithms are permitted, how are keys created and persisted, and whether the application is relying on system defaults or explicit cryptographic policy. Cryptography Basics Guide is a useful companion when you need to map those choices back to hashes, signatures, cipher modes, and key exchange rather than treating “uses CNG” as a complete answer.

Why provider choice and key protection matter operationally

CNG centralises decision points that often stay hidden from application owners. That is helpful, but it can also mask drift. A development team may test with one provider and ship with another, or assume that a key is hardware-protected when it is actually stored in software-backed form. The framework does not remove the need for control, it makes the control boundary less visible.

Operationally, this is why cryptographic inventory matters. If you cannot identify which provider and algorithm combination is in use, you cannot reliably assess compatibility, compliance, or migration risk. The same is true for key lifecycle: if the application depends on long-lived keys or opaque defaults, rotation and rollback become harder, and incidents become more expensive to contain.

That is also where host security and platform hardening intersect with cryptography. A key store that is technically protected can still be undermined by weak endpoint security, stolen admin access, or poor application isolation. The cryptographic framework may protect the primitive, but the environment still determines how exposed the secret material is in real use. Endpoint Security Guide is relevant here because key access and cryptographic operations ultimately run on a host that must be monitored and hardened.

When cryptographic operations cross trust boundaries, configuration hygiene becomes just as important as the cryptographic primitive itself. Firewall Management Guide is not about CNG directly, but it supports the broader operating reality that sensitive services, administration paths, and update channels should stay tightly controlled while cryptographic assets are in use.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

NIST SP 800-57, NIST SP 800-53 Rev 5 and OWASP ASVS set the technical controls, while ISO/IEC 27001:2022 defines the regulatory obligations.

FrameworkControl / ReferenceRelevance
NIST SP 800-57Key ManagementCNG use hinges on key generation, storage, rotation, and protection choices.
Recommendation — Apply key lifecycle rules to review generation, storage, rotation, and destruction for CNG-managed keys.
ISO/IEC 27001:2022A.8.24 — Use of CryptographyCNG is the Windows mechanism for cryptographic use and key handling.
Recommendation — Define approved cryptographic use and verify CNG configurations meet policy.
NIST SP 800-53 Rev 5SC-13 — Cryptographic ProtectionCNG implements cryptographic protection for data, signatures, and key handling.
IA-5 — Authenticator ManagementCNG key storage often underpins authentication and signing material.
Recommendation — Require approved cryptographic protection for sensitive data and validate the implementation path. Manage key lifecycles for any CNG-backed authenticators and rotate them on schedule.
OWASP ASVSV11 — CryptographyApplication use of CNG maps directly to cryptographic implementation and verification needs.
Recommendation — Verify cryptographic implementation details, including provider choice and key handling.

Practitioner Guidance

What to verify: Confirm the exact provider, algorithm, and key store path each critical application uses, not just the API family it calls. If the application can silently fall back to a different provider or software-backed key storage, treat that as a configuration risk.

Decision rule: If the application protects high-value data, signing keys, or authentication material, prefer hardware-backed or otherwise strongly protected key storage where the platform and use case support it. If portability or interoperability is the reason for a weaker setting, document that trade-off explicitly and time-box it.

What practitioners underestimate: Teams often focus on algorithm strength and overlook provider behavior, key persistence, and migration drift. In CNG environments, those implementation details are usually where the real operational risk shows up.

Practitioner takeaway: Treat CNG as a control plane for cryptography, not a guarantee of cryptographic assurance, and validate the provider and key path with the same care you would apply to the algorithm itself.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on October 18, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org