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)
commit0cf43f509f72128196e23f5ade7e512a72152cc6
tree093421f3aa73817b2d0f46fcd06cd9c56c849c94
parent456bee986e0a372ad4beed5d3cedb3622633d9df
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: 9b45b7bba3d2 ("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