]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
crypto: testmgr - populate RSA CRT parameters in RSA test vectors
authorIgnat Korchagin <ignat@cloudflare.com>
Mon, 4 Jul 2022 10:38:40 +0000 (11:38 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 11:50:48 +0000 (12:50 +0100)
commitadd54f9639388aaeac827f4bfd5be78a6aabce3d
treef97186ba6134942fd5ce6c9d73426d3534db99a2
parent40689219a28bfcba76b87e7b641795a91e151677
crypto: testmgr - populate RSA CRT parameters in RSA test vectors

[ Upstream commit 79e6e2f3f3ff345947075341781e900e4f70db81 ]

Changes from v1:
  * replace some accidental spaces with tabs

In commit f145d411a67e ("crypto: rsa - implement Chinese Remainder Theorem
for faster private key operations") we have started to use the additional
primes and coefficients for RSA private key operations. However, these
additional parameters are not present (defined as 0 integers) in the RSA
test vectors.

Some parameters were borrowed from OpenSSL, so I was able to find the
source. I could not find the public source for 1 vector though, so had to
recover the parameters by implementing Appendix C from [1].

[1]: https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-56Br1.pdf

Fixes: f145d411a67e ("crypto: rsa - implement Chinese Remainder Theorem for faster private key operations")
Reported-by: Tasmiya Nalatwad <tasmiya@linux.vnet.ibm.com>
Signed-off-by: Ignat Korchagin <ignat@cloudflare.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
crypto/testmgr.h