Turbowarp is extremely recommended, this project (on scratch) eats resources faster than Santa eats cookies turbowarp.org/1365331880/ IF YOU WANT TO USE, READ THIS: 1) This project uses a probabilistic prime test to be so fast, this means there is a chance that a composite number will slip through. This chance depends on the counts argument in the "Is prime" function. The relationship is as follows: chance = 0.25^count 2) You can use the Z_Big functions for large arithmetic in scratch, though you should keep in mind the fact that almost all the functions use the same variables and there is a very significant chance you will get the wrong result because the same variable will be accessed from two different places The predicted times are on my hardware using turbowarp ------------------------------------------------------------------------- CREDITS: Thanks Gary L. Miller and Michael O. Rabin for inventing the miller-rabin primality test, Thanks this scratch wiki article for big int code that mostly worked: https://en.scratch-wiki.info/wiki/How_to_Use_Large_Numbers_in_Scratch Thanks me for debugging this code for 4 days and finding out I swapped the inputs inside the modulo code Feel free to use this anywhere you want, it is very helpful for cryptography. You should know that this implementation can be painfully slow for larger numbers. If you know how to improve this project, let me know. I'll be very thankful for any help.