named-data-iot/ndn-lite

AES input padding is missing

Closed this issue · 1 comments

Current NDN-Lite backend is using Tinycrypt to do AES encryption. However, Tinycrypt does not provide padding when the input plaintext length % 16 != 0, and lead to errors when using AES APIs.
To fix this problem, we need to provide padding function by ourselves.
Let's use PKCS#7 padding for AES, that is, pad the last block with n bytes all with value n.

After commit 0d5ac00, we now support PKCS#7 padding.