Re: [PATCH 2/2] crypto: caam - support tagged keys for skcipher algorithms

2020-09-13 Thread Richard Weinberger
On Thu, Jul 16, 2020 at 4:12 PM Richard Weinberger wrote: > > On Mon, Jul 13, 2020 at 12:09 AM Iuliana Prodan > wrote: > > > > Tagged keys are keys that contain metadata indicating what > > they are and how to handle them using tag_object API. > > > > Add support, for tagged keys, to skcipher al

Re: [PATCH v6 7/8] X.509: support OSCCA sm2-with-sm3 certificate verification

2020-09-13 Thread Tianjia Zhang
Hi Gilad, On 9/13/20 3:12 PM, Gilad Ben-Yossef wrote: Hi, On Thu, Sep 3, 2020 at 4:13 PM Tianjia Zhang wrote: The digital certificate format based on SM2 crypto algorithm as specified in GM/T 0015-2012. It was published by State Encryption Management Bureau, China. The method of generating

[PATCH 1/3] crypto: inside-secure - Move priv pointer into safexcel_context

2020-09-13 Thread Herbert Xu
This patch moves the priv pointer into struct safexcel_context because both structs that extend safexcel_context have that pointer as well. Signed-off-by: Herbert Xu --- drivers/crypto/inside-secure/safexcel.h|1 drivers/crypto/inside-secure/safexcel_cipher.c | 42 ---

[PATCH 2/3] crypto: inside-secure - Move ipad/opad into safexcel_context

2020-09-13 Thread Herbert Xu
As both safexcel_ahash_ctx and safexcel_cipher_ctx contain ipad and opad buffers this patch moves them into the common struct safexcel_context. It also adds a union so that they can be accessed in the appropriate endian without crazy casts. Signed-off-by: Herbert Xu --- drivers/crypto/inside-s

[PATCH 3/3] crypto: inside-secure - Reuse code in safexcel_hmac_alg_setkey

2020-09-13 Thread Herbert Xu
The code in the current implementation of safexcel_hmac_alg_setkey can be reused by safexcel_cipher. This patch does just that by renaming the previous safexcel_hmac_setkey to __safexcel_hmac_setkey. The now-shared safexcel_hmac_alg_setkey becomes safexcel_hmac_setkey and a new safexcel_hmac_alg_s

[PATCH 0/3] crypto: inside-secure - Silence stack frame size warning in safexcel_aead_setkey

2020-09-13 Thread Herbert Xu
cbb1c86aa6cc > commit: bb7679b840cc7cf23868e05c5ef7a044e7fafd97 crypto: inside-secure - > Added support for authenc HMAC-SHA1/DES-CBC > date: 12 months ago > config: arm-randconfig-r005-20200913 (attached as .config) > compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0 > reproduce (this i

[PATCH -next] crypto: atmel-aes - convert to use be32_add_cpu()

2020-09-13 Thread Liu Shixin
Convert cpu_to_be32(be32_to_cpu(E1) + E2) to use be32_add_cpu(). Signed-off-by: Liu Shixin --- drivers/crypto/atmel-aes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/atmel-aes.c b/drivers/crypto/atmel-aes.c index a6e14491e080..b1d286004295 100644 --- a/driv

[PATCH v6] cypto: mediatek - fix leaks in mtk_desc_ring_alloc

2020-09-13 Thread Xiaoliang Pang
In the init loop, if an error occurs in function 'dma_alloc_coherent', then goto the err_cleanup section, after run i--, in the array ring, the struct mtk_ring with index i will not be released, causing memory leaks Fixes: 785e5c616c849 ("crypto: mediatek - Add crypto driver support for some Medi

[PATCH 2/2] crypto: Ingenic: Add hardware TRNG for Ingenic X1830.

2020-09-13 Thread Zhou Yanjie
Add X1830 SoC digital true random number generator driver. Tested-by: 周正 (Zhou Zheng) Co-developed-by: 漆鹏振 (Qi Pengzhen) Signed-off-by: 漆鹏振 (Qi Pengzhen) Signed-off-by: 周琰杰 (Zhou Yanjie) --- drivers/char/hw_random/Kconfig| 14 +++ drivers/char/hw_random/Makefile | 1 + driver

[PATCH 0/2] Add support for the TRNG in Ingenic X1830.

2020-09-13 Thread Zhou Yanjie
1.Add the TRNG bindings for the X1830 SoC from Ingenic. 2.Add X1830 SoC digital true random number generator driver. 周琰杰 (Zhou Yanjie) (2): dt-bindings: RNG: Add Ingenic TRNG bindings. crypto: Ingenic: Add hardware TRNG for Ingenic X1830. .../devicetree/bindings/rng/ingenic,trng.yaml |

[PATCH 1/2] dt-bindings: RNG: Add Ingenic TRNG bindings.

2020-09-13 Thread Zhou Yanjie
Add the TRNG bindings for the X1830 SoC from Ingenic. Signed-off-by: 周琰杰 (Zhou Yanjie) --- .../devicetree/bindings/rng/ingenic,trng.yaml | 43 ++ 1 file changed, 43 insertions(+) create mode 100644 Documentation/devicetree/bindings/rng/ingenic,trng.yaml diff --git a/Do

Re: [PATCH v6 7/8] X.509: support OSCCA sm2-with-sm3 certificate verification

2020-09-13 Thread Gilad Ben-Yossef
Hi, On Thu, Sep 3, 2020 at 4:13 PM Tianjia Zhang wrote: > > The digital certificate format based on SM2 crypto algorithm as > specified in GM/T 0015-2012. It was published by State Encryption > Management Bureau, China. > > The method of generating Other User Information is defined as > ZA=H256(