Key generation, encryption/decryption and signing