Subscribe to the Non-Human & AI Identity Journal

Public-Key Cryptography

Public-key cryptography uses a paired public key and private key to prove identity without sharing the same secret during login. The public key can be stored by the service, while the private key stays on the user device or authenticator. Its security depends on strong key generation, device protection, and safe lifecycle management.

Expanded Definition

Public-key cryptography is the asymmetric foundation that lets a service verify possession of a private key without ever learning it. In NHI and IAM programs, it is the core mechanism behind certificate-based authentication, workload identity, and many proof-of-possession flows. The public key can be distributed broadly, while the private key must remain protected on the device, agent, or key store that controls the identity.

Definitions vary across vendors when public-key cryptography is discussed alongside certificates, ssh key, or hardware-backed authenticators, so it helps to separate the primitive from the wrapper. The cryptographic primitive is only one layer; operational security also depends on issuance, rotation, revocation, attestation, and storage controls. That distinction matters because strong algorithms do not compensate for weak lifecycle management. Guidance in the identity standards ecosystem, including the PCI DSS v4.0 library, consistently treats key protection and secure handling as governance issues, not just engineering details.

The most common misapplication is treating a public key as a trust signal by itself, which occurs when a service accepts a key without verifying its origin, binding, or current validity.

Examples and Use Cases

Implementing public-key cryptography rigorously often introduces operational friction, requiring organisations to weigh stronger identity assurance against key distribution, rotation, and recovery complexity.

  • Workload authentication in Kubernetes or service meshes, where an agent or service proves identity with a private key and presents a public-key-backed certificate for verification.
  • SSH access for administrators or automation, where private keys replace shared passwords and access can be tied to device control and key rotation policy. For broader NHI governance patterns, see the Ultimate Guide to NHIs.
  • Mutual TLS between APIs, where both sides authenticate using certificates derived from public-key infrastructure and revocation checks become part of runtime trust.
  • Hardware-backed signing for privileged workflows, where the private key never leaves a secure element or authenticator, reducing exposure if endpoint software is compromised.
  • Certificate-based machine identities in regulated environments, where auditability and controlled lifecycle management support policy enforcement under PCI DSS v4.0.

For NHI teams, the practical lesson is that asymmetric cryptography is most valuable when it is bound to a managed identity lifecycle. The Ultimate Guide to NHIs is useful for connecting this primitive to rotation, visibility, and offboarding decisions.

Why It Matters in NHI Security

Public-key cryptography reduces password reuse and secret sharing, but it does not eliminate identity risk. If private keys are copied, certificates are stale, or revocation is slow, attackers can impersonate services, automate lateral movement, and persist in trusted paths. That is why NHI programs treat key custody, rotation cadence, and trust binding as first-class controls. The operational issue is not the math; it is the security posture around where keys live, who can use them, and how quickly they can be invalidated.

NHI exposure is often underestimated until an incident reveals how much machine access depends on long-lived keys. NHI Mgmt Group research shows that 71% of NHIs are not rotated within recommended time frames, which means key-based trust can become stale long before teams notice. That risk is amplified when secrets are stored outside managed systems or when service accounts are not inventoried well enough to revoke them promptly. When the NHI governance model is weak, public-key cryptography can become a durable attacker foothold instead of a control.

Organisations typically encounter key compromise, certificate expiry, or unexplained service impersonation only after an outage or breach, at which point public-key cryptography becomes operationally unavoidable to address.

Standards & Framework Alignment

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

OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST SP 800-63 and NIST Zero Trust (SP 800-207) set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
NIST SP 800-63 Digital identity assurance guidance covers authenticator strength and proofing for key-based identities.
NIST Zero Trust (SP 800-207) Zero Trust relies on continuous verification of identities, including certificate-backed workloads and services.
OWASP Non-Human Identity Top 10 NHI-02 Key and secret handling maps to NHI guidance on improper secret and credential management.

Inventory, rotate, and protect private keys as managed NHI credentials, not static infrastructure artifacts.