]> Git Repo - linux.git/commit
crypto: ecc - Fix off-by-one missing to clear most significant digit
authorStefan Berger <[email protected]>
Thu, 13 Jun 2024 21:38:20 +0000 (17:38 -0400)
committerHerbert Xu <[email protected]>
Sun, 16 Jun 2024 05:41:53 +0000 (13:41 +0800)
commit1dcf865d3bf5bff45e93cb2410911b3428dacb78
tree95dccb50120a3e8ef9adfd1842c900660fea19e1
parent0eb3bed57a06a20c612012127f4405d48fa4a50f
crypto: ecc - Fix off-by-one missing to clear most significant digit

Fix an off-by-one error where the most significant digit was not
initialized leading to signature verification failures by the testmgr.

Example: If a curve requires ndigits (=9) and diff (=2) indicates that
2 digits need to be set to zero then start with digit 'ndigits - diff' (=7)
and clear 'diff' digits starting from there, so 7 and 8.

Reported-by: Venkat Rao Bagalkote <[email protected]>
Closes: https://lore.kernel.org/linux-crypto/[email protected]/T/#m045d8812409ce233c17fcdb8b88b6629c671f9f4
Fixes: 2fd2a82ccbfc ("crypto: ecdsa - Use ecc_digits_from_bytes to create hash digits array")
Signed-off-by: Stefan Berger <[email protected]>
Tested-by: Venkat Rao Bagalkote <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
crypto/ecc.c
This page took 0.057609 seconds and 4 git commands to generate.