# MonitoRISC: Dynamic insertion of instructions dedicated to sidechannel attacks detection

Juliette Pottier, Maria Mendez Real, Bertrand Le Gal, Sébastien Pillement

► To cite this version:

Juliette Pottier, Maria Mendez Real, Bertrand Le Gal, Sébastien Pillement. MonitoRISC: Dynamic insertion of instructions dedicated to sidechannel attacks detection. 2024 - Colloque National du GDR SoC2, Jun 2024, Toulouse, France. 2024. [hal-04615379](https://hal.science/hal-04615379)

HAL Id: hal-04615379

https://hal.science/hal-04615379

Submitted on 18 Jun 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>
# MonitoRISC: Dynamic insertion of instructions dedicated to sidechannel attacks detection

Juliette Pottier, Maria Mendez Real, Bertrand Le Gal, Sébastien Pillement

► To cite this version:

Juliette Pottier, Maria Mendez Real, Bertrand Le Gal, Sébastien Pillement. MonitoRISC: Dynamic insertion of instructions dedicated to sidechannel attacks detection. 2024 - Colloque National du GDR SoC2, Jun 2024, Toulouse, France. 2024. [hal-04615379v2](https://hal.science/hal-04615379v2)

HAL Id: hal-04615379

https://hal.science/hal-04615379v2

Submitted on 12 Jan 2026

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
<figure><img src="image_2.png" /></figure>

# MonitoRISC: Dynamic insertion of instructions dedicated to side-channel attacks detection

† Juliette Pottier, † Maria Méndez Real, ‡ Bertrand Le Gal, † Sébastien Pillement

†IETR, Nantes Université, Nantes, France

‡IRISA/INRIA, Université de Rennes, Lannion, France

<figure><img src="image_3.png" /></figure>

Contact: [juliette.pottier@univ-nantes.fr](mailto:juliette.pottier@univ-nantes.fr)

Convention: ANR-21-CE-39-0017

## Context: SEC-V project

### WP 1 – Dynamic code transformation unit

- On-the-fly decoding modification/alteration

- Dynamic instrumentation

- Instruction set tailoring/customization/adaptation

### WP 2 – Micro-architectural modifications

- Alternative approaches to traditional caches (scratchpads, TCM)

- Dynamic cache management

- Inserting execution noise (access instructions for example)

### WP 3 – Dynamic control of the architecture adaptation

- Detection of abnormal behavior

- Dynamic code transformation unit control

### WP 4 – Prototype and evaluation

- Inclusion in the CVA6 core of the OpenHW Group

- Assessment (indicators and metrics) of security levels

<figure><img src="image_4.png" /></figure>

## CVA6 Core enhanced with a microdecoding unit

### CVA6's Features [1]:

* ISA: RV64GC

* 6-stage pipeline partially out-of-order (Execute Stage)

* Single issue

### MonitoRISC's Features:

* FSM: Bypass/Microdecoding state

* ROM: contains 32-bit microinstructions sequences

* FIFO: interfaces with the Issue stage

<table><thead><tr><th></th><th>LUT</th><th>SRL</th><th>FF</th><th>BRAM36</th><th>BRAM18</th><th>DSP</th></tr></thead><tbody><tr><td>baseline</td><td>47453</td><td>0</td><td>24764</td><td>36</td><td>0</td><td>27</td></tr><tr><td>With MonitoRISC</td><td>49701<br>+4.7%</td><td>0</td><td>25718<br>+3.8%</td><td>36</td><td>0</td><td>27</td></tr></tbody></table>

### Security strategies:

* Monitoring: detection of contexts favorable to side-channels attacks and/or covert channels

* Dynamic management: micro-architectural defenses and micro-decoder

* Deployment of a complete solution on target, while preserving performance

## MonitoRISC

### Novel approach to monitore HPCs dedicated to side-channel detection

<figure><img src="image_5.png" /></figure>

### Hardware approach → low timing overhead

<table><thead><tr><th>Application name</th><th>Overhead (%)</th></tr></thead><tbody><tr><td>ARC4 enc./dec.</td><td>+0.85%</td></tr><tr><td>AES v1 (128/512) enc./dec.</td><td>+0.01%</td></tr><tr><td>AES v2 (128 from [23]) enc./dec.</td><td>+0.05%</td></tr><tr><td>Engine control</td><td>+0.06%</td></tr><tr><td>Data sorting (bubble)</td><td>+0.06%</td></tr><tr><td>Queens</td><td>+0.01%</td></tr><tr><td>Pattern matching (text)</td><td>+0.01%</td></tr><tr><td>LMS filter processing</td><td>+0.01%</td></tr><tr><td>FIR filter processing</td><td>+0.01%</td></tr><tr><td>Echo cancellation</td><td>+0.06%</td></tr><tr><td>Motion detection</td><td>+0.01%</td></tr><tr><td>Contrast egalization</td><td>+0.04%</td></tr><tr><td>Dhrystone</td><td>+0.09%</td></tr></tbody></table>

### Prime+Probe attack [2] detection accuracy

<table><thead><tr><th></th><th>Load conditions</th><th>Type of noisy app</th><th>Accuracy</th><th>False positive</th><th>False negative</th><th>P+P Success rate</th></tr></thead><tbody><tr><td rowspan="2">Successful P+P attack</td><td colspan="6">(&gt;50% of retrieved bits):</td></tr><tr><td>No noise (NL)</td><td>-</td><td>100%</td><td>0.10%</td><td>0%</td><td>97%</td></tr><tr><td rowspan="3">1 noisy app (AV)</td><td>random app</td><td>MP3 or random app</td><td>100%</td><td>0.14%</td><td>0%</td><td>73%</td></tr><tr><td>random apps</td><td>MP3 and random apps</td><td>100%</td><td>0.14%</td><td>0%</td><td>73%</td></tr><tr><td>random apps</td><td>MP3</td><td>100%</td><td>0.19%</td><td>0%</td><td>60%</td></tr><tr><td rowspan="3">2 noisy apps (AV)</td><td>random apps</td><td>MP3 and random apps</td><td>99.50%</td><td>0.24%</td><td>0.50%</td><td>60%</td></tr><tr><td>random apps</td><td>MP3</td><td>99.85%</td><td>0.21%</td><td>0.15%</td><td>60%</td></tr><tr><td>random apps</td><td>MP3</td><td>99.85%</td><td>0.21%</td><td>0.15%</td><td>60%</td></tr><tr><td rowspan="3">4 noisy apps (FL)</td><td>random apps</td><td>MP3 and random apps</td><td>98.75%</td><td>0.43%</td><td>0%</td><td>51%</td></tr><tr><td>random apps</td><td>MP3</td><td>98.75%</td><td>1.92%</td><td>1.25%</td><td>51%</td></tr><tr><td>random apps</td><td>MP3</td><td>97.9%</td><td>0.21%</td><td>2.1%</td><td>51%</td></tr><tr><td rowspan="6">Not successful P+P Attack</td><td colspan="6">(&lt;50% of retrieved bits):</td></tr><tr><td>random apps</td><td>MP3 and random apps</td><td>100%</td><td>3%</td><td>0%</td><td>47%</td></tr><tr><td>random apps</td><td>MP3</td><td>100%</td><td>1.69%</td><td>0%</td><td>47%</td></tr><tr><td>random apps</td><td>MP3</td><td>49.5%</td><td>0.21%</td><td>50.05%</td><td>47%</td></tr><tr><td>random apps</td><td>MP3</td><td>100%</td><td>6.65%</td><td>0%</td><td>47%</td></tr><tr><td>random apps</td><td>MP3</td><td>95.05%</td><td>1.44%</td><td>39.95%</td><td>47%</td></tr><tr><td rowspan="3">8 noisy apps</td><td>random apps</td><td>MP3</td><td>95.05%</td><td>0.20%</td><td>75.95%</td><td>47%</td></tr><tr><td>random apps</td><td>MP3</td><td>99.45%</td><td>4.40%</td><td>0.55%</td><td>47%</td></tr><tr><td>random apps</td><td>MP3</td><td>92.20%</td><td>1.83%</td><td>7.80%</td><td>47%</td></tr><tr><td rowspan="2">10 noisy apps</td><td>random apps</td><td>MP3</td><td>92.20%</td><td>0.22%</td><td>78.4%</td><td>47%</td></tr><tr><td>random apps</td><td>MP3</td><td>99.45%</td><td>4.40%</td><td>0.55%</td><td>47%</td></tr></tbody></table>

<footnote>[1] 1F. Zaruba and L. Benini. The cost of application-class processing: Energy and performance analysis of a linux-ready 1.7-ghz 64-bit risc-v core in 22-nm fdsoi technology. IEEE Transactions on Very Large Scale Integration (VLSI) Systems, 27(11):2629-2640, Nov 2019.</footnote>

<footnote>[2] V. Martinoli, E. Tourneur, Y. Teglia, and R. Leveugle. CCALK: (When) CVA6 Cache Associativity Leaks the Key. Journal of Low Power Electronics and Applications, 2022.</footnote>
<figure><img src="image_2.png" /></figure>

# MonitoRISC: Dynamic insertion of instructions dedicated to side-channel attacks detection

† Juliette Pottier, † Maria Méndez Real, ‡ Bertrand Le Gal, † Sébastien Pillement

†IETR, Nantes Université, Nantes, France

‡IRISA/INRIA, Université de Rennes, Lannion, France

<figure><img src="image_3.png" /></figure>

Contact: [juliette.pottier@univ-nantes.fr](mailto:juliette.pottier@univ-nantes.fr)

Conventions: ANR-21-CE-39-0017 Région Pays de la Loire 2022-01346

## Context: SEC-V project

### WP 1 – Dynamic code transformation unit

- On-the-fly decoding modification/alteration

- Dynamic instrumentation

- Instruction set tailoring/customization/adaptation

### WP 2 – Micro-architectural modifications

- Alternative approaches to traditional caches (scratchpads, TCM)

- Dynamic cache management

- Inserting execution noise (access instructions for example)

### WP 3 – Dynamic control of the architecture adaptation

- Detection of abnormal behavior

- Dynamic code transformation unit control

### WP 4 – Prototype and evaluation

- Inclusion in the CVA6 core of the OpenHW Group

- Assessment (indicators and metrics) of security levels

<figure><img src="image_4.png" /></figure>

## CVA6 Core enhanced with a microdecoding unit

### CVA6's Features [1]:

* ISA: RV64GC

* 6-stage pipeline partially out-of-order (Execute Stage)

* Single issue

### MonitoRISC's Features:

* FSM: Bypass/Microdecoding state

* ROM: contains 32-bit microinstructions sequences

* FIFO: interfaces with the Issue stage

<table><thead><tr><th></th><th>LUT</th><th>SRL</th><th>FF</th><th>BRAM36</th><th>BRAM18</th><th>DSP</th></tr></thead><tbody><tr><td>baseline</td><td>47453</td><td>0</td><td>24764</td><td>36</td><td>0</td><td>27</td></tr><tr><td>With MonitoRISC</td><td>49701</td><td>0</td><td>25718</td><td>36</td><td>0</td><td>27</td></tr><tr><td></td><td>+4.7%</td><td>-</td><td>+3.8%</td><td>-</td><td>-</td><td>-</td></tr></tbody></table>

### Security strategies:

* Monitoring: detection of contexts favorable to side-channels attacks and/or covert channels

* Dynamic management: micro-architectural defenses and micro-decoder

* Deployment of a complete solution on target, while preserving performance

## MonitoRISC

### Novel approach to monitore HPCs dedicated to side-channel detection

<figure><img src="image_5.png" /></figure>

### Hardware approach → low timing overhead

<table><thead><tr><th>Application name</th><th>Overhead (%)</th></tr></thead><tbody><tr><td>ARC4 enc./dec.</td><td>+0.85%</td></tr><tr><td>AES v1 (128/512) enc./dec.</td><td>+0.01%</td></tr><tr><td>AES v2 (128 from [23]) enc./dec.</td><td>+0.05%</td></tr><tr><td>Engine control</td><td>+0.06%</td></tr><tr><td>Data sorting (bubble)</td><td>+0.06%</td></tr><tr><td>Queens</td><td>+0.01%</td></tr><tr><td>Pattern matching (text)</td><td>+0.01%</td></tr><tr><td>LMS filter processing</td><td>+0.01%</td></tr><tr><td>FIR filter processing</td><td>+0.01%</td></tr><tr><td>Echo cancellation</td><td>+0.06%</td></tr><tr><td>Motion detection</td><td>+0.01%</td></tr><tr><td>Contrast egalization</td><td>+0.04%</td></tr><tr><td>Dhrystone</td><td>+0.09%</td></tr></tbody></table>

### Prime+Probe attack [2] detection accuracy

<table><thead><tr><th></th><th>Load conditions</th><th>Type of noisy app</th><th>Accuracy</th><th>False positive</th><th>False negative</th><th>P+P Success rate</th></tr></thead><tbody><tr><td rowspan="5">Successful P+P attack</td><td colspan="6">(&gt;50% of retrieved bits):</td></tr><tr><td rowspan="3">No noise (NL)</td><td>-</td><td>100%</td><td>0.10%</td><td>0%</td><td>97%</td></tr><tr><td>random app</td><td>100%</td><td>0.14%</td><td>0%</td><td></td></tr><tr><td>MP3 or random app</td><td>100%</td><td>0.17%</td><td>0%</td><td>73%</td></tr><tr><td rowspan="3">1 noisy app (AV)</td><td>MP3</td><td>100%</td><td>0.14%</td><td>0%</td><td></td></tr><tr><td>random apps</td><td>100%</td><td>0.19%</td><td>0%</td><td></td></tr><tr><td>MP3 and random apps</td><td>99.50%</td><td>0.24%</td><td>0.50%</td><td>60%</td></tr><tr><td rowspan="3">2 noisy apps (AV)</td><td>MP3</td><td>99.85%</td><td>0.21%</td><td>0.15%</td><td></td></tr><tr><td>random apps</td><td>100%</td><td>0.43%</td><td>0%</td><td></td></tr><tr><td>MP3 and random apps</td><td>98.75%</td><td>1.92%</td><td>1.25%</td><td>51%</td></tr><tr><td rowspan="6">Not successful P+P Attack</td><td rowspan="6">(&lt;50% of retrieved bits):</td><td>MP3</td><td>97.9%</td><td>0.21%</td><td>2.1%</td><td></td></tr><tr><td>random apps</td><td>100%</td><td>3%</td><td>0%</td><td></td></tr><tr><td>MP3 and random apps</td><td>100%</td><td>1.69%</td><td>0%</td><td>47%</td></tr><tr><td>MP3</td><td>49.5%</td><td>0.21%</td><td>50.05%</td><td></td></tr><tr><td>random apps</td><td>100%</td><td>6.65%</td><td>0%</td><td></td></tr><tr><td>MP3 and random apps</td><td>95.05%</td><td>1.44%</td><td>39.95%</td><td>47%</td></tr><tr><td rowspan="3">8 noisy apps</td><td>MP3</td><td>24.05%</td><td>0.20%</td><td>75.95%</td><td></td></tr><tr><td>random apps</td><td>99.45%</td><td>4.40%</td><td>0.55%</td><td></td></tr><tr><td>MP3 and random apps</td><td>92.20%</td><td>1.83%</td><td>7.80%</td><td>47%</td></tr><tr><td rowspan="3">10 noisy apps</td><td>MP3</td><td>21.6%</td><td>0.22%</td><td>78.4%</td><td></td></tr><tr><td>random apps</td><td>99.45%</td><td>4.40%</td><td>0.55%</td><td></td></tr><tr><td>MP3 and random apps</td><td>92.20%</td><td>1.83%</td><td>7.80%</td><td>47%</td></tr></tbody></table>

<footnote>[1] 1F. Zaruba and L. Benini. The cost of application-class processing: Energy and performance analysis of a linux-ready 1.7-ghz 64-bit risc-v core in 22-nm fdsoi technology. IEEE Transactions on Very Large Scale Integration (VLSI) Systems, 27(11):2629-2640, Nov 2019.</footnote>

<footnote>[2] V. Martinoli, E. Tourneur, Y. Teglia, and R. Leveugle. CCALK: (When) CVA6 Cache Associativity Leaks the Key. Journal of Low Power Electronics and Applications, 2022.</footnote>