diff options
author | Daniel Kestrel <kestrel1974@t-online.de> | 2021-06-06 21:16:32 +0200 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2022-01-06 00:22:57 +0100 |
commit | 85383b311212576e7afd9d01dec49f69ef6fb886 (patch) | |
tree | 2f9f93caf09a2abe0aa232ec2cdf27f4cc60c0eb /tools/b43-tools | |
parent | 9cb1875d2fcf20c208a63693d7395eb4963f59cb (diff) | |
download | upstream-85383b311212576e7afd9d01dec49f69ef6fb886.tar.gz upstream-85383b311212576e7afd9d01dec49f69ef6fb886.tar.bz2 upstream-85383b311212576e7afd9d01dec49f69ef6fb886.zip |
ltq-deu: fix setkey errors and static shared temp for hmac algos
The hmac algorithms state, that keys larger than the key size should be
hashed with the underlying hash algorithms and then those hashes are to
be used as keys. This patch implements this. In order to avoid allocating
a descriptor during setkey, a shash_desc pointer is added to the context.
Another issue for multithreaded callers is the shared temp array.
The temp array is static and as such would be shared among multithreaded
callers, which obviously would neither work nor produce correct results.
The temp array (4k size) is moved to the context and since the size of
the context is limited, it can only be defined as pointer otherwise the
initialisation of the hash algorithm fails.
The allocations and freeing of both the temp and the desc pointer in the
context are done by implementing cra_init and cra_exit functions for
the hmac algorithms.
Also improved indentation in some areas.
Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
Diffstat (limited to 'tools/b43-tools')
0 files changed, 0 insertions, 0 deletions