[PATCH 2/2] crypto: ecdh: fix to allow multi segment scatterlists

2018-03-01 Thread James Bottomley
Apparently the ecdh use case was in bluetooth which always has single element scatterlists, so the ecdh module was hard coded to expect them. Now we're using this in TPM, we need multi-element scatterlists, so remove this limitation. Signed-off-by: James Bottomley

[PATCH 1/2] crypto: cfb: add support for Cipher FeedBack mode

2018-03-01 Thread James Bottomley
TPM security routines require encryption and decryption with AES in CFB mode, so add it to the Linux Crypto schemes. CFB is basically a one time pad where the pad is generated initially from the encrypted IV and then subsequently from the encrypted previous block of ciphertext. The pad is XOR'd

[PATCH 0/2] add crypto support for TPM communication

2018-03-01 Thread James Bottomley
To support cryptographic communication with the TPM, we need to add Cipher FeedBack (CFB) mode for stream encryption because this is the mandated encryption scheme for all encrypted parameters and responses.  Additionally, we ran across a problem in the elliptic curve routines in that the size of

Re: [PATCH 2/2] hwrng: mxc-rnga - add driver support on boards with device tree

2018-03-01 Thread Vladimir Zapolskiy
On 02/27/2018 10:07 PM, Vladimir Zapolskiy wrote: > On 02/27/2018 09:39 PM, Kim Phillips wrote: >> On Tue, 27 Feb 2018 18:53:08 +0200 >> Vladimir Zapolskiy wrote: >> >>> On 02/27/2018 05:49 PM, Kim Phillips wrote: On Mon, 26 Feb 2018 20:38:49 +0200 Vladimir Zapolskiy

[PATCH 2/4] crypto: omap-sham - Fix misleading indentation

2018-03-01 Thread Krzysztof Kozlowski
Commit 8043bb1ae03c ("crypto: omap-sham - convert driver logic to use sgs for data xmit") removed the if() clause leaving the statement as is. The intention was in that case to finish the request always so the goto instruction seems sensible. Remove the indentation to fix Smatch warning:

[PATCH 4/4] crypto: s5p-sss - Constify pointed data (arguments and local variables)

2018-03-01 Thread Krzysztof Kozlowski
Improve the code (safety and readability) by indicating that data passed through pointer is not modified. This adds const keyword in many places, most notably: - the driver data (pointer to struct samsung_aes_variant), - scatterlist addresses written as value to device registers, - key and IV

[PATCH 3/4] crypto: s5p-sss: Remove useless check for non-null request

2018-03-01 Thread Krzysztof Kozlowski
ahash_request 'req' argument passed by the caller s5p_hash_handle_queue() cannot be NULL here because it is obtained from non-NULL pointer via container_of(). This fixes smatch warning: drivers/crypto/s5p-sss.c:1213 s5p_hash_prepare_request() warn: variable dereferenced before check 'req'

[PATCH 1/4] crypto: omap-sham: Remove useless check for non-null request

2018-03-01 Thread Krzysztof Kozlowski
ahash_request 'req' argument passed by the caller omap_sham_handle_queue() cannot be NULL here because it is obtained from non-NULL pointer via container_of(). This fixes smatch warning: drivers/crypto/omap-sham.c:812 omap_sham_prepare_request() warn: variable dereferenced before check 'req'

[PATCH 0/2] Keystone2 HW random generator

2018-03-01 Thread Vitaly Andrianov
Keyston2 Security Accelerator has a hardware random generator sub-module. This series adds the driver for the sub-module. Vitaly Andrianov (2): Documentation: dt: rng: add bindings doc for Keystone SA HWRNG driver hw_random: keystone2: add hw_random driver

[PATCH 2/2] hw_random: keystone2: add hw_random driver

2018-03-01 Thread Vitaly Andrianov
Keystone Security Accelerator module has a hardware random generator sub-module. This commit adds the driver for this sub-module. Signed-off-by: Vitaly Andrianov [t-kri...@ti.com: dropped one unnecessary dev_err message] Signed-off-by: Tero Kristo Signed-off-by:

[PATCH 1/2] Documentation: dt: rng: add bindings doc for Keystone SA HWRNG driver

2018-03-01 Thread Vitaly Andrianov
The Keystone SA module has a hardware random generator module. This commit adds binding doc for the KS2 SA HWRNG driver. Signed-off-by: Vitaly Andrianov Signed-off-by: Murali Karicheri --- Documentation/devicetree/bindings/rng/ks-sa-rng.txt | 21