Add option to extract public key