[PATCH] crypto: hisilicon/hpre - add ecc algorithm inqury for uacce device

Subsystems: crypto api, hisilicon high performance rsa engine driver (hpre), the rest

STALE2050d REVIEWED: 1 (0M)

1 review trailer.

2 messages, 2 authors, 2021-01-29 · open the first message on its own page

[PATCH] crypto: hisilicon/hpre - add ecc algorithm inqury for uacce device

From: Hui Tang <hidden>
Date: 2021-01-18 08:21:49

Uacce SysFS support more algorithms inqury such as
'ecdh/ecdsa/sm2/x25519/x448'

Signed-off-by: Hui Tang <redacted>
Reviewed-by: Zaibo Xu <redacted>
---
 drivers/crypto/hisilicon/hpre/hpre_main.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/crypto/hisilicon/hpre/hpre_main.c b/drivers/crypto/hisilicon/hpre/hpre_main.c
index d46086e..3b3481e 100644
--- a/drivers/crypto/hisilicon/hpre/hpre_main.c
+++ b/drivers/crypto/hisilicon/hpre/hpre_main.c
@@ -778,7 +778,10 @@ static int hpre_qm_init(struct hisi_qm *qm, struct pci_dev *pdev)
 		return -EINVAL;
 	}
 
-	qm->algs = "rsa\ndh\n";
+	if (pdev->revision >= QM_HW_V3)
+		qm->algs = "rsa\ndh\necdh\nx25519\nx448\necdsa\nsm2\n";
+	else
+		qm->algs = "rsa\ndh\n";
 	qm->mode = uacce_mode;
 	qm->pdev = pdev;
 	qm->ver = pdev->revision;
-- 
2.8.1

Re: [PATCH] crypto: hisilicon/hpre - add ecc algorithm inqury for uacce device

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2021-01-29 05:11:44

On Mon, Jan 18, 2021 at 04:18:19PM +0800, Hui Tang wrote:
Uacce SysFS support more algorithms inqury such as
'ecdh/ecdsa/sm2/x25519/x448'

Signed-off-by: Hui Tang <redacted>
Reviewed-by: Zaibo Xu <redacted>
---
 drivers/crypto/hisilicon/hpre/hpre_main.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Patch applied.  Thanks.
-- 
Email: Herbert Xu [off-list ref]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help