diff options
author | Daniel Kestrel <kestrel1974@t-online.de> | 2021-07-08 07:59:41 +0200 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2022-01-06 00:23:15 +0100 |
commit | 79efaa7f8fa5c4e2010c9948155838cfb5e72663 (patch) | |
tree | c1b1fbacd4a8c38a483ff5e934c1cc740c3de2d5 /.github | |
parent | f8e5c6080c2eb7397b03a4e6f64d3f6ea01b05d1 (diff) | |
download | upstream-79efaa7f8fa5c4e2010c9948155838cfb5e72663.tar.gz upstream-79efaa7f8fa5c4e2010c9948155838cfb5e72663.tar.bz2 upstream-79efaa7f8fa5c4e2010c9948155838cfb5e72663.zip |
ltq-deu: add shash cbcmac-aes algorithm to the driver
Since commit 53b6783 hostapd is using the kernel api which includes the
cbcmac-aes shash algorithm. The kernels implementation is a wrapper around
the aes encryption algorithm, which encrypts block (16 bytes) by block.
When the ltq-deu driver is present, it uses hardware aes, but every 16 byte
encrypt requires setting the key. This is very inefficient and is a huge
overhead. Since the cbcmac-aes is simply a hash that uses the cbc aes
algorithm starting with an iv set to x'00' with an optional ecb aes
encryption of a possible last incomplete block that is padded with the
positional bytes of the last cbc encrypted block, this algorithm is now
added to the driver. Most of the code is derived from md5-hmac and
tailored for aes. Tested with the kernels crypto testmgr including extra
tests against the kernels generic ccm module implementation.
This patch also fixes the overallocation in the aes_ctx that is caused
by using u32 instead of u8 for the aes keys.
Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
Diffstat (limited to '.github')
0 files changed, 0 insertions, 0 deletions