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 ,

OpenSSL SSL_CTX_set_default_verify_paths Slow

2021-09-24 Thread Jay Foster
While migrating some applications from OpenSSL 1.0.2 (and 1.1.1) to 3.0.0, I have noticed that the SSL_CTX_set_default_verify_paths() function is much slower in 3.0.0.  In 1.0.0 it would take about 0.1 seconds and in 3.0.0 it takes over 3 seconds. strace indicates that the extra time is

query on PEM_write_bio_PKCS8PrivateKey

2021-09-24 Thread SIMON BABY
Hi Team, I have a query. I see the below API is used to write the private key in encrypted PKCS#8 format. *PEM_write_bio_PKCS8PrivateKey()* and *PEM_write_PKCS8PrivateKey()* write a private key in an EVP_PKEY structure in PKCS#8 EncryptedPrivateKeyInfo format using PKCS#5 v2.0 password based

Replacement for BIO_get_port(), BIO_get_host_ip()

2021-09-24 Thread Shivakumar Poojari
Hi BIO_get_port(), BIO_get_host_ip(), were deprecated in OpenSSL 1.1.0. Trying for replacement for OpenSSl 3.0 Gone through the below man page, but not found alternative function. https://www.openssl.org/docs/manmaster/man3/BIO_connect.html please suggest, Thanks, Shiva kumar Notice: This

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

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

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 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
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 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 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 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: Replacement for BIO_get_port(), BIO_get_host_ip()

2021-09-24 Thread Shivakumar Poojari
Gentle reminder. Thanks, Shiva Kumar From: Shivakumar Poojari Sent: Friday, September 24, 2021 11:35 AM To: openssl-users@openssl.org Cc: Paramashivaiah, Sunil ; Kumar Mishra, Sanjeev Subject: Replacement for BIO_get_port(), BIO_get_host_ip() Hi