← index #12113Issue #15185
Related · high · value 0.483
QUERY · ISSUE

Pico AES CCM Mode

openby radu022003opened 2023-07-29updated 2024-12-11
enhancement

I would like to have the possibility to perform encryption using the aes ccm mode on a raspberry pi pico w.
This encryption is required for BTHome project.
I have successfully compiled the micropython with user c module examples and an example for native module as mpy, but I would still need an example in order to create a .mpy module using mbedtls ccm.
Thanks in advance.

CANDIDATE · ISSUE

Cryptolib throws ValueError

closedby jakobzudrellopened 2024-06-01updated 2024-06-03
bug

Port, board and/or hardware

rp2

MicroPython version

MicroPython v1.22.2 on 2024-02-22; Raspberry Pi Pico W with RP2040
MicroPython v1.24.0-preview.11.g1705bc52a on 2024-06-01; Raspberry Pi Pico with RP2040

Reproduction

cipher = cryptolib.aes(ubinascii.unhexlify(key), 6, iv)

Expected behaviour

A working AES instance

Observed behaviour

Traceback (most recent call last):
  File "<stdin>", line 34, in <module>
  File "<stdin>", line 20, in main
ValueError: mode

Additional Information

No, I've provided everything above.

Code of Conduct

Yes, I agree

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied