]> git.baikalelectronics.ru Git - kernel.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)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 8 Jul 2022 07:21:17 +0000 (15:21 +0800)
commit83b6c56567db26230560f0db34d87a7ff7fc6a61
treee6a967ea224cbec0551e715896acaceb6cc0d0de
parent35e0d49531d344144689906d128c7c4bbe777ead
crypto: testmgr - populate RSA CRT parameters in RSA test vectors

Changes from v1:
  * replace some accidental spaces with tabs

In commit da97bbc3f5f9 ("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: da97bbc3f5f9 ("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>
crypto/testmgr.h