Raw public keys move TLS identity into provisioning and rotation

Most TLS deployments rely on X.509 certificates to connect a public key with a name and a chain of trust. RFC 7250 defines another option: sending a raw SubjectPublicKeyInfo value in TLS or DTLS and learning the peer identity from an external mapping. The protocol still authenticates possession of the private key, but it does not perform certificate path validation for a peer certificate.

This design is useful for constrained devices and closed systems where a full certificate profile is unnecessary. It also moves a large amount of security responsibility into provisioning. The verifier must know which raw public key belongs to which peer and must reject keys that are not on that list. A successful handshake with an unknown key is not an identity match.

The key is the identity

With certificate-based authentication, applications often use subject names, SANs, or issuer policy as identity inputs. A raw public key has no such fields. The application needs a deliberate identifier, such as a key ID or deployment record, and a mapping to the authorized device or service. The mapping should be scoped to the connection, hostname, account, or workload where the key is allowed.

The absence of a certificate path also changes failure behavior. There is no OCSP or CRL response to fetch by default, and no certificate expiration date to enforce unless the deployment adds its own lifecycle metadata. A key that remains in the allowlist after decommissioning still authenticates. Rotation therefore has to be an explicit asset-management process.

Provision first, then verify

A practical rollout begins with an inventory of devices and expected public keys. Generate keys in the intended environment, record their fingerprints, and distribute the minimum trust anchors to verifiers. Provisioning should include an owner, installation date, expiration or review date, and the expected protocol role.

Verification should fail closed on unknown keys, duplicate identifiers, malformed key encodings, and unexpected algorithm changes. Operators should not accept an arbitrary key because the network location or hostname looks familiar. Hostnames and addresses can move; a pinned public key is meant to distinguish the device even when the path changes.

Rotation is the hard part

Replacing a raw key without an outage requires a transition window. The verifier may accept an old and a new key for a bounded period, with separate identifiers and monitoring for which one is active. The device should prove possession of the new private key before the old key is removed. After the window, the old fingerprint should disappear from configuration and from telemetry.

Backups create a second lifecycle problem. A key backup may be necessary for recovery, but it expands the set of systems that can impersonate the device. Encrypt backups, restrict restoration, and test whether restoring an old key would silently pass verification. A restoration test that re-enables a retired key is a finding, not a recovery success.

Choose the model for the environment

Raw public keys work best when the population is small enough to inventory and the provisioning channel is trustworthy. A public web service with many clients usually benefits from an established certificate ecosystem. An embedded sensor network may value the smaller handshake and simpler trust store, provided it has an equally disciplined enrollment process.

The right question is not whether raw keys are more secure than certificates. The useful question is whether the deployment can name every key, authorize every peer, rotate every credential, and explain what happens when an unknown key appears. If those answers are vague, the simplified handshake has not simplified the trust problem.

References