Skip to content

Commit e251ad0

Browse files
committed
[fi] Add additional hardened check cmd handlers
This commit adds the following FI test command handlers: - ibex_char_hardened_check_eq_unimp - ibex_char_hardened_check_eq_2_unimps - ibex_char_hardened_check_eq_3_unimps Signed-off-by: Pascal Nasahl <[email protected]>
1 parent 61dab12 commit e251ad0

File tree

2 files changed

+25
-5
lines changed

2 files changed

+25
-5
lines changed

fault_injection/configs/pen.global_fi.ibex.char.hardened_check_eq_unimps.cw310.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ fiproject:
3434
plot_y_axis: "glitch_width"
3535
plot_y_axis_legend: "[cycles]"
3636
test:
37-
which_test: "ibex_char_hardened_check_eq_unimps"
37+
which_test: "ibex_char_hardened_check_eq_unimp"
38+
# which_test: "ibex_char_hardened_check_eq_2_unimps"
39+
# which_test: "ibex_char_hardened_check_eq_3_unimps"
3840
# For this test, the expected result is actually a crash of the system. On
3941
# a successful FI attack, this could be one result:
4042
expected_result: '{"result1":0,"result2":1,"err_status":0,"alerts":0}'

target/communication/fi_ibex_commands.py

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -268,14 +268,32 @@ def ibex_address_translation(self) -> None:
268268
time.sleep(0.01)
269269
self.target.write(json.dumps("AddressTranslation").encode("ascii"))
270270

271-
def ibex_char_hardened_check_eq_unimps(self) -> None:
272-
""" Starts the ibex.fi.char.hardened_check_eq_unimps test.
271+
def ibex_char_hardened_check_eq_unimp(self) -> None:
272+
""" Starts the ibex.fi.char.hardened_check_eq_unimp test.
273273
"""
274274
# IbexFi command.
275275
self._ujson_ibex_fi_cmd()
276-
# CharHardenedCheck command.
276+
# CharHardenedCheckUnimp command.
277277
time.sleep(0.01)
278-
self.target.write(json.dumps("CharHardenedCheck").encode("ascii"))
278+
self.target.write(json.dumps("CharHardenedCheckUnimp").encode("ascii"))
279+
280+
def ibex_char_hardened_check_eq_2_unimps(self) -> None:
281+
""" Starts the ibex.fi.char.hardened_check_eq_2_unimps test.
282+
"""
283+
# IbexFi command.
284+
self._ujson_ibex_fi_cmd()
285+
# CharHardenedCheck2Unimps command.
286+
time.sleep(0.01)
287+
self.target.write(json.dumps("CharHardenedCheck2Unimps").encode("ascii"))
288+
289+
def ibex_char_hardened_check_eq_3_unimps(self) -> None:
290+
""" Starts the ibex.fi.char.hardened_check_eq_3_unimps test.
291+
"""
292+
# IbexFi command.
293+
self._ujson_ibex_fi_cmd()
294+
# CharHardenedCheck3Unimps command.
295+
time.sleep(0.01)
296+
self.target.write(json.dumps("CharHardenedCheck3Unimps").encode("ascii"))
279297

280298
def read_response(self, max_tries: Optional[int] = 1) -> str:
281299
""" Read response from Ibex FI framework.

0 commit comments

Comments
 (0)