AES input padding is missing
Closed this issue · 1 comments
Zhiyi-Zhang commented
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.
tianyuan129 commented
After commit 0d5ac00, we now support PKCS#7 padding.