Lines Matching refs:pkey

68 				    const struct public_key *pkey,  in software_key_determine_akcipher()  argument
81 pkey->pkey_algo); in software_key_determine_akcipher()
85 pkey->pkey_algo, hash_algo); in software_key_determine_akcipher()
91 strcpy(alg_name, pkey->pkey_algo); in software_key_determine_akcipher()
111 struct public_key *pkey = params->key->payload.data[asym_crypto]; in software_key_query() local
118 pkey, alg_name); in software_key_query()
127 key = kmalloc(pkey->keylen + sizeof(u32) * 2 + pkey->paramlen, in software_key_query()
131 memcpy(key, pkey->key, pkey->keylen); in software_key_query()
132 ptr = key + pkey->keylen; in software_key_query()
133 ptr = pkey_pack_u32(ptr, pkey->algo); in software_key_query()
134 ptr = pkey_pack_u32(ptr, pkey->paramlen); in software_key_query()
135 memcpy(ptr, pkey->params, pkey->paramlen); in software_key_query()
137 if (pkey->key_is_private) in software_key_query()
138 ret = crypto_akcipher_set_priv_key(tfm, key, pkey->keylen); in software_key_query()
140 ret = crypto_akcipher_set_pub_key(tfm, key, pkey->keylen); in software_key_query()
152 if (pkey->key_is_private) in software_key_query()
171 const struct public_key *pkey = params->key->payload.data[asym_crypto]; in software_key_eds_op() local
184 pkey, alg_name); in software_key_eds_op()
197 key = kmalloc(pkey->keylen + sizeof(u32) * 2 + pkey->paramlen, in software_key_eds_op()
202 memcpy(key, pkey->key, pkey->keylen); in software_key_eds_op()
203 ptr = key + pkey->keylen; in software_key_eds_op()
204 ptr = pkey_pack_u32(ptr, pkey->algo); in software_key_eds_op()
205 ptr = pkey_pack_u32(ptr, pkey->paramlen); in software_key_eds_op()
206 memcpy(ptr, pkey->params, pkey->paramlen); in software_key_eds_op()
208 if (pkey->key_is_private) in software_key_eds_op()
209 ret = crypto_akcipher_set_priv_key(tfm, key, pkey->keylen); in software_key_eds_op()
211 ret = crypto_akcipher_set_pub_key(tfm, key, pkey->keylen); in software_key_eds_op()
311 int public_key_verify_signature(const struct public_key *pkey, in public_key_verify_signature() argument
324 BUG_ON(!pkey); in public_key_verify_signature()
330 pkey, alg_name); in public_key_verify_signature()
343 key = kmalloc(pkey->keylen + sizeof(u32) * 2 + pkey->paramlen, in public_key_verify_signature()
348 memcpy(key, pkey->key, pkey->keylen); in public_key_verify_signature()
349 ptr = key + pkey->keylen; in public_key_verify_signature()
350 ptr = pkey_pack_u32(ptr, pkey->algo); in public_key_verify_signature()
351 ptr = pkey_pack_u32(ptr, pkey->paramlen); in public_key_verify_signature()
352 memcpy(ptr, pkey->params, pkey->paramlen); in public_key_verify_signature()
354 if (pkey->key_is_private) in public_key_verify_signature()
355 ret = crypto_akcipher_set_priv_key(tfm, key, pkey->keylen); in public_key_verify_signature()
357 ret = crypto_akcipher_set_pub_key(tfm, key, pkey->keylen); in public_key_verify_signature()