added support for getting public key from a private key.