Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Dec 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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 ?

  • #2
    New to the CF scene
    Join Date
    Dec 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •