]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: rsa-pkcs1pad - Handle leading zero for decryption
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 22 Sep 2016 09:04:57 +0000 (17:04 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 22 Sep 2016 09:42:08 +0000 (17:42 +0800)
commit9ecaa14bc121284c8340fe9197df42992b86412d
tree093421f3aa73817b2d0f46fcd06cd9c56c849c94
parent1b99cc87707e75e638884fa4b69c9c7d9320cc4c
crypto: rsa-pkcs1pad - Handle leading zero for decryption

As the software RSA implementation now produces fixed-length
output, we need to eliminate leading zeros in the calling code
instead.

This patch does just that for pkcs1pad decryption while signature
verification was fixed in an earlier patch.

Fixes: 37662a3b25c6 ("crypto: rsa - Generate fixed-length output")
Reported-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/rsa-pkcs1pad.c