[PATCH 0/3] crypto: Add Keem Bay OCS HCU driver

2020-10-16 Thread Daniele Alessandrelli
) - sha256 and hmac(sha256) - sha384 and hmac(sha384) - sha512 and hmac(sha512) - sm3and hmac(sm3) The driver is passing crypto manager self-tests, including the extra tests (CRYPTO_MANAGER_EXTRA_TESTS=y). Daniele Alessandrelli (1): MAINTAINERS: Add maintainers for Keem Bay OCS HCU driver

[PATCH 3/3] MAINTAINERS: Add maintainers for Keem Bay OCS HCU driver

2020-10-16 Thread Daniele Alessandrelli
From: Daniele Alessandrelli Add maintainers for the Intel Keem Bay Offload Crypto Subsystem (OCS) Hash Control Unit (HCU) crypto driver. Signed-off-by: Daniele Alessandrelli --- MAINTAINERS | 11 +++ 1 file changed, 11 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index

[PATCH 2/3] crypto: keembay: Add Keem Bay OCS HCU driver

2020-10-16 Thread Daniele Alessandrelli
and hmac(sha384) - sha512 and hmac(sha512) - sm3and hmac(sm3) The driver passes crypto manager self-tests, including the extra tests (CRYPTO_MANAGER_EXTRA_TESTS=y). Signed-off-by: Declan Murphy Co-developed-by: Daniele Alessandrelli Signed-off-by: Daniele Alessandrelli Acked-by: Mark Gross

[PATCH 1/3] dt-bindings: crypto: Add Keem Bay OCS HCU bindings

2020-10-16 Thread Daniele Alessandrelli
From: Declan Murphy Add device-tree bindings for the Intel Keem Bay Offload Crypto Subsystem (OCS) Hashing Control Unit (HCU) crypto driver. Signed-off-by: Declan Murphy Signed-off-by: Daniele Alessandrelli Acked-by: Mark Gross --- .../crypto/intel,keembay-ocs-hcu.yaml | 52

Re: [PATCH 1/3] dt-bindings: crypto: Add Keem Bay OCS HCU bindings

2020-10-27 Thread Daniele Alessandrelli
Hi Rob, Thanks for reviewing the patch. On Mon, 2020-10-26 at 08:17 -0500, Rob Herring wrote: > On Fri, Oct 16, 2020 at 06:27:57PM +0100, Daniele Alessandrelli > wrote: > > From: Declan Murphy > > > > Add device-tree bindings for the Intel Keem Bay Offload Crypt

[PATCH v2 2/3] crypto: keembay: Add Keem Bay OCS HCU driver

2020-11-03 Thread Daniele Alessandrelli
and hmac(sha384) - sha512 and hmac(sha512) - sm3and hmac(sm3) The driver passes crypto manager self-tests, including the extra tests (CRYPTO_MANAGER_EXTRA_TESTS=y). Signed-off-by: Declan Murphy Co-developed-by: Daniele Alessandrelli Signed-off-by: Daniele Alessandrelli Acked-by: Mark Gross

[PATCH v2 0/3] crypto: Add Keem Bay OCS HCU driver

2020-11-03 Thread Daniele Alessandrelli
) - sha256 and hmac(sha256) - sha384 and hmac(sha384) - sha512 and hmac(sha512) - sm3and hmac(sm3) The driver is passing crypto manager self-tests, including the extra tests (CRYPTO_MANAGER_EXTRA_TESTS=y). v1 -> v2: - Fixed issues with dt-bindings Daniele Alessandrelli (1): MAINTAINERS:

[PATCH v2 3/3] MAINTAINERS: Add maintainers for Keem Bay OCS HCU driver

2020-11-03 Thread Daniele Alessandrelli
From: Daniele Alessandrelli Add maintainers for the Intel Keem Bay Offload Crypto Subsystem (OCS) Hash Control Unit (HCU) crypto driver. Signed-off-by: Daniele Alessandrelli --- MAINTAINERS | 11 +++ 1 file changed, 11 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index

[PATCH v2 1/3] dt-bindings: crypto: Add Keem Bay OCS HCU bindings

2020-11-03 Thread Daniele Alessandrelli
From: Declan Murphy Add device-tree bindings for the Intel Keem Bay Offload Crypto Subsystem (OCS) Hashing Control Unit (HCU) crypto driver. Signed-off-by: Declan Murphy Signed-off-by: Daniele Alessandrelli Acked-by: Mark Gross --- .../crypto/intel,keembay-ocs-hcu.yaml | 51

Re: [PATCH v2 1/3] dt-bindings: crypto: Add Keem Bay OCS HCU bindings

2020-11-10 Thread Daniele Alessandrelli
On Mon, 2020-11-09 at 10:15 -0600, Rob Herring wrote: > On Tue, Nov 03, 2020 at 06:49:23PM +0000, Daniele Alessandrelli wrote: > > From: Declan Murphy > > > > Add device-tree bindings for the Intel Keem Bay Offload Crypto Subsystem > > (OCS) Hashing Contr

[PATCH v3 0/3] crypto: Add Keem Bay OCS HCU driver

2020-11-16 Thread Daniele Alessandrelli
reg, interrupts, and clocks) v1 -> v2: - Fixed issues with dt-bindings Daniele Alessandrelli (1): MAINTAINERS: Add maintainers for Keem Bay OCS HCU driver Declan Murphy (2): dt-bindings: crypto: Add Keem Bay OCS HCU bindings crypto: keembay: Add Keem Bay OCS HCU driver .../crypto/intel,k

[PATCH v3 2/3] crypto: keembay: Add Keem Bay OCS HCU driver

2020-11-16 Thread Daniele Alessandrelli
and hmac(sha384) - sha512 and hmac(sha512) - sm3and hmac(sm3) The driver passes crypto manager self-tests, including the extra tests (CRYPTO_MANAGER_EXTRA_TESTS=y). Signed-off-by: Declan Murphy Co-developed-by: Daniele Alessandrelli Signed-off-by: Daniele Alessandrelli Acked-by: Mark Gross

[PATCH v3 3/3] MAINTAINERS: Add maintainers for Keem Bay OCS HCU driver

2020-11-16 Thread Daniele Alessandrelli
From: Daniele Alessandrelli Add maintainers for the Intel Keem Bay Offload Crypto Subsystem (OCS) Hash Control Unit (HCU) crypto driver. Signed-off-by: Daniele Alessandrelli Acked-by: Declan Murphy --- MAINTAINERS | 11 +++ 1 file changed, 11 insertions(+) diff --git a/MAINTAINERS b

[PATCH v3 1/3] dt-bindings: crypto: Add Keem Bay OCS HCU bindings

2020-11-16 Thread Daniele Alessandrelli
From: Declan Murphy Add device-tree bindings for the Intel Keem Bay Offload Crypto Subsystem (OCS) Hashing Control Unit (HCU) crypto driver. Signed-off-by: Declan Murphy Signed-off-by: Daniele Alessandrelli Acked-by: Mark Gross --- .../crypto/intel,keembay-ocs-hcu.yaml | 46

[PATCH 0/2] crypto: Add Keem Bay OCS AES/SM4 driver

2020-11-26 Thread Daniele Alessandrelli
driver is different from the Keem Bay OCS HCU driver previously submitted. Keem Bay OCS HCU provides hardware-accelerated ahash, while Keem Bay AES/SM4 (i.e., this driver) provides hardware-accelerated skcipher and aead. Daniele Alessandrelli (1): dt-bindings: Add Keem Bay OCS AES bindings Mike

[PATCH 1/2] dt-bindings: Add Keem Bay OCS AES bindings

2020-11-26 Thread Daniele Alessandrelli
From: Daniele Alessandrelli Add device-tree bindings for Intel Keem Bay Offload and Crypto Subsystem (OCS) AES crypto driver. Signed-off-by: Daniele Alessandrelli Acked-by: Mark Gross --- .../crypto/intel,keembay-ocs-aes.yaml | 45 +++ 1 file changed, 45 insertions

[PATCH 2/2] crypto: keembay-ocs-aes: Add support for Keem Bay OCS AES/SM4

2020-11-26 Thread Daniele Alessandrelli
128-bit and 256-bit keys. - ecb(sm4), cbc(sm4), ctr(sm4), cts(cbc(sm4)), gcm(sm4) and cbc(sm4); supported for 128-bit keys. The driver passes crypto manager self-tests, including the extra tests (CRYPTO_MANAGER_EXTRA_TESTS=y). Signed-off-by: Mike Healy Co-developed-by: Daniele Alessandrelli

Re: [PATCH v3 2/3] crypto: keembay: Add Keem Bay OCS HCU driver

2020-12-14 Thread Daniele Alessandrelli
yourself in each case : "what can an admin do with the output or is it > actionable?" In v4 (soon to be submitted), I've tried to improve error messages. > > > On Mon, Nov 16, 2020 at 06:58:45PM +, Daniele Alessandrelli wrote: > > From: Declan Murphy &g

[PATCH v4 1/5] dt-bindings: crypto: Add Keem Bay OCS HCU bindings

2020-12-16 Thread Daniele Alessandrelli
From: Declan Murphy Add device-tree bindings for the Intel Keem Bay Offload Crypto Subsystem (OCS) Hashing Control Unit (HCU) crypto driver. Signed-off-by: Declan Murphy Signed-off-by: Daniele Alessandrelli Acked-by: Mark Gross Reviewed-by: Rob Herring --- .../crypto/intel,keembay-ocs

[PATCH v4 0/5] crypto: Add Keem Bay OCS HCU driver

2020-12-16 Thread Daniele Alessandrelli
ith dt-bindings (removed useless descriptions for reg, interrupts, and clocks) v1 -> v2: - Fixed issues with dt-bindings Daniele Alessandrelli (3): crypto: keembay-ocs-hcu - Add HMAC support crypto: keembay-ocs-hcu - Add optional support for sha224 MAINTAINERS: Add maintainers for Keem Ba

[PATCH v4 2/5] crypto: keembay - Add Keem Bay OCS HCU driver

2020-12-16 Thread Daniele Alessandrelli
apping of the input sg list. The driver passes crypto manager self-tests, including the extra tests (CRYPTO_MANAGER_EXTRA_TESTS=y). Signed-off-by: Declan Murphy Co-developed-by: Daniele Alessandrelli Signed-off-by: Daniele Alessandrelli Acked-by: Mark Gross --- drivers/crypto/keembay/Kconfi

[PATCH v4 3/5] crypto: keembay-ocs-hcu - Add HMAC support

2020-12-16 Thread Daniele Alessandrelli
From: Daniele Alessandrelli Add HMAC support to the Keem Bay OCS HCU driver, thus making it provide the following additional transformations: - hmac(sha256) - hmac(sha384) - hmac(sha512) - hmac(sm3) The Keem Bay OCS HCU hardware does not allow "context-switch" for HMAC operations, i.e

[PATCH v4 4/5] crypto: keembay-ocs-hcu - Add optional support for sha224

2020-12-16 Thread Daniele Alessandrelli
From: Daniele Alessandrelli Add optional support of sha224 and hmac(sha224). Co-developed-by: Declan Murphy Signed-off-by: Declan Murphy Signed-off-by: Daniele Alessandrelli --- drivers/crypto/keembay/Kconfig| 12 drivers/crypto/keembay/keembay-ocs-hcu-core.c | 63

[PATCH v4 5/5] MAINTAINERS: Add maintainers for Keem Bay OCS HCU driver

2020-12-16 Thread Daniele Alessandrelli
From: Daniele Alessandrelli Add maintainers for the Intel Keem Bay Offload Crypto Subsystem (OCS) Hash Control Unit (HCU) crypto driver. Signed-off-by: Daniele Alessandrelli Acked-by: Declan Murphy --- MAINTAINERS | 11 +++ 1 file changed, 11 insertions(+) diff --git a/MAINTAINERS b

[PATCH] crypto: keembay-ocs-aes - Add dependency on HAS_IOMEM

2020-12-17 Thread Daniele Alessandrelli
From: Daniele Alessandrelli Add dependency for CRYPTO_DEV_KEEMBAY_OCS_AES_SM4 on HAS_IOMEM to prevent build failures. Fixes: 88574332451380f4 ("crypto: keembay - Add support for Keem Bay OCS AES/SM4") Reported-by: kernel test robot Signed-off-by: Daniele Alessandrelli --- driv

[RFC PATCH 2/6] crypto: ecc - Move ecc.h to include/crypto/internal

2020-12-17 Thread Daniele Alessandrelli
From: Daniele Alessandrelli Move ecc.h header file to 'include/crypto/internal' so that it can be easily imported from everywhere in the kernel tree. This change is done to allow crypto device drivers to re-use the symbols exported by 'crypto/ecc.c', thus avoiding code dupl

[RFC PATCH 0/6] Keem Bay OCS ECC crypto driver

2020-12-17 Thread Daniele Alessandrelli
ver passes the P-256 self test only when CONFIG_CRYPTO_DEV_KEEMBAY_OCS_ECDH_GEN_PRIV_KEY_SUPPORT=y. Is that acceptable? Daniele Alessandrelli (2): crypto: ecc - Move ecc.h to include/crypto/internal crypto: ecc - Export additional helper functions Prabhjot Khurana (4): crypto: engine - Add KPP Support to Crypto Engine crypto:

[RFC PATCH 4/6] crypto: ecdh - Add Curve ID for NIST P-384

2020-12-17 Thread Daniele Alessandrelli
From: Prabhjot Khurana Reserve ECC curve id for NIST P-384 curve. This is done to prepare for future support of the P-384 curve by KPP device drivers. Signed-off-by: Prabhjot Khurana Signed-off-by: Daniele Alessandrelli --- include/crypto/ecdh.h | 1 + 1 file changed, 1 insertion(+) diff

[RFC PATCH 3/6] crypto: ecc - Export additional helper functions

2020-12-17 Thread Daniele Alessandrelli
From: Daniele Alessandrelli Export the following additional ECC helper functions: - ecc_alloc_point() - ecc_free_point() - vli_num_bits() - ecc_point_is_zero() - ecc_swap_digits() This is done to allow future KPP device drivers to re-use existing code, thus simplifying their implementation

[RFC PATCH 5/6] dt-bindings: crypto: Add Keem Bay ECC bindings

2020-12-17 Thread Daniele Alessandrelli
From: Prabhjot Khurana Add Keem Bay Offload and Crypto Subsystem (OCS) Elliptic Curve Cryptography (ECC) device tree bindings. Signed-off-by: Prabhjot Khurana Signed-off-by: Daniele Alessandrelli --- .../crypto/intel,keembay-ocs-ecc.yaml | 47 +++ MAINTAINERS

[RFC PATCH 1/6] crypto: engine - Add KPP Support to Crypto Engine

2020-12-17 Thread Daniele Alessandrelli
From: Prabhjot Khurana Add KPP support to the crypto engine queue manager, so that it can be used to simplify the logic of KPP device drivers as done for other crypto drivers. Signed-off-by: Prabhjot Khurana Signed-off-by: Daniele Alessandrelli --- Documentation/crypto/crypto_engine.rst | 4

[RFC PATCH 6/6] crypto: keembay-ocs-ecc - Add Keem Bay OCS ECC Driver

2020-12-17 Thread Daniele Alessandrelli
ECDH-384. Signed-off-by: Prabhjot Khurana Co-developed-by: Daniele Alessandrelli Signed-off-by: Daniele Alessandrelli --- MAINTAINERS |4 + drivers/crypto/keembay/Kconfig | 31 + drivers/crypto/keembay/Makefile |2 + drivers

[PATCH] crypto: keembay-ocs-hcu - Add dependency on HAS_IOMEM and ARCH_KEEMBAY

2021-01-06 Thread Daniele Alessandrelli
From: Daniele Alessandrelli Add the following additional dependencies for CRYPTO_DEV_KEEMBAY_OCS_HCU: - HAS_IOMEM to prevent build failures - ARCH_KEEMBAY to prevent asking the user about this driver when configuring a kernel without Intel Keem Bay platform support. Signed-off-by: Daniele

Re: [PATCH v7 4/7] crypto: add ecc curve and expose them

2021-02-01 Thread Daniele Alessandrelli
On Thu, 2021-01-28 at 21:39 +1100, Herbert Xu wrote: > Once they're distinct algorithms, we can then make sure that only > the ones that are used in the kernel is added, even if some hardware > may support more curves. I like the idea of having different algorithms names (ecdh-nist- pXXX) for diff

[PATCH] crypto: ecdh_helper - Ensure 'len >= secret.len' in decode_key()

2021-02-03 Thread Daniele Alessandrelli
From: Daniele Alessandrelli The length ('len' parameter) passed to crypto_ecdh_decode_key() is never checked against the length encoded in the passed buffer ('buf' parameter). This could lead to an out-of-bounds access when the passed length is less than the encoded len

[PATCH] crypto: keembay-ocs-aes - Fix 'q' assignment during CCM B0 generation

2021-02-03 Thread Daniele Alessandrelli
From: Daniele Alessandrelli In ocs_aes_ccm_write_b0(), 'q' (the octet length of the binary representation of the octet length of the payload) is set to 'iv[0]', while it should be set to 'iv[0] & 0x7' (i.e., only the last 3 bits of iv[0] should be used), as docu