Skip to content

Why cryptography should not run on the application CPU

Running cryptography on the application CPU means security work competes with application work for the same cycles. Under load the application usually wins, so the security work is what degrades — and key material sits in host memory where any host compromise reaches it.

Contention, and which side loses

On a shared CPU, cryptographic work and application work draw from one budget. When load rises, something gives. In practice what gives is whatever is not directly producing the user-visible result.

The consequences are rarely visible as failures. Handshake latency rises. Reseeding intervals stretch because the entropy path is competing too. Sessions are reused more aggressively to avoid the cost of establishing new ones. Each is a reasonable local decision, and together they mean the security posture is worst exactly when the system is busiest.

That is backwards. Peak load is when a system is most exposed and most likely to be under deliberate pressure.

The boundary argument, which is the stronger one

A key used on the application CPU exists in host memory. Anything that reads host memory — a vulnerability, a malicious process with sufficient privilege, a side channel — can reach it. The cryptography was correct and the key leaked anyway.

Work performed inside a hardware boundary, on a key that was generated there and never exported, has a different failure mode. Host compromise gets an attacker the ability to request operations, which is bad, and not the key itself, which is worse.

Requesting operations can be rate-limited, logged and revoked. A stolen key cannot be un-stolen.

Why this matters more now

Post-quantum operations cost more per transaction than the ones they replace, and hybrid modes do both. So the fraction of CPU spent on cryptography rises during the migration, on hardware that was sized before it — which is measurable on your own workload.

Where the entropy path fits

The same argument applies to randomness. An entropy source competing for host attention, delivering into a pool the host manages, is subject to the same contention and sits in the same memory.

Generating entropy inside the boundary that consumes it removes both problems at once, which is why entropy and execution belong together.