Changed the keygen to support exponent passing, removed password parameter.