-
Notifications
You must be signed in to change notification settings - Fork 231
Closed
Labels
Milestone
Description
Environment
cat /etc/os-release | head -n 1
> PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
python3 --version
> Python 3.7.3
pip3 list | grep cryptoauthlib
> cryptoauthlib 20210121
Script to reproduce
# print stack trace
# -------------------
import faulthandler;
faulthandler.enable()
# -------------------
while (True):
from cryptoauthlib import *
from cryptoauthlib.device import *
load_cryptoauthlib()
configuration = cfg_ateccx08a_i2c_default()
configuration.cfg.atcai2c.bus = 1
configuration.cfg.atcai2c.slave_address = 0x6A
atcab_init(configuration)
data = bytearray([0x01,0x02,0x03])
cmac = bytearray(16)
ctx = atca_aes_cmac_ctx()
atcab_aes_cmac_init(ctx, 9, 1)
atcab_aes_cmac_update(ctx, data, len(data))
atcab_aes_cmac_finish(ctx, cmac, len(cmac))
print(cmac.hex())
Error description
A segmentation fault error is thrown at a certain (random) point of the execution.
bce91efcbaef5a51be48987222f85ded
bce91efcbaef5a51be48987222f85ded
bce91efcbaef5a51be48987222f85ded
bce91efcbaef5a51be48987222f85ded
bce91efcbaef5a51be48987222f85ded
Fatal Python error: Segmentation fault
Additional notes
Script was running properly since I was using version 20200208.
I can confirm the bug is also present with version 20201130.