[PATCH] crypto: rsa - fix dst len

2016-04-06 Thread Tadeusz Struk
The output buffer length has to be at least as big as the key_size. It is then updated to the actual output size by the implementation. Cc: Signed-off-by: Tadeusz Struk --- crypto/rsa-pkcs1pad.c | 12 ++-- 1 file changed, 6

[PATCH v2] crypto: qat - adf_dev_stop should not be called in atomic context

2016-04-06 Thread Tadeusz Struk
VFs call adf_dev_stop() from a PF to VF interrupt bottom half. This causes an oops "scheduling while atomic", because it tries to acquire a mutex to un-register crypto algorithms. This patch fixes the issue by calling adf_dev_stop() asynchronously. Changes in v2: - change kthread to a work

Re: [PATCH 0/3] crypto: af_alg - add TLS type encryption

2016-04-06 Thread Tadeusz Struk
Hi Herbert, On 04/05/2016 04:29 AM, Herbert Xu wrote: > On Sat, Mar 05, 2016 at 05:20:44PM -0800, Tadeusz Struk wrote: >> > Hi, >> > The following series adds TLS type authentication. To do this a new >> > template, encauth, is introduced. It is derived from the existing authenc >> > template and

[PATCH v3 0/3] crypto: caam - add support for RSA algorithm

2016-04-06 Thread Tudor Ambarus
Depends on [PATCH v3 0/3] crypto: rsa - generalize ASN.1 sequences v2 patch set can be found here: http://www.mail-archive.com/linux-crypto%40vger.kernel.org/msg18273.html Changes to v2 patch set: - "crypto: caam - add support for RSA algorithm" - update Kconfig so that it selects

[PATCH v3 2/3] crypto: scatterwalk - export scatterwalk_pagedone

2016-04-06 Thread Tudor Ambarus
Used in caam driver. Export the symbol since the caam driver can be built as a module. Signed-off-by: Tudor Ambarus --- crypto/scatterwalk.c | 5 +++-- include/crypto/scatterwalk.h | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git

[PATCH v3 3/3] crypto: rsa_helper - export symbols for asn1 structures

2016-04-06 Thread Tudor Ambarus
Export rsapubkey_decoder and rsaprivkey_decoder structures, since they can (will) be used by caam and qat drivers. Signed-off-by: Tudor Ambarus --- crypto/rsa_helper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crypto/rsa_helper.c b/crypto/rsa_helper.c

[PATCH v3 1/3] crypto: scatterwak - Add scatterwalk_sg_copychunks

2016-04-06 Thread Tudor Ambarus
This patch adds the function scatterwalk_sg_copychunks which writes a chunk of data from a scatterwalk to another scatterwalk. It will be used by caam driver to remove the leading zeros of RSA's algorithm output. Signed-off-by: Tudor Ambarus --- crypto/scatterwalk.c

[PATCH v3 1/3] crypto: rsa - generalize ASN.1 sequences

2016-04-06 Thread Tudor Ambarus
Use common ASN.1 sequences for all RSA implementations. Give hardware RSA implementations the chance to use the RSA's software implementation parser even if they are likely to want to use raw integers. The parser expects a context that contains at the first address a pointer to a struct

[PATCH v3 0/3] crypto: rsa - generalize ASN.1 sequences

2016-04-06 Thread Tudor Ambarus
v2 patch set can be found here: http://www.mail-archive.com/linux-crypto%40vger.kernel.org/msg18269.html Changes to v2 patch set: - "crypto: add CONFIG_ symbol for rsa helper" - removed. The drivers will select the CRYPTO_RSA symbol instead. Tudor Ambarus (3): crypto: rsa -

[PATCH v3 2/3] crypto: rsa_helper - add raw integer parser actions

2016-04-06 Thread Tudor Ambarus
Dedicated to RSA (hardware) implementations that want to use raw integers instead of MPI keys. Signed-off-by: Tudor Ambarus --- crypto/rsa.c | 15 crypto/rsa_helper.c | 182 ++

Re: [PATCH] PKCS#7: fix missing break on OID_sha224 case

2016-04-06 Thread David Howells
Colin King wrote: > From: Colin Ian King > > The OID_sha224 case is missing a break and it falls through > to the -ENOPKG error default. Since HASH_ALGO_SHA224 seems > to be supported, this looks like an unintentional missing break. > >

[PATCH v2 22/30] crypto: use parity functions in qat_hal

2016-04-06 Thread zengzhaoxiu
From: Zhaoxiu Zeng Signed-off-by: Zhaoxiu Zeng --- drivers/crypto/qat/qat_common/qat_hal.c | 32 ++-- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/drivers/crypto/qat/qat_common/qat_hal.c