Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-14-2010, 06:27 PM   PM User | #1
anurupr
New to the CF scene

 
Join Date: Dec 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
anurupr is an unknown quantity at this point
RSA encryption function is not working

I've been working on RSA encryption using javascript and php for quite some time but i'm not able to do it properly. i'm using the standard RSA.js,BigInt.js and Barrett.js javascript files for the javascript part but the thing that i have noticed is the public exponent is always 10001 or 3 . only then the function works. but the problem is the php file generates a comparatively larger public key exponent. if i use that in the javascript function it crashes. is there anyway out of this ?
anurupr is offline   Reply With Quote
Old 12-19-2010, 07:08 AM   PM User | #2
bluesages
New to the CF scene

 
Join Date: Dec 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
bluesages is an unknown quantity at this point
10001 is hex for 65,537 and is a pretty common public key exponent, per this:

http://en.wikipedia.org/wiki/65537_%...9#Applications

Anyway, here's a demo of RSA encryption / decryption using PHP:

http://www.frostjedi.com/terra/dev/rsa/index.php

The source:

http://www.frostjedi.com/terra/dev/rsa/index.txt

It uses phpseclib, a pure PHP RSA implementation and a javascript biginteger library by a guy named Tom Wu.
bluesages is offline   Reply With Quote
Reply

Bookmarks

Tags
encryption, rsa

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:10 AM.


Advertisement
Log in to turn off these ads.