Commit ec648891 authored by Stefan Berger's avatar Stefan Berger Committed by Greg Kroah-Hartman
Browse files

crypto: ecdsa - Use ecc_digits_from_bytes to convert signature



[ Upstream commit 546ce0bd ]

Since ecc_digits_from_bytes will provide zeros when an insufficient number
of bytes are passed in the input byte array, use it to convert the r and s
components of the signature to digits directly from the input byte
array. This avoids going through an intermediate byte array that has the
first few bytes filled with zeros.

Signed-off-by: default avatarStefan Berger <stefanb@linux.ibm.com>
Reviewed-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Stable-dep-of: 3b0565c7 ("crypto: ecdsa - Avoid signed integer overflow on signature decoding")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 1afc7acb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment