I am trying to configure the CryptoCell on an NRF52840 to use AES-CBC encryption with PKCS7 padding. When I call the following function, it returns SASI_AES_ILLEGAL_PADDING_TYPE_ERROR:
SaSiAesUserContext_t ctx;
SaSiError_t err = SaSi_AesInit(&ctx,
SASI_AES_ENCRYPT,
SASI_AES_MODE_CBC,
SASI_AES_PADDING_PKCS7);
Is Padding supported for AES-CBC. From the documentation it appears that it should be supported.
I am using Nordic nRF.SDK.14.2.0_17b948a on an nRF52840-Preview-DK development kit.