Monday, 7 September 2020

Need some advice on how to hanlde really large numbers

Hi everyone, i've been tasked with manually coding the (textbook) RSA solution and i chose node because i've been having fun with it lately. Its almost done, it encrypts the text correctly but when it comes to decrypting i've encountered an issue that i can seem to find a solution to on stack overflow or other sites, as you know RSA uses this equation to decrypt the cipher text "c^d mod n", c being the cipher text, d being the private key and n being a part of the public key, right when i try to elevate c to the power of d the result immediately comes as Infinity and well the whole equation goes to hell.I already tried using BigInt without luck, i really hope you guys can point me to the right direction with this.Thanks in advance.

Submitted September 07, 2020 at 09:19PM by rogwf259

No comments:

Post a Comment