Where should I even start >~< RSA is an asymmetric encryption algorithm Rounding error? Yes, there is (Probably) nothing wrong with my algorithm, but Scratch isn't a fan of calculating high numbers and kinda just guesses the solution. Try it with lower prime numbers or prime numbers at all, here is a site: http://compoasso.free.fr/primelistweb/page/prime/liste_online_en.php Just imagine, you're writing a letter to your grandma and back. But there is a plot twist when you're giving your letter to the post office to send it, everyone can see what you wrote your grandma. You don't want this of cause so you think about how to encrypt your message without anyone being able to read it. Sending a regular encryption key won't work, because... EVERYONE can see it and decrypt the message again. So you think hard and come up with a solution: You will send your grandma a key, that can only encrypt data and not decrypt it, the only one with the key to decrypt it is you. She encrypts a standard encryption key and sends it back to you. No one can read it because no one except you has the decryption key. And that's how you and your grandma exchanged keys without anyone knowing it.
I watched about 2 Mil tutorials, but I'm glad it's finally working! A great video for understanding the main principles of RSA is this: https://youtu.be/4zahvcJ9glg Wish you fun with my Public-private keygen test!