Shift left’ to secure PQC implementations from physical attacks – eShard and PQShield

In order to properly secure post-quantum cryptographic implementations, security measures must ‘shift left’ to be integrated from the very beginning of the development cycle.

That’s the view of eShard and PQShield in a new joint blog series entitled Shifting left secures PQC implementations from physical attacks.

The authors argue that this approach is critical for protecting hardware against physical attacks such as side-channel analysis and fault injection. These attacks deliberately exploit the way a chip functions by either monitoring fluctuations in power usage or emissions, or by deliberately disrupting operation to bypass critical security mechanisms. Robust countermeasures are essential.

However, validating these countermeasures is not straightforward, and as PQShield and eShard point out, testing them requires specialized labs with advanced instrumentation. Traditional testing is insufficient when it comes to PQC implementations, and if a security flaw is discovered late in development, it can be disruptive and expensive to fix. By integrating security testing before hardware is finalized, weaknesses can be detected sooner, using new, innovative approaches.

In this first article, focusing on the software development cycle, the authors present a solution using emulation (specifically eShard’s QEMU-based engine) to trace the execution of a Kyber (ML-KEM) public implementation in C.

It’s a technique that gives developers an early view in a simulated environment, running the code, collecting targeted traces and spinning up models that explore new attack vectors without guesswork. Potential security leakages can be identified, and the code’s resilience against fault injection attacks can be tested without the need for physical hardware.

The ultimate goal of course is to move away from considering security as an afterthought. By making security integral to every stage of development, defining security profiles and building a comprehensive security test plan early, developers can then automate testing strategically into continuous integration pipelines, and ensure that vulnerabilities are caught and fixed as quickly as possible.

It’s an approach that’s already proved successful: PQShield’s continuous verification runs have exposed weaknesses in several ML-KEM libraries that were fixed and patched upstream.

Shifting left, considering security early and building verification into a test plan is a key to making software and hardware inherently more secure against real-world attacks.

You can read the full article here.