Security · intermediate

How do certificates and PKI give an IoT device an identity?

How per-device certificates, a private CA and a hardware root of trust give every IoT device a provable identity, and how to provision and rotate them at scale.

A small padlock and a set of keys resting on a keyboard

Photo: Sasun Bughdaryan / Unsplash

After reading this article you will be able to:

  • Explain why a key pair held in a secure element beats passwords or shared secrets
  • Tell apart a manufacturer birth certificate (IDevID) from an operational certificate (LDevID)
  • Choose a provisioning route and plan rotation, revocation and retirement for the fleet

Drafted with AI from primary sources · checked by a separate AI agent · spot-checked by our editors · How we check

On this page
  1. Why not passwords or shared secrets?
  2. What is inside a device certificate?
  3. What are birth certificates and operational certificates?
  4. How do keys get onto devices safely?
  5. How is identity used at runtime?
  6. How are certificates rotated, revoked and retired?
  7. When is a full PKI overkill?
  8. Where to go next

Every security control in an IoT system eventually asks the same question: which device is this? Encryption is useless if the other end is an impostor, authorization is meaningless without a subject, and an audit log that says “a sensor reported this” is worthless if any sensor could have said it. Device identity is the foundation everything else stands on.

The mature answer is the same one the web uses: asymmetric keys and certificates managed by a public key infrastructure. The IoT version has its own wrinkles, because devices are made in factories by contractors, have no keyboard, may live for fifteen years, and number in the millions.

This guide explains what a device certificate is, how to get one onto a device without leaking the key, how servers and brokers use it, and how to keep the system working for the whole device lifecycle.

Why not passwords or shared secrets?

A password or API token is a secret both sides know. If a device’s token leaks, from a firmware dump, a log file, or a careless support ticket, an attacker can impersonate it until someone notices and rotates it. If the whole fleet shares one token, one leak compromises every unit.

A key pair separates the two sides. The private key is generated on the device and never leaves it. The public key, wrapped in a certificate, can be published freely. The server verifies a signature made with the private key; it never needs the key itself. A compromised server reveals nothing that lets anyone impersonate a device, and a compromised device compromises only itself.

What is inside a device certificate?

An X.509 certificate binds a public key to a name and is signed by an issuer. For a device, the subject name usually carries a serial number or a hardware identifier, the issuer is the manufacturer’s or operator’s certificate authority (CA), and the validity period can be long, often years, because rotating certificates on constrained devices is costly.

Elliptic-curve keys, typically on the P-256 curve, are the norm in IoT. They are small, fast to compute on a microcontroller, and supported by every secure element and TLS stack that matters. RSA keys work but are slower and larger on constrained hardware.

A certificate chain lets a server trust many devices by trusting one root. A common structure is a long-lived offline root CA, an intermediate CA per product line or factory, and leaf certificates per device. Compromise of a factory intermediate can be contained by revoking that intermediate rather than the whole root.

What are birth certificates and operational certificates?

A useful pattern, formalized in IEEE 802.1AR, separates two kinds of identity. The manufacturer installs an initial device identity (an IDevID, sometimes called a birth certificate) at production. It proves the device is a genuine product from that maker and never changes. When the device is deployed, the operator issues a locally significant identity (an LDevID, or operational certificate) that proves membership in that operator’s system and can be rotated or revoked as needed.

Matter uses exactly this structure: a device attestation certificate from the manufacturer, verified during commissioning, followed by an operational certificate issued by the home’s controller. Cloud platforms such as AWS IoT Core and Azure IoT Hub support similar flows.

Device identity: manufacturer and operator certificate chains Left: the manufacturer's offline root CA signs an intermediate CA per factory or product line, which signs each device's birth certificate (IDevID) at production. Center: the device keeps its private key in a secure element, together with the birth certificate and, after deployment, an operational certificate. Right: the operator's CA issues the operational certificate (LDevID) after the device sends a signing request and proves it is genuine; at runtime the device and the server or MQTT broker present certificates to each other in a mutual TLS handshake. MANUFACTURER Root CA offline, long-lived Intermediate CA per factory or product line Birth certificate IDevID, set at production signs signs DEVICE Secure element private key, never leaves IDevID a genuine product LDevID a member of this fleet installed at manufacturing OPERATOR Operator CA issues operational certificates CSR, proven with IDevID LDevID Broker checks the chain, rules per subject mutual TLS Revoking a factory intermediate contains a compromise without replacing the root.
Two chains of trust on one device: the manufacturer’s root and factory intermediate sign the birth certificate (IDevID) at production, the operator’s CA issues the operational certificate (LDevID) at deployment, and the private key never leaves the secure element.

How do keys get onto devices safely?

Provisioning is where most identity schemes break. The options, from weakest to strongest:

  • Inject a pre-generated key and certificate during flashing. Simple, but the key exists outside the device, on a production PC or in a file sent to the contract manufacturer, and every copy is a liability.
  • Generate the key on the device at first boot and send a certificate signing request (CSR) to a CA. The private key never leaves the device, but the first connection has to be authenticated somehow, usually with a one-time token or a pre-shared bootstrap credential, and that first-time flow needs protection against replay.
  • Use a secure element or SoC with a pre-provisioned key and certificate from the chip vendor. The silicon maker generates the key in a secure facility and ships the chip with a certificate already signed by its CA. The product team only needs to trust that CA. This removes the factory from the trust equation entirely and is the strongest option for high-volume products.

Whichever route is chosen, the private key should live in hardware that will not hand it over: a secure element, a TPM, or the protected key storage of the SoC. A key in plain flash leaves with the first firmware dump.

How is identity used at runtime?

The device presents its certificate during the TLS or DTLS handshake, and the server does the same. This mutual authentication is what lets an MQTT broker map a connection to a known device before any message arrives. The broker’s authorization rules then reference the certificate’s subject: device 1234 may publish to devices/1234/telemetry and subscribe to devices/1234/commands, and nothing else.

The same key can sign data at the application layer, which matters when messages pass through intermediaries. A gateway that forwards readings cannot forge them if each one is signed by the originating device, which gives end-to-end encryption and integrity through untrusted hops.

Attestation extends identity from “who is this” to “what is it running.” A device with a measured boot chain can sign a report of its firmware hashes with a key tied to its root of trust, and a backend can refuse service to devices running unknown or outdated code.

How are certificates rotated, revoked and retired?

Certificates expire, and that is a feature: an expired credential forces a check-in. Rotation should be automated through the device management channel, with a new CSR issued well before expiry. Devices that miss the window need a recovery path, usually falling back to the manufacturer identity to re-enroll.

Revocation is harder in IoT than on the web. Certificate revocation lists grow large, and OCSP checks are expensive on a constrained link. Most platforms instead handle revocation in the device registry: a revoked device is simply disabled there, and the broker rejects its connection regardless of certificate validity. That works only if every service checks the registry.

At retirement, the device’s operational certificate is revoked, its registry entry is marked decommissioned, and ideally the device itself is told to wipe its keys, so a resold unit cannot reconnect.

When is a full PKI overkill?

A hobby project with a handful of devices behind a home router can live with pre-shared keys. A product that ships to customers cannot, because the cost of an impersonation incident outweighs the engineering of a proper identity scheme. The practical middle ground for small teams is to use the certificate services built into a cloud IoT platform, which handle the CA, rotation and registry integration, and to put the private key in a secure element from day one.

Where to go next

Corrections and updates
  • October 22, 2026: diagram added
  • October 17, 2026: sources linked

How corrections are handled: editorial policy.

Topics: device identity, PKI, X.509, certificates, secure element, provisioning

Diagram