Countermeasures: Masking, Blinding & Constant-Time Code
Implement masking, point blinding, and constant-time comparisons.
The Three Families of Countermeasures
Side-channel countermeasures fall into three families: masking (randomise intermediate values), blinding (randomise inputs/outputs), and constant-time code (eliminate data-dependent timing).
Boolean Masking
XOR each intermediate with a fresh random mask r. Process masked value x⊕r and unmask at the end. The power trace now depends on x⊕r, not x.
All lessons in this course
- Timing Attacks: Extracting Keys from Execution Time
- Power Analysis: SPA & DPA
- Electromagnetic & Acoustic Side Channels
- Countermeasures: Masking, Blinding & Constant-Time Code