Using private and public keys for asymmetric encryption and signing