1 of 29

CS-773 Paper Presentation��Maya: Falsifying Power Side Channels with Dynamic Control

Rishi Agarwal�ArchMages(#0)

rishiagarwal@cse.iitb.ac.in

1

2 of 29

Motivation

    • Keystrokes
    • Password lengths
    • Location
    • Browser and camera activity
    • Application activity
    • Bits of encryption keys

2

Keystroke

Password length

Location

Browser activity

Camera activity

Application activity

Bits of encryption key

3 of 29

Motivation

Detecting application through power measurement

3

Timesteps

Avg. Power (W)

4 of 29

Motivation

Reshape power in application transparent manner

4

Avg. Power (W)

Timesteps

5 of 29

Prior Work

  • Require new hardware
  • Trusted execution environment ineffective against physical side channels
  • Simple distortion by adding noise is ineffective

5

6 of 29

Maya - 10K feet view

6

Mask generator

Controller

Computer system

Target power (R)

Total power (P)

Inputs

  • DVFS
  • Idle thread
  • Balloon thread

7 of 29

Maya - Controller

7

Controller

E(t) = P(t)-R(t)

S(t+1) = A x S(t) + B x E(t)

A(t) = C x S(t) + D x E(t)

R(t)

P(t)

E(t) := error(t), S(t) := State(t), A(t) := action(t)

A(t)

8 of 29

Matrix multiplication in controller?

  • Conventional environment
    • Coarse granular (~20ms)
    • Easy to mount, widely used
  • Specialized environment
    • Fine granular (~10ns)
    • Expensive and difficult
  • Matrix based controller responds in 5-10 us
  • Cannot be used for Specialized environment
  • Alternatives?
    • Use a table of pre-computed values

8

9 of 29

How good is the controller?

9

High fidelity power shaping with control theory

Avg. Power (W)

Timesteps

Target power R(t)

Measured power P(t)

10 of 29

Maya - Mask Generator

  1. Mean and variance must change over time domain
  2. Frequency domain curve must spread over a range of frequencies
  3. Peaks must exist in the frequency domain curve

Philosophy?

  • Applications show these properties
  • If mask does not exhibit these, controller will not be able to hide them

10

11 of 29

Constant Mask

  • Time: constant mean and 0 variance
  • Frequency: no spread/ no peaks

11

Time domain

Frequency domain

Power (W)

Time (s)

Freq. (Hz)

12 of 29

Gaussian Sinusoidal Mask

  • Time: varying mean & variance
  • Frequency: spread and peaks

12

Time domain

Frequency domain

Power (W)

Time (s)

Freq. (Hz)

13 of 29

Maya - Mask Generator

13

14 of 29

Assumptions & Strengths

  • Assumptions
    • Conventional environment
    • Attackers know the algorithm
    • Hardware or privileged software is uncompromised
      • OS scheduler
      • DVFS interfaces

  • Strengths
    • Reshaping power protects from temp./EM leakage
    • Software implementation possible

14

15 of 29

Maya - Summary

  • Matrix based controller
    • S(t+1) = A x S(t) + B x E(t)
    • A(t) = C x S(t) + D x E(t)
  • Mask generator - gaussian sinusoidal

15

16 of 29

Experimental setup

  • 2 machines - consumer class, server class
  • Three possible threads
    1. Parallel benchmark
    2. Idle thread
    3. Balloon thread - floating point array ops
  • Power measured through RAPL
  • Controller, mask generator, balloon program - privileged

16

17 of 29

Actuating the inputs

  • DVFS: using cpufreq
  • Idle thread: using Intel’s Power Clamp interface
  • Balloon program: using shm file

17

18 of 29

Implementation - controller

  • Controller
    • Dynamic model of system
    • Three parameters
      • Input weights (1,1,1)
      • Uncertainty guardband (40%)
      • Output deviation bounds (10%)
  • Matrices A,B,C,D generated

18

19 of 29

Dynamic model of system

  • System identification
  • y(t) = ∑1 … m ai y(t-i) + ∑1 … n bi u(t-i+1)

19

20 of 29

Implementation - mask generator

  • R(t) = offset + Amp x sin (2𝝿 t / Freq) + N(μ, σ)
  • Constraints
    • Thermal design power
    • Freq < Half of power sampling freq.
  • Nhold samples

20

21 of 29

Evaluation methodology

  • Train ML models - MLP
  • 2 attacks
    • Data w/o Maya
    • Data with Maya (adaptive attack)
  • Classification accuracy

21

22 of 29

Accuracy - Data w/o Maya

22

True label

Predicted label

Acc. drops from 92% to 12% (constant), 13%(gaussian-sinusoidal)

Constant mask

Gaussian-sinusoidal mask

23 of 29

Accuracy - Data w/ Maya

23

True label

Predicted label

  • Acc. increases to 67% for constant mask
  • Remains as low as 20% for gaussian-sinusoidal

Constant mask

Gaussian-sinusoidal mask

24 of 29

Visualization of power trace

24

  • Maya reshapes power in application transparent manner
  • Constant mask less effective than gaussian-sinusoidal

Avg. Power (W)

Timesteps

Constant mask

Gaussian-sinusoidal mask

No Maya

25 of 29

Performance - power

25

Avg. power consumed is 35% (noisy), 41% (constant), 29% (gaussian-sinusoidal) lower than normal

Normalized Power

Applications

26 of 29

Performance - execution time

26

Avg. slowdown of 63% (noisy), 100% (constant), 50% (gaussian-sniusoidal)

Normalized Duration

Applications

27 of 29

Summary

  • Maya - i) Controller ii) Mask generator

  • Acc. drops to 13% (non-adaptive), 20% (adaptive) as compared to 92%
  • Avg. power consumed 29% lower
  • Avg. execution time 50% more

  • Can be implemented on software
  • Power reshaping protects from temp./EM

27

28 of 29

Discussion

  • Effect of context switch on controller?
  • More experiments using advanced ML - transformers?
  • How well do matrices generalize to new applications?
  • A short note on control theory can be helpful
    • Not clear how addition of error(t) with State(t) is done

28

29 of 29

��Thank you for listening!

Any Questions?

29