added package and made publickey() public
changed scalarmult() and expmod() from recursive to iterative
made functions public/private
Use BigInteger.modPow() (factor of 10 faster)