Re: RSA provider use example

2021-09-27 Thread Matt Caswell
On 24/09/2021 16:51, Antonio Santagiuliana wrote: Thank you for your reply. I'm still a bit confused though. In /providers/implementations/asymcipher/rsa_enc.c I find function rsa_decrypt() that calls RSA_private_decrypt(prsactx->rsa) I haven't found other implementation of this

Re: RSA provider use example

2021-09-24 Thread Antonio Santagiuliana
Thank you for your reply. I'm still a bit confused though. In /providers/implementations/asymcipher/rsa_enc.c I find function rsa_decrypt() that calls RSA_private_decrypt(prsactx->rsa) I haven't found other implementation of this RSA_private_decrypt() apart from the one in crypto/RSA/rsa_crypt.c ,

Re: RSA provider use example

2021-09-24 Thread Matt Caswell
On 24/09/2021 14:49, Antonio Santagiuliana wrote: Hello , thank you all for the replies. Very useful. I have seen in Openssl/crypto/RSA/rsa_local.h the definition of rsa_st has a pointer to RSA_METHOD and I can't see this filled in in any of the examples' set up or initializations, where is

Re: RSA provider use example

2021-09-24 Thread Antonio Santagiuliana
Hello , thank you all for the replies. Very useful. I have seen in Openssl/crypto/RSA/rsa_local.h the definition of rsa_st has a pointer to RSA_METHOD and I can't see this filled in in any of the examples' set up or initializations, where is it filled in for the default provider , for the RSA

Re: RSA provider use example

2021-09-24 Thread Matt Caswell
On 24/09/2021 12:17, Dr Paul Dale wrote: What about: apps/rsa.c, apps/rsautl.c and apps/genrsa.c 3.0 doesn't use the RSA structure in the non-deprecated public API. You probably want the EVP_PKEY_fromdata call. An example of building an RSA key from its constituent parts is available on

Re: RSA provider use example

2021-09-24 Thread Dr Paul Dale
On 24/9/21 9:15 pm, Angus Robertson - Magenta Systems Ltd wrote: I've been wondering if this is more efficient than getting the parameters one at a time using multiple EVP_PKEY_get_xx_param which also calls EVP_PKEY_get_params. I'd be surprised if there was a lot of difference. If I had to

Re: RSA provider use example

2021-09-24 Thread Matt Caswell
On 24/09/2021 11:55, Antonio Santagiuliana wrote: Hello Is there any app or command in the current Openssl master repository that initialises and uses the new RSA provider? I would like to see how the RSA* context parameter is filled in and used, but I can't find an example using the RSA

Re: RSA provider use example

2021-09-24 Thread Dr Paul Dale
What about: apps/rsa.c, apps/rsautl.c and apps/genrsa.c 3.0 doesn't use the RSA structure in the non-deprecated public API. You probably want the EVP_PKEY_fromdata call. Pauli On 24/9/21 8:55 pm, Antonio Santagiuliana wrote: Hello Is there any app or command in the current Openssl master

Re: RSA provider use example

2021-09-24 Thread Angus Robertson - Magenta Systems Ltd
> I would like to see how the RSA* context parameter is filled in > and used, but I can't find an example using the RSA provider. This is an example I just created by building a OSSL_PARAM array with OSSL_PARAM_construct_xx and calling EVP_PKEY_get_params. I've been wondering if this is more

RSA provider use example

2021-09-24 Thread Antonio Santagiuliana
Hello Is there any app or command in the current Openssl master repository that initialises and uses the new RSA provider? I would like to see how the RSA* context parameter is filled in and used, but I can't find an example using the RSA provider. Thank you