I do not know where to post it, so I'm starting here and hoping for the best I am I have a public and private key for networks. The keys (modulus, exponent, etc ...) are I sent the public key to a third party and they used it to encrypt passwords in a database. I've downloaded encrypted passwords and now I need to decrypt my end. This issue has come to be decrypted on a UNIX server. I do not care whether I use php, java or any other language until it works on unix box. I am completely rookie for the RSA keys and appreciate any help or even here I give instructions on where I should post this. Thanks in advance ....
Value appears to be 64 encoded. You can do something like this to load the public key and do something like this:
$ rsa-> loadKey (array ('modulus' = & gt; $ modulus,' exponent '= & Gt; $ exponent, CRYPT_RSA_PUBLIC_FORMAT_RAW);
For private key ... maybe you can do something like this ..
$ rsa = new Crypt_RSA (); $ RSA- & gt; Modules = $ modulus; $ Rsa- & gt; Public expient = $ exponent; $ RSA- & gt; Exponent = Array (1 = & gt; $ dp, $ dq) $ rsa- & gt; Coefficient = array (2 = & gt; $ inverseq); $ Rsa- & gt; Primes = array (1 = & gt; $ p, $ q);
Or something like that - I have not tested the code, but a cursory glance of the phpseclib code shows that will work.
Comments
Post a Comment