Java implementation of monte carlo decryption.