The crypto lib in pycom's flavour of micropython allows creating a cipher for less than 16 bytes
Code: Select all
import crypto
from crypto import AES
msg='shortxt'
iv=b'sixteen chatr iv'
cipher=AES(key, AES.MODE_CFB, iv)
The ucrytolib in regular micropython however seems to only work with 16 bytes, so that shorter messages have to be padded to 16 bytes
Code: Select all
import cryptolib
msg='shortxt'+'89abcdef0'
iv=b'sixteen chatr iv'
cipher=cryptolib.aes(key, 2, iv)
Just wondering if there is anyone on the forum familiar with both libs who knows why crypto can handle the shorter messages without prompting the
error?