mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 13:14:02 +02:00
crypto: s390/hmac - Generate intermediate CV for API partial block handling
The API partial block handling requires a intermediate chaining
value (CV). The internal function hash_data() sets the function code
correctly, so also call cpacf_kimd() instruction for intermediate CV
generation, as cpacf_klmd() always generate the final hash value.
Cc: stable@vger.kernel.org # 6.15+
Fixes: 08811169ac ("crypto: s390/hmac - Use API partial block handling")
Signed-off-by: Holger Dengler <dengler@linux.ibm.com>
Reviewed-by: Harald Freudenberger <freude@linux.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
53cf0f26ee
commit
10396a2d6d
|
|
@ -150,7 +150,10 @@ static int hash_data(const u8 *in, unsigned int inlen,
|
|||
|
||||
#undef PARAM_INIT
|
||||
|
||||
cpacf_klmd(func, ¶m, in, inlen);
|
||||
if (final)
|
||||
cpacf_klmd(func, ¶m, in, inlen);
|
||||
else
|
||||
cpacf_kimd(func, ¶m, in, inlen);
|
||||
|
||||
memcpy(digest, ¶m, digestsize);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user