key generation and revoking