Re: creating RSA structure when Private key(E,D,N) known

2010-11-26 Thread Dr. Stephen Henson
On Thu, Nov 25, 2010, Chir wrote:

 
 Hi guys,
 
 i want to create a RSA structure to pass this to RSA_private_decrypt(). I am
 not generating keys i am getting keys from second party. i have got N, D, E
 but i dnt know how to generate p, q required to fill the RSA structure.
 Please help.
 

There is an algorithm to create the other parameters just given (n, d, e) see
for example:


http://groups.google.com/group/sci.crypt/browse_frm/thread/d228e099f78164e3?hl=enlr=lang_ensafe=offrnum=5prev=/groups?hl%3Den%26lr%3Dlang_en%26safe%3Doff%26q%3Dcrt%2Bcomponents%2Brsa%26btnG%3DSearchpli=1

Steve.
--
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org


Re: creating RSA structure when Private key(E,D,N) known

2010-11-26 Thread Mounir IDRASSI

Hi,

I have developed a while ago a tool that uses OpenSSL in order to 
perform such conversions (between SFM format and CRT format).
I have put it under SourceForge (source and binary): 
http://rsaconverter.sourceforge.net/


The binary is for Windows but the sources (librsaconverter.c and 
librsaconverter.h) are portable and they provide two functions : 
SfmToCrt and CrtToSfm. In your case, you will use the function SfmToCrt 
in order to compute p,q,dp,dq and u.
The mathematics behind are explained on the PDF linked on the project 
page (idea based on Miller factoring algorithm as described on his 1976 
paper).


By the way, is this kind of functionality interesting enough to be 
integrated into OpenSSL code?


I hope this will help.
Cheers,
--
Mounir IDRASSI
IDRIX
http://www.idrix.fr



On 11/25/2010 1:32 PM, Chir wrote:

Hi guys,

i want to create a RSA structure to pass this to RSA_private_decrypt(). I am
not generating keys i am getting keys from second party. i have got N, D, E
but i dnt know how to generate p, q required to fill the RSA structure.
Please help.

Thanks
Chir


__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org