crypto: msm: fix hmac hashing issues with various key size
hmac-sha1 and hamc-sha256 have variable mac key up to a block size. If user provides a key that is less than the block size, the key should be padded with zero to the block size before it is given to the hw. This padding was not done properly in the driver. When switch engine between ahash hmac(sha1), hmac(sha256), and ipsec, problem may happen. ipsec takes 20 bytes of key. The generated digested data is wrong, even though everything looks fine from driver. ipsec may fail. Furthermore, this patch cleanup the driver to do proper setup of hardware to use hw key or pipe key. Change-Id: I128eca5a1ac4df326ea1ca9aef2bf27323c1c82f Acked-by:Chemin Hsieh <cheminh@qti.qualcomm.com> Signed-off-by:
Rohit Vaswani <rvaswani@codeaurora.org>
Loading
Please register or sign in to comment