diff options
author | Gary R Hook <gary.hook@amd.com> | 2017-07-17 15:16:42 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2017-07-28 17:58:06 +0800 |
commit | e28c190db66830c04b403b7eba7f8a5b53c22ffc (patch) | |
tree | 9bf7a348288769ba4396d3e9741fd2ce64b398d5 /drivers/crypto/ccp/ccp-crypto-rsa.c | |
parent | ceeec0afd684fdfde285469df0ead6c3ab53513e (diff) | |
download | linux-e28c190db66830c04b403b7eba7f8a5b53c22ffc.tar.gz |
csrypto: ccp - Expand RSA support for a v5 ccp
A version 5 CCP can handle an RSA modulus up to 16k bits.
Signed-off-by: Gary R Hook <gary.hook@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/ccp/ccp-crypto-rsa.c')
-rw-r--r-- | drivers/crypto/ccp/ccp-crypto-rsa.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/crypto/ccp/ccp-crypto-rsa.c b/drivers/crypto/ccp/ccp-crypto-rsa.c index d5544943f5f0..e6db8672d89c 100644 --- a/drivers/crypto/ccp/ccp-crypto-rsa.c +++ b/drivers/crypto/ccp/ccp-crypto-rsa.c @@ -60,7 +60,10 @@ static int ccp_rsa_complete(struct crypto_async_request *async_req, int ret) static unsigned int ccp_rsa_maxsize(struct crypto_akcipher *tfm) { - return CCP_RSA_MAXMOD; + if (ccp_version() > CCP_VERSION(3, 0)) + return CCP5_RSA_MAXMOD; + else + return CCP_RSA_MAXMOD; } static int ccp_rsa_crypt(struct akcipher_request *req, bool encrypt) |