[PATCH 0/5] crypto: add rsa pss support for x509

2021-04-06 Thread Hongbo Li
From: Hongbo Li This series of patches adds support for x509 cert signed by RSA with PSS encoding method. RSA PSS is described in rfc8017. This series of patches adds support for x509 cert signed by RSA with PSS encoding method. RSA PSS is described in rfc8017. Patch1 make x509 support rsa pss

[PATCH 1/5] x509: add support for rsa-pss

2021-04-06 Thread Hongbo Li
From: Hongbo Li This patch make x509 support rsa-pss, because the sha algo is in signature, so we need to parse the sha parameter, and skip other params. Signed-off-by: Hongbo Li --- crypto/asymmetric_keys/Makefile | 7 ++- crypto/asymmetric_keys/public_key.c | 5 +++ crypto

[PATCH 2/5] crypto: support rsa-pss encoding

2021-04-06 Thread Hongbo Li
From: Hongbo Li This patch add the support of rsa-pss encoding which is described rfc8017. Similar to rsa-pkcs1, we create a pss template. Signed-off-by: Hongbo Li --- crypto/Makefile | 7 ++- crypto/rsa.c | 14 ++--- crypto/rsa_helper.c | 127

[PATCH 3/5] crypto: add rsa pss test vector

2021-04-06 Thread Hongbo Li
From: Hongbo Li This patch adds the test vector for rsa with pss encoding. Signed-off-by: Hongbo Li --- crypto/testmgr.c | 7 + crypto/testmgr.h | 87 2 files changed, 94 insertions(+) diff --git a/crypto/testmgr.c b/crypto

[PATCH 4/5] crypto: ecdsa ima support

2021-04-06 Thread Hongbo Li
From: Hongbo Li This patch is borrowed from Stefan Berger's ecdsa patch series, will be removed when ecdsa is merged into kernel. Signed-off-by: Hongbo Li --- include/keys/asymmetric-type.h | 6 ++ security/integrity/digsig_asymmetric.c | 29 ++--- 2

[PATCH 5/5] ima: add support for rsa pss verification

2021-04-06 Thread Hongbo Li
From: Hongbo Li This patch adds support for ima verification for rsa with pss encoding. And a patch for ima-evm-utils will be sent later. Signed-off-by: Hongbo Li --- security/integrity/digsig_asymmetric.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/security

[PATCH v2 1/4] x509: add support for rsa-pss

2021-04-06 Thread Hongbo Li
This patch make x509 support rsa-pss, because the sha algo is in paramters, so we need to parse the sha parameter, and skip other params. Signed-off-by: Hongbo Li --- crypto/asymmetric_keys/Makefile| 7 ++- crypto/asymmetric_keys/public_key.c| 5 ++ crypto

[PATCH 0/5] crypto: add rsa pss support for x509

2021-04-06 Thread Hongbo Li
From: Hongbo Li This series of patches adds support for x509 cert signed by RSA with PSS encoding method. RSA PSS is described in rfc8017. Patch1 make x509 support rsa pss encoding and parse hash parameter. Patch2 add rsa pss template. Patch3 add test vector for rsa pss. Patch4 is the rsa

[PATCH v2 2/4] crypto: support rsa-pss encoding

2021-04-06 Thread Hongbo Li
This patch add the support of rsa-pss encoding which is described rfc8017. Similar to rsa-pkcs1, we create a pss template. Signed-off-by: Hongbo Li --- crypto/Makefile | 7 ++- crypto/rsa.c | 14 ++--- crypto/rsa_helper.c | 127

[PATCH v2 3/4] crypto: add rsa pss test vector

2021-04-06 Thread Hongbo Li
This patch adds the test vector for rsa with pss encoding. Signed-off-by: Hongbo Li --- crypto/testmgr.c | 7 + crypto/testmgr.h | 90 2 files changed, 97 insertions(+) diff --git a/crypto/testmgr.c b/crypto/testmgr.c index 10c5b3b

[PATCH v2 4/4] ima: add support for rsa pss verification

2021-04-06 Thread Hongbo Li
This patch adds support for ima verification for rsa with pss encoding. And a patch for ima-evm-utils will be sent later. Signed-off-by: Hongbo Li --- security/integrity/digsig_asymmetric.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/security

[PATCH v2 0/4] crypto: add rsa pss support for x509

2021-04-06 Thread Hongbo Li
From: Hongbo Li This series of patches adds support for x509 cert signed by RSA with PSS encoding method. RSA PSS is described in rfc8017. Patch1 make x509 support rsa pss encoding and parse hash parameter. Patch2 add rsa pss template. Patch3 add test vector for rsa pss. Patch4 is the rsa

[PATCH v3 0/4] crypto: add rsa pss support for x509

2021-04-06 Thread Hongbo Li
From: Hongbo Li This series of patches adds support for x509 cert signed by RSA with PSS encoding method. RSA PSS is described in rfc8017. Patch1 make x509 support rsa pss encoding and parse hash parameter. Patch2 add rsa pss template. Patch3 add test vector for rsa pss. Patch4 is the rsa

[PATCH v3 1/4] x509: add support for rsa-pss

2021-04-06 Thread Hongbo Li
This patch make x509 support rsa-pss, because the sha algo is in paramters, so we need to parse the sha parameter, and skip other params. Signed-off-by: Hongbo Li --- crypto/asymmetric_keys/Makefile| 7 ++- crypto/asymmetric_keys/public_key.c| 5 ++ crypto

[PATCH v3 2/4] crypto: support rsa-pss encoding

2021-04-06 Thread Hongbo Li
This patch add the support of rsa-pss encoding which is described rfc8017. Similar to rsa-pkcs1, we create a pss template. Signed-off-by: Hongbo Li --- crypto/Makefile | 7 +- crypto/rsa-psspad.c | 398 ++ crypto/rsa.c

[PATCH v3 3/4] crypto: add rsa pss test vector

2021-04-06 Thread Hongbo Li
This patch adds the test vector for rsa with pss encoding. Signed-off-by: Hongbo Li --- crypto/testmgr.c | 7 + crypto/testmgr.h | 90 2 files changed, 97 insertions(+) diff --git a/crypto/testmgr.c b/crypto/testmgr.c index 10c5b3b

[PATCH v3 4/4] ima: add support for rsa pss verification

2021-04-06 Thread Hongbo Li
This patch adds support for ima verification for rsa with pss encoding. And a patch for ima-evm-utils will be sent later. Signed-off-by: Hongbo Li --- security/integrity/digsig_asymmetric.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/security

Re: [PATCH 01/18] X.509: Parse RSASSA-PSS style certificates

2021-04-07 Thread hongbo li
Hello Varad, I also made an implementation of rsa pss: "[PATCH v3 0/4] crypto: add rsa pss support for x509". I notice your patches and did some review, find the following differences between our patches: 1. You rework the rsa pad framework. This is reasonable. 2. You did some changes on the keyc

[PATCH v4 0/4] crypto: add rsa pss support for x509

2021-04-07 Thread Hongbo Li
From: Hongbo Li This series of patches add support for x509 cert signed by RSA with PSS encoding method which is described in RFC8017 [1]. According to RFC8017, there're two encoding methods for signing and verification. One is PKCS1-v1_5 which is already supported by linux, the other o

[PATCH v4 1/4] x509: add support for rsa-pss

2021-04-07 Thread Hongbo Li
This patch make x509 support rsa with pss encoding. The sha algo is in the RSASSA-PSS-params, so we need to parse the sha parameter, and could skip other params. Also add two oids used by rsa-pss. Signed-off-by: Hongbo Li --- crypto/asymmetric_keys/Makefile| 7 ++- crypto

[PATCH v4 2/4] crypto: support rsa-pss encoding

2021-04-07 Thread Hongbo Li
verification according to RFC8017 section 8.1.2 and 9.1.2 Signed-off-by: Hongbo Li --- crypto/Makefile | 7 +- crypto/rsa-psspad.c | 398 ++ crypto/rsa.c | 14 +- crypto/rsa_helper.c | 127 ++ crypto

[PATCH v4 4/4] ima: add support for rsa pss verification

2021-04-07 Thread Hongbo Li
This patch adds support for ima verification for rsa with pss encoding. And a rsa-pss patch for ima-evm-utils has been sent. Signed-off-by: Hongbo Li --- security/integrity/digsig_asymmetric.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/security

[PATCH v4 3/4] crypto: add rsa pss test vector

2021-04-07 Thread Hongbo Li
This patch adds the test vector for rsa with pss encoding. Signed-off-by: Hongbo Li --- crypto/testmgr.c | 7 + crypto/testmgr.h | 90 2 files changed, 97 insertions(+) diff --git a/crypto/testmgr.c b/crypto/testmgr.c index 10c5b3b