Hi,
I’m using a ChipWhisperer Lite to capture power traces from the CW308T-STM32F3 target.
The target is running a Masked AES implementation.
However, I’ve noticed that whenever I set an offset value by changing scope.adc.offset, one of the following errors appears:
(ChipWhisperer Scope ERROR|File OpenADC.py:787) Received fewer points than expected
(ChipWhisperer Scope WARNING|File _OpenADCInterface.py:955) Trigger not found in ADC data. No data reported!
My scope settings are as follows:
fw_version =
major = 0
minor = 65
debug = 0
gain =
mode = high
gain = 30
db = 24.8359375
adc =
state = False
basic_mode = rising_edge
timeout = 12
offset = 17000
presamples = 0
samples = 5000
decimate = 1
trig_count = 309844672
fifo_fill_mode = normal
clock =
adc_src = clkgen_x1
adc_phase = 0
adc_freq = 23140571
adc_rate = 23140571.0
adc_locked = True
freq_ctr = 0
freq_ctr_src = extclk
clkgen_src = system
extclk_freq = 10000000
clkgen_mul = 2
clkgen_div = 26
clkgen_freq = 7384615.384615385
clkgen_locked = True
trigger =
triggers = tio4
module = basic
io =
tio1 = serial_rx
tio2 = serial_tx
tio3 = high_z
tio4 = high_z
pdid = high_z
pdic = high_z
nrst = high_z
glitch_hp = False
glitch_lp = False
extclk_src = hs1
hs2 = clkgen
target_pwr = True
tio_states = (1, 1, 0, 0)
cdc_settings = bytearray(b'\x00\x00\x00\x00')
glitch =
clk_src = target
width = 10.15625
width_fine = 0
offset = 10.15625
offset_fine = 0
trigger_src = manual
arm_timing = after_scope
ext_offset = 0
repeat = 1
output = clock_xor
My capturing code is as follows:
trace_array = []
plaintext_array = []
for i in trange(N, desc='Capturing traces'):
_, text = ktp.next()
scope.arm()
target.simpleserial_write('p', text)
ret = scope.capture()
if ret:
print("Target timed out!")
continue
response = target.simpleserial_read('r', 16)
print("plaintext: {}, ciphertext:{}".format(binascii.hexlify(text), binascii.hexlify(response)))
trace_array.append(scope.get_last_trace())
plaintext_array.append(text)
splot.update(scope.get_last_trace())
The program output showing the errors/warnings during capture is as below:
I’m not sure why this is happening. The encryption/decryption seems to be working fine. However, this issue makes it impossible to capture long traces.
Thanks in advance for replying!