1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-06-26 01:27:28 +02:00
openwrt/package
Daniel Kestrel 34a3eaf07f ltq-deu: changes for hash multithread callers and md5 endianess
The algorithms sha1, sha1_hmac and md5_hmac all use ENDI=1. The md5
algorithm uses ENDI=0 and the endian_swap methods to reverse the
endianess switch by using user CPU time, which is unnecessary overhead.
Danube and AR9 devices do not set endianess for SHA1, so is done for
MD5.
Furthermore the patch replaces endian_swap with le32_to_cpu for md5 and
md5 hmac algorithms and removes endian_swap for them.
The init functions initialize the algorithm in the hardware. The lock is
not used to write to the control register. If another thread calls
another hash algo before update or final, the result will be wrong.
Therefore move the algorithm init to the lock protected sections in the
transform or final methods.
Setting the hw key for the hmac algorithms is now done from within the
lock protected sections in their final methods. The lock protecting is
removed from the _hmac_setkey_hw functions.
In final for md5 and sha1 the lock section is removed, because all the
work was already done in transform (which is called from final). As such
only copying the hash to the output is required.
MD5 and MD5_HMAC produce 16 byte hashes (4 DWORDS) only, therefor
writing register D5R to the hash output is removed for MD5_HMAC.

Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
2022-01-06 00:22:50 +01:00
..
base-files base-files: upgrade: fix efi partitions size calculation 2021-12-27 13:51:41 +01:00
boot kirkwood: add support for NETGEAR ReadyNAS Duo v2 2021-12-29 20:35:57 +01:00
devel binutils: fix compiling with arch-based distros 2022-01-02 20:33:28 +01:00
firmware linux-firmware: amd: consolidate amd's linux-firmware entries 2021-12-27 13:51:41 +01:00
kernel ltq-deu: changes for hash multithread callers and md5 endianess 2022-01-06 00:22:50 +01:00
libs openssl: bump to 1.1.1m 2022-01-01 18:02:49 +01:00
network hostapd: refresh patchset 2021-12-31 12:11:59 +01:00
system procd: update to git HEAD 2021-12-20 02:23:47 +00:00
utils lua: add HOST_FPIC for host builds 2022-01-03 10:34:31 +01:00
Makefile build: fix opkg install step for large package selection 2021-05-12 11:13:53 +02:00