Lines Matching refs:key
307 static struct key *request_user_key(const char *master_desc, const u8 **master_key, in request_user_key()
311 struct key *ukey; in request_user_key()
332 static int calc_hmac(u8 *digest, const u8 *key, unsigned int keylen, in calc_hmac() argument
345 err = crypto_shash_setkey(tfm, key, keylen); in calc_hmac()
383 static struct skcipher_request *init_skcipher_req(const u8 *key, in init_skcipher_req() argument
397 ret = crypto_skcipher_setkey(tfm, key, key_len); in init_skcipher_req()
416 static struct key *request_master_key(struct encrypted_key_payload *epayload, in request_master_key()
419 struct key *mkey = ERR_PTR(-EINVAL); in request_master_key()
601 static struct encrypted_key_payload *encrypted_key_alloc(struct key *key, in encrypted_key_alloc() argument
665 ret = key_payload_reserve(key, payload_datalen + datablob_len in encrypted_key_alloc()
684 struct key *mkey; in encrypted_key_decrypt()
813 static int encrypted_instantiate(struct key *key, in encrypted_instantiate() argument
839 epayload = encrypted_key_alloc(key, format, master_desc, in encrypted_instantiate()
845 ret = encrypted_init(epayload, key->description, format, master_desc, in encrypted_instantiate()
852 rcu_assign_keypointer(key, epayload); in encrypted_instantiate()
875 static int encrypted_update(struct key *key, struct key_preparsed_payload *prep) in encrypted_update() argument
877 struct encrypted_key_payload *epayload = key->payload.data[0]; in encrypted_update()
885 if (key_is_negative(key)) in encrypted_update()
904 new_epayload = encrypted_key_alloc(key, epayload->format, in encrypted_update()
918 rcu_assign_keypointer(key, new_epayload); in encrypted_update()
933 static long encrypted_read(const struct key *key, char *buffer, in encrypted_read() argument
937 struct key *mkey; in encrypted_read()
945 epayload = dereference_key_locked(key); in encrypted_read()
995 static void encrypted_destroy(struct key *key) in encrypted_destroy() argument
997 kfree_sensitive(key->payload.data[0]); in encrypted_destroy()