diff options
author | Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com> | 2015-09-04 09:57:24 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2015-10-14 14:31:59 +0200 |
commit | 1330a1258dc20caa5961b07aa62482793d6f2ecf (patch) | |
tree | dddc2a4438dc63b69ab1aad5d411032b4a206f5a /drivers/s390/crypto/zcrypt_pcica.c | |
parent | b02064a9b8134e1aac4e891abf72139ca0b126ee (diff) | |
download | linux-1330a1258dc20caa5961b07aa62482793d6f2ecf.tar.gz linux-1330a1258dc20caa5961b07aa62482793d6f2ecf.tar.bz2 linux-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 'drivers/s390/crypto/zcrypt_pcica.c')
-rw-r--r-- | drivers/s390/crypto/zcrypt_pcica.c | 2 |
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) { |