aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/crypto/zcrypt_pcica.c
diff options
context:
space:
mode:
authorIngo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>2015-09-04 09:57:24 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2015-10-14 14:31:59 +0200
commit1330a1258dc20caa5961b07aa62482793d6f2ecf (patch)
treedddc2a4438dc63b69ab1aad5d411032b4a206f5a /drivers/s390/crypto/zcrypt_pcica.c
parents390/numa: write kernel message when emu_size has been increased (diff)
downloadlinux-dev-1330a1258dc20caa5961b07aa62482793d6f2ecf.tar.xz
linux-dev-1330a1258dc20caa5961b07aa62482793d6f2ecf.zip
s390/zcrypt: enable odd RSA modulus sizes in CRT format
In the past only even modulus sizes were allowed for RSA keys in CRT format. This restriction was based on limited RSA key generation on older crypto adapters that provides only even modulus sizes. This restriction is not valid any more. Revoke restrictions that crypto requests can be serviced with odd RSA modulus length in CRT format. Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to '')
-rw-r--r--drivers/s390/crypto/zcrypt_pcica.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/s390/crypto/zcrypt_pcica.c b/drivers/s390/crypto/zcrypt_pcica.c
index 7a743f4c646c..2f220208da63 100644
--- a/drivers/s390/crypto/zcrypt_pcica.c
+++ b/drivers/s390/crypto/zcrypt_pcica.c
@@ -138,7 +138,7 @@ static int ICACRT_msg_to_type4CRT_msg(struct zcrypt_device *zdev,
int mod_len, short_len, long_len;
mod_len = crt->inputdatalength;
- short_len = mod_len / 2;
+ short_len = (mod_len + 1) / 2;
long_len = mod_len / 2 + 8;
if (mod_len <= 128) {