Lines Matching refs:key
301 static struct key *request_user_key(const char *master_desc, const u8 **master_key, in request_user_key()
305 struct key *ukey; in request_user_key()
326 static int calc_hmac(u8 *digest, const u8 *key, unsigned int keylen, in calc_hmac() argument
339 err = crypto_shash_setkey(tfm, key, keylen); in calc_hmac()
377 static struct skcipher_request *init_skcipher_req(const u8 *key, in init_skcipher_req() argument
391 ret = crypto_skcipher_setkey(tfm, key, key_len); in init_skcipher_req()
410 static struct key *request_master_key(struct encrypted_key_payload *epayload, in request_master_key()
413 struct key *mkey = ERR_PTR(-EINVAL); in request_master_key()
595 static struct encrypted_key_payload *encrypted_key_alloc(struct key *key, in encrypted_key_alloc() argument
639 ret = key_payload_reserve(key, payload_datalen + datablob_len in encrypted_key_alloc()
658 struct key *mkey; in encrypted_key_decrypt()
781 static int encrypted_instantiate(struct key *key, in encrypted_instantiate() argument
806 epayload = encrypted_key_alloc(key, format, master_desc, in encrypted_instantiate()
812 ret = encrypted_init(epayload, key->description, format, master_desc, in encrypted_instantiate()
819 rcu_assign_keypointer(key, epayload); in encrypted_instantiate()
842 static int encrypted_update(struct key *key, struct key_preparsed_payload *prep) in encrypted_update() argument
844 struct encrypted_key_payload *epayload = key->payload.data[0]; in encrypted_update()
852 if (key_is_negative(key)) in encrypted_update()
871 new_epayload = encrypted_key_alloc(key, epayload->format, in encrypted_update()
885 rcu_assign_keypointer(key, new_epayload); in encrypted_update()
900 static long encrypted_read(const struct key *key, char *buffer, in encrypted_read() argument
904 struct key *mkey; in encrypted_read()
912 epayload = dereference_key_locked(key); in encrypted_read()
962 static void encrypted_destroy(struct key *key) in encrypted_destroy() argument
964 kfree_sensitive(key->payload.data[0]); in encrypted_destroy()