admin管理员组

文章数量:1390453

I have some Java code that sends the public exponent and modulus (very, very long integer) via json to the javascript.

I need to apply RSA encryption on a text field (password) using these values in JavaScript.

I have tried many available things on net but no success yet. And I don't have SSL in the application.

Can someone please help me on this? Some sample/exact code will be a blessing.

I have some Java code that sends the public exponent and modulus (very, very long integer) via json to the javascript.

I need to apply RSA encryption on a text field (password) using these values in JavaScript.

I have tried many available things on net but no success yet. And I don't have SSL in the application.

Can someone please help me on this? Some sample/exact code will be a blessing.

Share Improve this question edited Oct 12, 2011 at 14:40 Riju Mahna asked Oct 12, 2011 at 14:33 Riju MahnaRiju Mahna 6,92613 gold badges58 silver badges94 bronze badges 3
  • I assumed you're talking about JavaScript, not Java. Note that they are not the same thing. – pimvdb Commented Oct 12, 2011 at 14:35
  • @pimvdb thanks. I edited the body also. I need encryption in javascript and I have the decryption in java. – Riju Mahna Commented Oct 12, 2011 at 14:41
  • Sorry, I misread. I thought you were using both for the same thing. You're pletely correct. – pimvdb Commented Oct 12, 2011 at 14:59
Add a ment  | 

1 Answer 1

Reset to default 7

Have you checked out http://code.google./p/jscryptolib/ ?

Alternatively there is another implementation here: http://www-cs-students.stanford.edu/~tjw/jsbn/

You can find a demo of the second implementation here: http://www-cs-students.stanford.edu/~tjw/jsbn/rsa.html - just view source to see how it's used

本文标签: RSA encryption in JavaScript with available modulusStack Overflow