Clinical data doesn't stay in one place. It moves between apps, services, and sometimes networks that you don't directly control. If trust only exists at the transport layer—TLS, VPNs, etc.—it disappears once the connection closes.

COSE stands for CBOR Object Signing and Encryption. It's a lightweight standard for signing and encrypting structured data—effectively the binary cousin of JOSE (the JSON-based system behind JWTs).

And in distributed healthcare systems, COSE lets you attach cryptographic proof to the data itself, not the channel it travels through.

Why It Matters

In traditional architectures, trust is built into the connection. Your browser trusts the server because TLS says the certificate is valid. Your API client trusts the endpoint because it's behind a firewall and authenticated session.

But what happens when:

At each stage, the original connection is gone. If trust was only in the transport, you've lost it.

COSE makes trust portable. Each object carries its own signature and, if required, encryption envelope. Verification can happen anywhere along the path—no dependency on the original service.

When It's Used

We use COSE whenever data might leave its original context:

Each payload carries its own proof of origin. That's essential in a distributed environment where "edge", "mobile", and "cloud" all coexist.

Where It Helps

COSE makes provenance and authenticity portable.

A record, consent lease, or observation remains verifiable long after it's been transmitted, cached, or replicated. This matters for:

In practice, this means a GP receiving a remote monitoring alert can verify it came from the patient's registered device—even if the alert passed through three intermediary systems.

How It Works in Practice

COSE is designed for constrained environments. It uses:

Here's a simplified flow:

  1. A FHIR resource is created on a FHIR Cube node
  2. The resource is encoded as CBOR
  3. The node signs it with its private key using Ed25519
  4. The signature is attached as a COSE envelope
  5. The resource is transmitted (via FHIR Plane, direct sync, or other means)
  6. Any recipient can verify the signature using the node's public key

No round-trip to the original source. No reliance on active network connections. Just cryptographic proof that travels with the data.

Example: Consent Leases in Practice

A patient grants consent for their blood pressure readings to be shared with their GP practice for 90 days. This consent is encoded as a FHIR Consent resource, signed with COSE by the patient's HealthFoundry node.

When the GP's system receives a blood pressure observation three weeks later, it can verify:

All of this happens locally, without calling back to the patient's node. The trust is in the object, not the connection.

COSE vs. JOSE: When to Use Which

You might be familiar with JOSE (JSON Object Signing and Encryption)—it's what powers JWTs and many API authentication systems.

So why COSE?

Aspect JOSE (JSON) COSE (CBOR)
Format Text-based (JSON) Binary (CBOR)
Size Larger Smaller (30-50% reduction typical)
Best for Web APIs, human-readable systems Constrained environments, IoT, mobile
Use in healthcare OAuth tokens, session management Device data, offline sync, edge computing

In short: JOSE for APIs, COSE for everything that moves.

Alignment with FHIR Security Extensions

FHIR already has robust security mechanisms:

COSE complements these by adding cryptographic verification. A Provenance resource says "this was created by Node A at timestamp T". A COSE signature proves it.

This makes distributed healthcare systems both auditable and tamper-evident—a quiet but essential distinction when you're designing for national scale.

Separating Data Trust from Network Trust

The traditional security model says: "Protect the pipe, and the data will be safe."

The distributed model says: "Protect the data, and let it travel freely."

COSE enables the second model. It doesn't replace TLS or VPNs—it complements them. The network still provides confidentiality and availability. But COSE provides integrity and authenticity that survive beyond the connection.

In short: COSE lets us separate data trust from network trust.

Why This Matters at National Scale

When you're building healthcare infrastructure that spans:

...you can't assume a single trusted network. You can't assume continuous connectivity. You can't assume centralised authentication servers are always reachable.

What you can assume is that cryptographic signatures, properly implemented, remain verifiable anywhere.

That's what COSE gives you. It's not flashy. It's not a buzzword. But it's the quiet layer that keeps trust intact when everything else is in motion.

Looking Ahead

As healthcare becomes more distributed—more local nodes, more edge computing, more patient-controlled data—the need for portable trust will only grow.

COSE is already an IETF standard (RFC 8152). It's well-aligned with FHIR's own security extensions. And it's efficient enough to run on constrained devices.

We're using it in production. It works. And it lets us build systems where trust doesn't depend on always being connected.

That's a quiet but important foundation for the future of digital health.

Julian Bradder

Julian Bradder

Founder, Inference Clinical

30 years in digital transformation—from frontline NHS systems to national infrastructure. Now building governance tools that make every clinical handover safe, fast, and auditable.