Summary

  • RFC 9668 lets a constrained client staple EDHOC message_3 to its first OSCORE-protected CoAP request, cutting key establishment plus one protected transaction to two round trips — but only in the client-Initiator/server-Responder direction, and only under a compatible application profile.
  • Two round trips is a transport fact, not a receipt. Session lookup, message_3 verification, Security Context creation, OSCORE replay and integrity checks, application delivery, execution and the protected response each remain separate claims that must be evidenced separately.

A battery-powered controller whispered a single CoAP datagram at a remote valve and waited. Inside that one packet sat two very different acts: the final EDHOC message that completes an authenticated key exchange, and an OSCORE-sealed instruction to turn the valve. Nothing came back. The console — with the serene confidence of software that has never met a valve — logged “secure command timeout.”

Tidy. Almost useless. That silence could mean any of eight things. The combined-payload check failed. The kid selected no live EDHOC session. The server rejected message_3. It built the Security Context and then threw out the OSCORE ciphertext as a replay. The request decrypted but failed application authorization. The actuator took the command and failed mechanically. The protected response was lost on the way back. Or the client rejected a response the server had sent perfectly.

None of this is carelessness on RFC 9668’s part. It is a precise trade. EDHOC handles authenticated key exchange in constrained environments; OSCORE protects CoAP at the application layer. Run them in sequence and the client and server finish EDHOC before the first OSCORE transaction — three round trips when the optional fourth EDHOC message is skipped. But after message_2, the Initiator already holds everything it needs to derive the OSCORE Security Context. So the RFC lets message_3 ride along with the first protected request. The floor drops to two round trips.

On sleepy radios and narrow links, fewer transmissions is real money. The trap is letting packet compression become evidence compression.

One transport envelope, two semantic requests

The combined request is not one fat cryptographic blob. The client builds EDHOC message_3, derives the new OSCORE context, protects the original CoAP request, then concatenates the encoded message_3 with the OSCORE ciphertext. The connection identifier C_R travels separately as the client’s OSCORE Sender ID in the kid field.

An empty CoAP option numbered 21 announces the structure. It is Critical, Safe-to-Forward, part of the cache key, allowed exactly once, and must be empty — any value a recipient finds there is ignored. Its whole job is to tell the server: pull out the EDHOC material and deal with it before you touch the protected application request.

That ordering is the operational point. Option 21 is a parser instruction, not an authorization. A trace showing the option proves a sender chose the combined format. It proves nothing about the credential, the session lookup, message_3 verification, OSCORE acceptance, or whether the application did anything at all.

The cryptographic boundaries stay separate too. The OSCORE ciphertext is not computed over message_3. Message_3 carries EDHOC’s protection; the application request carries OSCORE’s. Sharing a datagram does not merge their security claims.

The server walks nine ordered gates

RFC 9668 lays out a disciplined server sequence. First the server checks for the OSCORE option and a well-formed combined payload. It extracts message_3, reads kid as C_R, and uses that identifier to retrieve the EDHOC session. If the session’s application profile demands message_4, the path is rejected. Only then does it process message_3 and derive the responder’s OSCORE Security Context.

Next it extracts the OSCORE ciphertext, rebuilds the protected request without the EDHOC option, decrypts and verifies it, and finally hands the resulting CoAP request to the application. A failure at the EDHOC gate aborts the session and forbids creating the new context. A later OSCORE failure falls under OSCORE error handling. Application code does not get a vote until both stages have passed.

Collapse those gates into one “secure request” metric and you throw away the most useful diagnostic fact you had: how far the request actually travelled. A production trace should tie one public transaction identifier to a privacy-preserving EDHOC session reference, the message_3 verdict, context generation, kid, Partial IV, the replay-window decision, the OSCORE verdict and the application request identifier. It should never log derived secrets or raw credentials.

The kid deserves its own paragraph of paranoia. In the combined request it does two jobs at once: it is the client’s OSCORE Sender ID and the C_R used to recover the EDHOC session. RFC 9668 adds identifier-uniqueness rules precisely because a collision with another session or Security Context can select the wrong state. An identifier match is a lookup receipt, nothing more. The generation and transcript it points at must still be on file.

A protected response closes a cryptographic loop, not a physical one

When message_3 and OSCORE processing both succeed, the server returns an OSCORE-protected response. Verifying a response under the freshly derived key gives the Initiator responder key confirmation — proof the other side computed the expected key material. OSCORE also binds a response to its request.

Strong properties. Keep their scope exact. A 2.04 response can honestly report that an application accepted a change while the downstream device has not moved a millimetre. A queued job can be acknowledged before anything is durably stored. A valve controller can answer before a limit switch confirms position. RFC 9668 defines none of that.

So the application receipt needs its own vocabulary: delivered, authorized, accepted for work, committed durably, observed in the physical system, later compensated. The protected response carries whichever claim the application chooses to make, and cryptography stops anyone altering it. It does not enlarge it.

Two round trips is a conditional, not a service-level fact

The optimized exchange fits exactly one role mapping: CoAP client as EDHOC Initiator, server as Responder. The reverse EDHOC flow cannot use it. The application profile must agree too — if message_4 is required, the combined path is invalid. A server can advertise combined-request support through the ed-comb-req link attribute, alongside roles, methods, cipher suites and credential types. Discovery proves an advertised capability. It does not prove that any given transaction used it successfully.

Size can erase the advantage entirely. Message_3 may carry a certificate chain or External Authorization Data. If the first application request also needs Block-wise transfer and the combined payload blows past the permitted unfragmented size, the client must abandon the attempt and fall back to the sequential flow: finish EDHOC, then send OSCORE. A latency dashboard counting only successful optimized packets will quietly hide the population the optimization suited least.

So preserve the decision itself — payload component sizes, path MTU assumption, block number, MAX_UNFRAGMENTED_SIZE, fallback reason, resulting exchange mode. That record is what turns “two round trips” from a marketing average into an explainable policy outcome.

Sources