added export method to PublicKey