Generating dh parameters multithreaded?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Generating dh parameters multithreaded?

Joseph Southwell
On any new install of our software we generate new dh parameters as follows…

DH *dh = DH_new();
!DH_generate_parameters_ex(dh, 2048, 2, NULL);
int codes = 0;
DH_check(dh, &codes);
DH_generate_key(dh);

It takes a long time. Is there some way to have it use all available cores instead of just the one?

--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|

Re: Generating dh parameters multithreaded?

OpenSSL - User mailing list
> It takes a long time. Is there some way to have it use all available cores instead of just the one?

You'll have to write the code to do that parallelism yourself.
--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|

Re: Generating dh parameters multithreaded?

Joseph Southwell
Are you suggesting that I should modify openssl myself to expose that functionality or are suggesting that there is a way to do that given the already exposed functionality? If it is the latter could you point me in the right direction?

> On Mar 15, 2017, at 2:21 PM, Salz, Rich via openssl-users <[hidden email]> wrote:
>
>> It takes a long time. Is there some way to have it use all available cores instead of just the one?
>
> You'll have to write the code to do that parallelism yourself.
> --
> openssl-users mailing list
> To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
>

--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|

Re: Generating dh parameters multithreaded?

OpenSSL - User mailing list
> Are you suggesting that I should modify openssl myself to expose that
> functionality or are suggesting that there is a way to do that given the already
> exposed functionality? If it is the latter could you point me in the right
> direction?

OpenSSL code does not do what you want.  You'll have to write it
--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|

Re: Generating dh parameters multithreaded?

Michael Wojcik
> From: openssl-users [mailto:[hidden email]] On Behalf
> Of Salz, Rich via openssl-users
> Sent: Wednesday, March 15, 2017 15:15
> To: Joseph Southwell; [hidden email]
> Subject: Re: [openssl-users] Generating dh parameters multithreaded?
>
> > Are you suggesting that I should modify openssl myself to expose that
> > functionality or are suggesting that there is a way to do that given the already
> > exposed functionality? If it is the latter could you point me in the right
> > direction?
>
> OpenSSL code does not do what you want.  You'll have to write it

My suggestion, if you were to take that route, would be to use the Engine interface rather than modifying the OpenSSL source. You could take the existing OpenSSL implementation of the functionality, move it into an engine (using one of the existing ones as a template), get that working, and then see about parallelizing it.

I created a modified version of the existing CAPI engine, and it wasn't particularly difficult. If memory serves, the OpenSSL wiki has some material on the subject too.

--
Michael Wojcik
Distinguished Engineer, Micro Focus


--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users