On 8/06/2014 8:18 PM, Mounir IDRASSI wrote: > On 6/8/2014 1:46 AM, Jeffrey Walton wrote: >> OK, does the library provide the CRT solver (I don't believe so, but I >> thought I would ask). > Few years ago, I needed such solver to convert from RSA SFM format > (n,e,d) to CRT representation. Obviously OpenSSL doesn't contain one > so I implemented it using OpenSSL routines and I released an Open > Source tool called RsaConverter that provide such functionality > (http://rsaconverter.sourceforge.net/). > > You can have a look at the file librsaconverter.c from its source > (http://sourceforge.net/p/rsaconverter/code/HEAD/tree/Trunk/src/librsaconverter.c). > > In your case, you can use the function SfmToCrt in order to compute > the CRT parameters, thus making RSA_check_key happy. > > ... > > I don't if there are many people who need use RSA SFM parameters but > having such conversion functionality inside OpenSSL can be > interesting. In such case, I can send a patch for it.
A suggested patch contributed under the OpenSSL license (rather than the LGPL) would be interesting to look at. The timing based loop for if it is not a valid RSA key can be avoided (by checking) or by making it a callers requirement to check - rather than having a time out option check there - the 5 minute time out you have noted there does need adjusting. If you expect things to be able to take that long then a callback mechanism would be needed. Just performing the check would be a simpler solution I think ... Thanks, Tim. ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org