Fully translated to Java. encrypts and decrypts successfully. Power of is using the square & multiply method. Decryption kinda slow.

JAVA IS AWESOME