Cromon what exactly is the problem with decrypting ? from what I see algorythm is simple square and multiply ? aren't p and q those prime numbers , for that other i believe there is a code that calculates that faster and its present in some libs...? can you post example