From 58657c00defad88922076e77626817c8bcdd9c58 Mon Sep 17 00:00:00 2001 From: Pascal Nasahl Date: Thu, 28 Nov 2024 15:32:50 +0100 Subject: [PATCH] [capture] Fix bug in capture_ibex We only should write the trace once when not in batch mode. Signed-off-by: Pascal Nasahl --- capture/capture_ibex.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/capture/capture_ibex.py b/capture/capture_ibex.py index 455250c7..cb5a2632 100755 --- a/capture/capture_ibex.py +++ b/capture/capture_ibex.py @@ -285,13 +285,13 @@ def capture(scope: Scope, ot_ibex: OTIbex, ot_prng: OTPRNG, data_bytes = [] for d in data: data_bytes.append(d.to_bytes(4, "little")) - # Sanity check retrieved data (wave). - assert len(waves[0, :]) >= 1 - # Store trace into database. - project.append_trace(wave = waves[0, :], - plaintext = b''.join(data_bytes), - ciphertext = None, - key = None) + # Sanity check retrieved data (wave). + assert len(waves[0, :]) >= 1 + # Store trace into database. + project.append_trace(wave = waves[0, :], + plaintext = b''.join(data_bytes), + ciphertext = None, + key = None) # Memory allocation optimization for CW trace library. num_segments_storage = project.optimize_capture(num_segments_storage)