Re: [PATCH v2 00/18] Implement RSASSA-PSS signature verification

2021-04-20 Thread Varad Gautam
Hi David, On 4/8/21 5:08 PM, David Howells wrote: > Varad Gautam wrote: > >> The test harness is available at [5]. > > Can you add this to the keyutils testsuite? > These are two separate things IMO - the keyutils tests test for "the keyctl interface behaves a

[PATCH v3 17/18] crypto: Accept pss as valid encoding during signature verification

2021-04-20 Thread Varad Gautam
Accept pss encoding for public_key_verify_signature. If CONFIG_CRYPTO_RSASSA_PSS is disabled, crypto_alloc_akcipher will fail to find a pss backend anyway. Signed-off-by: Varad Gautam Acked-by: Jarkko Sakkinen --- crypto/asymmetric_keys/public_key.c | 18 +- 1 file changed, 13

[PATCH v3 18/18] keyctl_pkey: Add pkey parameters saltlen and mgfhash for PSS

2021-04-20 Thread Varad Gautam
unction used for MGF. Signed-off-by: Varad Gautam CC: Jarkko Sakkinen CC: Ben Boeckel --- v3: Rename slen to saltlen, update Documentation/security/keys/core.rst. Documentation/security/keys/core.rst | 14 +- crypto/asymmetric_keys/asymmetric_type.c | 2 ++ include/linux/keyctl.h

Re: [PATCH v2 18/18] keyctl_pkey: Add pkey parameters slen and mgfhash for PSS

2021-04-20 Thread Varad Gautam
On 4/9/21 4:15 PM, Ben Boeckel wrote: > On Thu, Apr 08, 2021 at 16:15:16 +0200, Varad Gautam wrote: >> keyctl pkey_* operations accept enc and hash parameters at present. >> RSASSA-PSS signatures also require passing in the signature salt >> length and the mgf hash function.

[PATCH v3 16/18] crypto: rsa-psspad: Implement signature verify callback

2021-04-20 Thread Varad Gautam
: Varad Gautam --- crypto/rsa-psspad.c | 114 +++- 1 file changed, 113 insertions(+), 1 deletion(-) diff --git a/crypto/rsa-psspad.c b/crypto/rsa-psspad.c index 4e8525d89172d..c6f8fb43cb01e 100644 --- a/crypto/rsa-psspad.c +++ b/crypto/rsa-psspad.c @@ -8,6 +8,7

[PATCH v3 14/18] crypto: Implement MGF1 Mask Generation Function for RSASSA-PSS

2021-04-20 Thread Varad Gautam
signing/verification process with encoding RSASSA-PSS. Reference: https://tools.ietf.org/html/rfc8017#appendix-B.2.1 Signed-off-by: Varad Gautam --- crypto/rsa-psspad.c | 54 + 1 file changed, 54 insertions(+) diff --git a/crypto/rsa-psspad.c b/crypt

[PATCH v3 15/18] crypto: rsa-psspad: Provide PSS signature verify operation

2021-04-20 Thread Varad Gautam
Trigger RSA transform on the signature being verified from psspad_verify, to produce intermediary data which will be handled in the psspad_verify_complete callback. Reference: https://tools.ietf.org/html/rfc8017#section-8.1.2 Signed-off-by: Varad Gautam --- crypto/rsa-psspad.c | 53

[PATCH v3 13/18] crypto: rsa-psspad: Get signature parameters from a given signature

2021-04-20 Thread Varad Gautam
Implement akcipher_alg->set_sig_params for rsassa-psspad to receive the salt length and MGF hash function for the signature being verified. Signed-off-by: Varad Gautam --- crypto/rsa-psspad.c | 21 - include/crypto/internal/rsa-common.h | 2 ++ 2 fi

[PATCH v3 12/18] crypto: rsa-psspad: Introduce shash alloc/dealloc helpers

2021-04-20 Thread Varad Gautam
RSASSA-PSS verify operation needs to compute digests for its Mask Generation Function (MGF1), and for digest comparison. Add helpers to populate a crypto_shash and desc for use in both cases. Signed-off-by: Varad Gautam --- v3: Add psspad_check_hash_algo to only allow valid hash algorithms in

[PATCH v3 11/18] crypto: Scaffolding for RSA-PSS signature style

2021-04-20 Thread Varad Gautam
Add a crypto_template for rsa-psspad, hidden behind CONFIG_CRYPTO_RSASSA_PSS. Set the sign/verify/encrypt/decrypt operations to return -EOPNOTSUPP, to be implemented in the future Signed-off-by: Varad Gautam --- crypto/Kconfig| 6 ++ crypto/Makefile | 1

[PATCH v3 10/18] crypto: rsa: Move struct rsa_mpi_key definition to rsa.h

2021-04-20 Thread Varad Gautam
definition to rsa.h to help RSA sub-implementations query the MPI values. Signed-off-by: Varad Gautam --- crypto/rsa.c | 6 -- include/crypto/internal/rsa.h | 7 +++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/crypto/rsa.c b/crypto/rsa.c index 4cdbec95d0779

[PATCH v3 09/18] crypto: Extend akcipher API to pass signature parameters

2021-04-20 Thread Varad Gautam
For certain signature encoding schemes (eg. RSASSA-PSS), the verify/sign operation behavior depends on information contained in the signature blob. Allow passing this down to the crypto_template by introducing a crypto_akcipher_set_sig_params() call. Signed-off-by: Varad Gautam --- crypto/rsa

[PATCH v3 08/18] crypto: rsa: Move rsapad_akcipher_setup_child and callback to rsa-common

2021-04-20 Thread Varad Gautam
Pull out more common code from rsa-pkcs1pad into rsa-common. Signed-off-by: Varad Gautam --- crypto/rsa-common.c | 31 +++ crypto/rsa-pkcs1pad.c| 32 include/crypto/internal/rsa-common.h | 9 3 files

[PATCH v3 07/18] crypto: rsa: Move more common code to rsa-common

2021-04-20 Thread Varad Gautam
Move helpers for setting public/private keys, RSA akcipher instance setup, keysize querying etc. to rsa-common.c. Signed-off-by: Varad Gautam --- crypto/rsa-common.c | 183 +++ crypto/rsa-pkcs1pad.c| 183

[PATCH v3 06/18] crypto: rsa: Start moving RSA common code to rsa-common

2021-04-20 Thread Varad Gautam
Move out helpers from rsa-pkcs1pad.c which will be shared across rsa-*pad implementations. Signed-off-by: Varad Gautam --- crypto/Makefile | 1 + crypto/rsa-common.c | 76 ++ crypto/rsa-pkcs1pad.c| 97

[PATCH v3 05/18] crypto: rsa-pkcs1pad: Rename pkcs1pad_* structs to rsapad_*

2021-04-20 Thread Varad Gautam
Use generic naming to share with other padding scheme implementations. These will be moved out of rsa-pkcs1pad.c. Signed-off-by: Varad Gautam --- crypto/rsa-pkcs1pad.c | 62 +-- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/crypto/rsa

[PATCH v3 04/18] crypto: rsa-pkcs1pad: Pull out child req processing code into helpers

2021-04-20 Thread Varad Gautam
pkcs1pad operations to use these. Signed-off-by: Varad Gautam --- crypto/rsa-pkcs1pad.c | 106 +++--- 1 file changed, 49 insertions(+), 57 deletions(-) diff --git a/crypto/rsa-pkcs1pad.c b/crypto/rsa-pkcs1pad.c index 849573f6b44b3..6329c79316d24 100644 --- a/crypto

[PATCH v3 02/18] crypto: rsa-pkcs1pad: Rename pkcs1pad-specific functions to rsapad

2021-04-20 Thread Varad Gautam
The existing RSA implementation supports PKCSv1.5 style signature paddings via rsa-pkcs1pad. A lot of the functionality implemented for rsa-pkcs1pad can be reused across other RSA padding schemes. Rename such functions as rsapad_* before moving them out of rsa-pkcs1pad.c. Signed-off-by: Varad

[PATCH v3 03/18] crypto: rsa-pkcs1pad: Extract pkcs1pad_create into a generic helper

2021-04-20 Thread Varad Gautam
which can be reused by other signature padding schemes as rsapad_akcipher_create. This will be moved out of rsa-pkcs1pad.c to be used across rsa-*pad implementations. Signed-off-by: Varad Gautam --- crypto/rsa-pkcs1pad.c | 48 ++- 1 file changed, 34

[PATCH v3 00/18] Implement RSASSA-PSS signature verification

2021-04-20 Thread Varad Gautam
ital-signatures#rsavs [5] https://github.com/varadgautam/keyctl-rsa-tests Varad Gautam (18): X.509: Parse RSASSA-PSS style certificates crypto: rsa-pkcs1pad: Rename pkcs1pad-specific functions to rsapad crypto: rsa-pkcs1pad: Extract pkcs1pad_create into a generic helper crypto: rsa-pkcs1pad

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

2021-04-20 Thread Varad Gautam
-off-by: Varad Gautam --- crypto/asymmetric_keys/Makefile | 5 +- crypto/asymmetric_keys/x509_cert_parser.c | 148 ++ crypto/asymmetric_keys/x509_rsassa.asn1 | 17 +++ include/crypto/public_key.h | 4 + include/linux/oid_registry.h

Re: [PATCH 2/4] PKCS#7: Check codeSigning EKU for kernel module and kexec pe verification

2021-04-15 Thread Varad Gautam
Hi Joey, On 4/9/21 4:46 AM, Lee, Chun-Yi wrote: > This patch adds the logic for checking the CodeSigning extended > key usage when verifying signature of kernel module or > kexec PE binary in PKCS#7. > > Signed-off-by: "Lee, Chun-Yi" > --- > certs/system_keyring.c | 2 +- > crypt

Re: [PATCH 1/4] X.509: Add CodeSigning extended key usage parsing

2021-04-13 Thread Varad Gautam
Hi, On 3/9/21 10:10 AM, Lee, Chun-Yi wrote: > This patch adds the logic for parsing the CodeSign extended key usage > extension in X.509. The parsing result will be set to the eku flag > which is carried by public key. It can be used in the PKCS#7 > verification. > > Signed-off-by: "Lee, Chun-Yi"

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

2021-04-08 Thread Varad Gautam
On 4/8/21 4:29 AM, hongbo li wrote: > Hi Varad, > > Varad Gautam mailto:varad.gau...@suse.com>> > 于2021年4月8日周四 上午5:20写道: >> >> Hi Hongbo, >> >> On 4/7/21 10:27 AM, hongbo li wrote: >> > Hello Varad, >> > >> > I also made a

[PATCH v2 17/18] crypto: Accept pss as valid encoding during signature verification

2021-04-08 Thread Varad Gautam
Accept pss encoding for public_key_verify_signature. If CONFIG_CRYPTO_RSASSA_PSS is disabled, crypto_alloc_akcipher will fail to find a pss backend anyway. Signed-off-by: Varad Gautam Acked-by: Jarkko Sakkinen --- crypto/asymmetric_keys/public_key.c | 18 +- 1 file changed, 13

[PATCH v2 18/18] keyctl_pkey: Add pkey parameters slen and mgfhash for PSS

2021-04-08 Thread Varad Gautam
sed for MGF. Signed-off-by: Varad Gautam CC: Jarkko Sakkinen --- v2: Accept 'mgfhash' as a parameter. v1 assumed this to be the same as the digest hash. crypto/asymmetric_keys/asymmetric_type.c | 2 ++ include/linux/keyctl.h | 2 ++ security/keys/k

[PATCH v2 14/18] crypto: Implement MGF1 Mask Generation Function for RSASSA-PSS

2021-04-08 Thread Varad Gautam
signing/verification process with encoding RSASSA-PSS. Reference: https://tools.ietf.org/html/rfc8017#appendix-B.2.1 Signed-off-by: Varad Gautam --- crypto/rsa-psspad.c | 54 + 1 file changed, 54 insertions(+) diff --git a/crypto/rsa-psspad.c b/crypt

[PATCH v2 15/18] crypto: rsa-psspad: Provide PSS signature verify operation

2021-04-08 Thread Varad Gautam
Trigger RSA transform on the signature being verified from psspad_verify, to produce intermediary data which will be handled in the psspad_verify_complete callback. Reference: https://tools.ietf.org/html/rfc8017#section-8.1.2 Signed-off-by: Varad Gautam --- crypto/rsa-psspad.c | 53

[PATCH v2 12/18] crypto: rsa-psspad: Introduce shash alloc/dealloc helpers

2021-04-08 Thread Varad Gautam
RSASSA-PSS verify operation needs to compute digests for its Mask Generation Function (MGF1), and for digest comparison. Add helpers to populate a crypto_shash and desc for use in both cases. Signed-off-by: Varad Gautam --- crypto/rsa-psspad.c | 24 1 file changed, 24

[PATCH v2 13/18] crypto: rsa-psspad: Get signature parameters from a given signature

2021-04-08 Thread Varad Gautam
Implement akcipher_alg->set_sig_params for rsassa-psspad to receive the salt length and MGF hash function for the signature being verified. Signed-off-by: Varad Gautam --- v2: Set mgf_hash_algo in psspad_set_sig_params. v1 assumed this to be the same as the digest hash. crypto/rsa-psspa

[PATCH v2 16/18] crypto: rsa-psspad: Implement signature verify callback

2021-04-08 Thread Varad Gautam
: Varad Gautam --- v2: Allow mgf_hash_algo to be different from digest hash algorithm. crypto/rsa-psspad.c | 114 +++- 1 file changed, 113 insertions(+), 1 deletion(-) diff --git a/crypto/rsa-psspad.c b/crypto/rsa-psspad.c index 4ba4d69f6ce17..87e90479a4fa7

[PATCH v2 11/18] crypto: Scaffolding for RSA-PSS signature style

2021-04-08 Thread Varad Gautam
Add a crypto_template for rsa-psspad, hidden behind CONFIG_CRYPTO_RSASSA_PSS. Set the sign/verify/encrypt/decrypt operations to return -EOPNOTSUPP, to be implemented in the future Signed-off-by: Varad Gautam --- crypto/Kconfig| 6 ++ crypto/Makefile | 1

[PATCH v2 10/18] crypto: rsa: Move struct rsa_mpi_key definition to rsa.h

2021-04-08 Thread Varad Gautam
definition to rsa.h to help RSA sub-implementations query the MPI values. Signed-off-by: Varad Gautam --- crypto/rsa.c | 6 -- include/crypto/internal/rsa.h | 7 +++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/crypto/rsa.c b/crypto/rsa.c index 4cdbec95d0779

[PATCH v2 09/18] crypto: Extend akcipher API to pass signature parameters

2021-04-08 Thread Varad Gautam
For certain signature encoding schemes (eg. RSASSA-PSS), the verify/sign operation behavior depends on information contained in the signature blob. Allow passing this down to the crypto_template by introducing a crypto_akcipher_set_sig_params() call. Signed-off-by: Varad Gautam --- crypto/rsa

[PATCH v2 07/18] crypto: rsa: Move more common code to rsa-common

2021-04-08 Thread Varad Gautam
Move helpers for setting public/private keys, RSA akcipher instance setup, keysize querying etc. to rsa-common.c. Signed-off-by: Varad Gautam --- crypto/rsa-common.c | 183 +++ crypto/rsa-pkcs1pad.c| 183

[PATCH v2 08/18] crypto: rsa: Move rsapad_akcipher_setup_child and callback to rsa-common

2021-04-08 Thread Varad Gautam
Pull out more common code from rsa-pkcs1pad into rsa-common. Signed-off-by: Varad Gautam --- crypto/rsa-common.c | 31 +++ crypto/rsa-pkcs1pad.c| 32 include/crypto/internal/rsa-common.h | 9 3 files

[PATCH v2 05/18] crypto: rsa-pkcs1pad: Rename pkcs1pad_* structs to rsapad_*

2021-04-08 Thread Varad Gautam
Use generic naming to share with other padding scheme implementations. These will be moved out of rsa-pkcs1pad.c. Signed-off-by: Varad Gautam --- crypto/rsa-pkcs1pad.c | 62 +-- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/crypto/rsa

[PATCH v2 06/18] crypto: rsa: Start moving RSA common code to rsa-common

2021-04-08 Thread Varad Gautam
Move out helpers from rsa-pkcs1pad.c which will be shared across rsa-*pad implementations. Signed-off-by: Varad Gautam --- crypto/Makefile | 1 + crypto/rsa-common.c | 76 ++ crypto/rsa-pkcs1pad.c| 97

[PATCH v2 04/18] crypto: rsa-pkcs1pad: Pull out child req processing code into helpers

2021-04-08 Thread Varad Gautam
pkcs1pad operations to use these. Signed-off-by: Varad Gautam --- crypto/rsa-pkcs1pad.c | 106 +++--- 1 file changed, 49 insertions(+), 57 deletions(-) diff --git a/crypto/rsa-pkcs1pad.c b/crypto/rsa-pkcs1pad.c index 849573f6b44b3..6329c79316d24 100644 --- a/crypto

[PATCH v2 02/18] crypto: rsa-pkcs1pad: Rename pkcs1pad-specific functions to rsapad

2021-04-08 Thread Varad Gautam
The existing RSA implementation supports PKCSv1.5 style signature paddings via rsa-pkcs1pad. A lot of the functionality implemented for rsa-pkcs1pad can be reused across other RSA padding schemes. Rename such functions as rsapad_* before moving them out of rsa-pkcs1pad.c. Signed-off-by: Varad

[PATCH v2 03/18] crypto: rsa-pkcs1pad: Extract pkcs1pad_create into a generic helper

2021-04-08 Thread Varad Gautam
which can be reused by other signature padding schemes as rsapad_akcipher_create. This will be moved out of rsa-pkcs1pad.c to be used across rsa-*pad implementations. Signed-off-by: Varad Gautam --- crypto/rsa-pkcs1pad.c | 48 ++- 1 file changed, 34

[PATCH v2 00/18] Implement RSASSA-PSS signature verification

2021-04-08 Thread Varad Gautam
[7] https://github.com/varadgautam/kernel/tree/rsassa-psspad Varad Gautam (18): X.509: Parse RSASSA-PSS style certificates crypto: rsa-pkcs1pad: Rename pkcs1pad-specific functions to rsapad crypto: rsa-pkcs1pad: Extract pkcs1pad_create into a generic helper crypto: rsa-pkcs1pad: Pull out

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

2021-04-08 Thread Varad Gautam
-off-by: Varad Gautam --- v2: Remove check to reject certificates with differing mgf hash and digest hash algorithms from x509_note_pkey_algo. crypto/asymmetric_keys/Makefile | 5 +- crypto/asymmetric_keys/x509_cert_parser.c | 148 ++ crypto/asymmetric_keys

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

2021-04-07 Thread Varad Gautam
.@gmail.com/ [3] https://patchwork.kernel.org/project/linux-crypto/patch/20210330202829.4825-2-varad.gau...@suse.com/ [4] https://patchwork.kernel.org/project/linux-crypto/patch/1617802906-30513-4-git-send-email-herbert.tenc...@gmail.com/ Regards, Varad > Best regards > > Hongbo > > Va

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

2021-04-01 Thread Varad Gautam
On 4/1/21 3:09 AM, Herbert Xu wrote: > On Tue, Mar 30, 2021 at 10:28:12PM +0200, Varad Gautam wrote: >> An X.509 wrapper for a RSASSA-PSS signature contains additional >> signature parameters over the PKCSv.15 encoding scheme. Extend the >> x509 parser to allow parsi

[PATCH 00/18] Implement RSASSA-PSS signature verification

2021-04-01 Thread Varad Gautam
1 [2] https://github.com/varadgautam/kernel/tree/rsassa-psspad [3] https://github.com/google/wycheproof/blob/master/testvectors/ [4] https://csrc.nist.gov/projects/cryptographic-algorithm-validation-program/digital-signatures#rsavs [5] https://github.com/varadgautam/keyctl-rsa-tests Varad G

[PATCH 15/18] crypto: rsa-psspad: Provide PSS signature verify operation

2021-03-30 Thread Varad Gautam
Trigger RSA transform on the signature being verified from psspad_verify, to produce intermediary data which will be handled in the psspad_verify_complete callback. Reference: https://tools.ietf.org/html/rfc8017#section-8.1.2 Signed-off-by: Varad Gautam --- crypto/rsa-psspad.c | 53

[PATCH 18/18] keyctl_pkey: Add pkey parameter slen to pass in PSS salt length

2021-03-30 Thread Varad Gautam
keyctl pkey_* operations accept enc and hash parameters at present. RSASSA-PSS signatures also require passing in the signature salt length. Add another parameter 'slen' to feed in salt length of a PSS signature. Signed-off-by: Varad Gautam --- crypto/asymmetric_keys/asymmetric_

[PATCH 14/18] crypto: Implement MGF1 Mask Generation Function for RSASSA-PSS

2021-03-30 Thread Varad Gautam
signing/verification process with encoding RSASSA-PSS. Reference: https://tools.ietf.org/html/rfc8017#appendix-B.2.1 Signed-off-by: Varad Gautam --- crypto/rsa-psspad.c | 54 + 1 file changed, 54 insertions(+) diff --git a/crypto/rsa-psspad.c b/crypt

[PATCH 16/18] crypto: rsa-psspad: Implement signature verify callback

2021-03-30 Thread Varad Gautam
: Varad Gautam --- crypto/rsa-psspad.c | 107 +++- 1 file changed, 106 insertions(+), 1 deletion(-) diff --git a/crypto/rsa-psspad.c b/crypto/rsa-psspad.c index 1ca17b8b93f2..2ce750c5a23f 100644 --- a/crypto/rsa-psspad.c +++ b/crypto/rsa-psspad.c @@ -8,6 +8,7

[PATCH 17/18] crypto: Accept pss as valid encoding during signature verification

2021-03-30 Thread Varad Gautam
Accept pss encoding for public_key_verify_signature. If CONFIG_CRYPTO_RSASSA_PSS is disabled, crypto_alloc_akcipher will fail to find a pss backend anyway. Signed-off-by: Varad Gautam --- crypto/asymmetric_keys/public_key.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions

[PATCH 04/18] crypto: rsa-pkcs1pad: Pull out child req processing code into helpers

2021-03-30 Thread Varad Gautam
pkcs1pad operations to use these. Signed-off-by: Varad Gautam --- crypto/rsa-pkcs1pad.c | 106 +++--- 1 file changed, 49 insertions(+), 57 deletions(-) diff --git a/crypto/rsa-pkcs1pad.c b/crypto/rsa-pkcs1pad.c index 849573f6b44b..6329c79316d2 100644 --- a/crypto/rsa

[PATCH 11/18] crypto: Scaffolding for RSA-PSS signature style

2021-03-30 Thread Varad Gautam
Add a crypto_template for rsa-psspad, hidden behind CONFIG_CRYPTO_RSASSA_PSS. Set the sign/verify/encrypt/decrypt operations to return -EOPNOTSUPP, to be implemented in the future Signed-off-by: Varad Gautam --- crypto/Kconfig| 6 ++ crypto/Makefile | 1

[PATCH 03/18] crypto: rsa-pkcs1pad: Extract pkcs1pad_create into a generic helper

2021-03-30 Thread Varad Gautam
which can be reused by other signature padding schemes as rsapad_akcipher_create. This will be moved out of rsa-pkcs1pad.c to be used across rsa-*pad implementations. Signed-off-by: Varad Gautam --- crypto/rsa-pkcs1pad.c | 48 ++- 1 file changed, 34

[PATCH 10/18] crypto: rsa: Move struct rsa_mpi_key definition to rsa.h

2021-03-30 Thread Varad Gautam
definition to rsa.h to help RSA sub-implementations query the MPI values. Signed-off-by: Varad Gautam --- crypto/rsa.c | 6 -- include/crypto/internal/rsa.h | 7 +++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/crypto/rsa.c b/crypto/rsa.c index 4cdbec95d077

[PATCH 07/18] crypto: rsa: Move more common code to rsa-common

2021-03-30 Thread Varad Gautam
Move helpers for setting public/private keys, RSA akcipher instance setup, keysize querying etc. to rsa-common.c. Signed-off-by: Varad Gautam --- crypto/rsa-common.c | 183 +++ crypto/rsa-pkcs1pad.c| 183

[PATCH 09/18] crypto: Extend akcipher API to pass signature parameters

2021-03-30 Thread Varad Gautam
For certain signature encoding schemes (eg. RSASSA-PSS), the verify/sign operation behavior depends on information contained in the signature blob. Allow passing this down to the crypto_template by introducing a crypto_akcipher_set_sig_params() call. Signed-off-by: Varad Gautam --- crypto/rsa

[PATCH 13/18] crypto: rsa-psspad: Get signature salt length from a given signature

2021-03-30 Thread Varad Gautam
Implement akcipher_alg->set_sig_params for rsassa-psspad to receive the salt length for the signature being verified. Signed-off-by: Varad Gautam --- crypto/rsa-psspad.c | 20 +++- include/crypto/internal/rsa-common.h | 1 + 2 files changed, 20 insertions(+)

[PATCH 12/18] crypto: rsa-psspad: Introduce shash alloc/dealloc helpers

2021-03-30 Thread Varad Gautam
RSASSA-PSS verify operation needs to compute digests for its Mask Generation Function (MGF1), and for digest comparison. Add helpers to populate a crypto_shash and desc for use in both cases. Signed-off-by: Varad Gautam --- crypto/rsa-psspad.c | 24 1 file changed, 24

[PATCH 06/18] crypto: rsa: Start moving RSA common code to rsa-common

2021-03-30 Thread Varad Gautam
Move out helpers from rsa-pkcs1pad.c which will be shared across rsa-*pad implementations. Signed-off-by: Varad Gautam --- crypto/Makefile | 1 + crypto/rsa-common.c | 76 ++ crypto/rsa-pkcs1pad.c| 97

[PATCH 08/18] crypto: rsa: Move rsapad_akcipher_setup_child and callback to rsa-common

2021-03-30 Thread Varad Gautam
Pull out more common code from rsa-pkcs1pad into rsa-common. Signed-off-by: Varad Gautam --- crypto/rsa-common.c | 31 +++ crypto/rsa-pkcs1pad.c| 32 include/crypto/internal/rsa-common.h | 9 3 files

[PATCH 05/18] crypto: rsa-pkcs1pad: Rename pkcs1pad_* structs to rsapad_*

2021-03-30 Thread Varad Gautam
Use generic naming to share with other padding scheme implementations. These will be moved out of rsa-pkcs1pad.c. Signed-off-by: Varad Gautam --- crypto/rsa-pkcs1pad.c | 62 +-- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/crypto/rsa

[PATCH 02/18] crypto: rsa-pkcs1pad: Rename pkcs1pad-specific functions to rsapad

2021-03-30 Thread Varad Gautam
The existing RSA implementation supports PKCSv1.5 style signature paddings via rsa-pkcs1pad. A lot of the functionality implemented for rsa-pkcs1pad can be reused across other RSA padding schemes. Rename such functions as rsapad_* before moving them out of rsa-pkcs1pad.c. Signed-off-by: Varad

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

2021-03-30 Thread Varad Gautam
different from the hash function used for signature generation, although this is allowed in RFC8017. References: https://tools.ietf.org/html/rfc8017#appendix-C Signed-off-by: Varad Gautam --- crypto/asymmetric_keys/Makefile | 5 +- crypto/asymmetric_keys/x509_cert_parser.c | 152

RE: throuble installing kernel

2013-09-22 Thread Varad Gautam
> What I'm doing wrong? I want it to use my .config, I don't want to > answer all the thousands questions it prompts me (I don't know all the > options to know what should go and what should not, hence I want it to > use my current configuration). Hi! If you want to use the existing .config file,