Yes, like that! If you’ve wanted 4096 bits, you would use RSA.newKeys(2048). Notice however that currently the multiplication algorithm is not optimal for these use cases, so you would have to add some task.wait() in the main module.
For E2EE chat implementation, how would I use the module’s verify function? I was thinking of showing the hash of the public key on the user and recipient’s end, if they are the same, it is verified.
The verify function currently compares two bigInts and verifies if both have equal quantity.
It is intended when starting a signing process, it usually works with the sender hashing the message, decrypting and sending it along with the original one. The reciever then decrypts the message, encrypt its hash and here’s where verify function is used.
How do I get around the Script timeout? Like you said, I can put task.wait(), but the whole purpose of my Roblox game is E2EE chat, so I’m not adding that and making it the fastest.
It seems like the live Roblox game client does not have a script timeout, but the client closes if it freezes for too long.
I have to use RSA for AES key exchange, how else am I supposed to pass the AES key??! Telling the player to give the AES key to the recipient using other communication methods???
You’d replace rsa with Elliptic Curve Diffie-Hellman. ECC provides the same security level with smaller key sizes (e.g., a 256-bit ECC key is comparable to a 3,072-bit RSA key)