Added ability to retrieve pubkey in both formats