Lines Matching refs:pkey
65 const struct public_key *pkey, in software_key_determine_akcipher() argument
78 pkey->pkey_algo); in software_key_determine_akcipher()
82 pkey->pkey_algo, hash_algo); in software_key_determine_akcipher()
87 strcpy(alg_name, pkey->pkey_algo); in software_key_determine_akcipher()
107 struct public_key *pkey = params->key->payload.data[asym_crypto]; in software_key_query() local
114 pkey, alg_name); in software_key_query()
122 key = kmalloc(pkey->keylen + sizeof(u32) * 2 + pkey->paramlen, in software_key_query()
126 memcpy(key, pkey->key, pkey->keylen); in software_key_query()
127 ptr = key + pkey->keylen; in software_key_query()
128 ptr = pkey_pack_u32(ptr, pkey->algo); in software_key_query()
129 ptr = pkey_pack_u32(ptr, pkey->paramlen); in software_key_query()
130 memcpy(ptr, pkey->params, pkey->paramlen); in software_key_query()
132 if (pkey->key_is_private) in software_key_query()
133 ret = crypto_akcipher_set_priv_key(tfm, key, pkey->keylen); in software_key_query()
135 ret = crypto_akcipher_set_pub_key(tfm, key, pkey->keylen); in software_key_query()
147 if (pkey->key_is_private) in software_key_query()
166 const struct public_key *pkey = params->key->payload.data[asym_crypto]; in software_key_eds_op() local
179 pkey, alg_name); in software_key_eds_op()
191 key = kmalloc(pkey->keylen + sizeof(u32) * 2 + pkey->paramlen, in software_key_eds_op()
196 memcpy(key, pkey->key, pkey->keylen); in software_key_eds_op()
197 ptr = key + pkey->keylen; in software_key_eds_op()
198 ptr = pkey_pack_u32(ptr, pkey->algo); in software_key_eds_op()
199 ptr = pkey_pack_u32(ptr, pkey->paramlen); in software_key_eds_op()
200 memcpy(ptr, pkey->params, pkey->paramlen); in software_key_eds_op()
202 if (pkey->key_is_private) in software_key_eds_op()
203 ret = crypto_akcipher_set_priv_key(tfm, key, pkey->keylen); in software_key_eds_op()
205 ret = crypto_akcipher_set_pub_key(tfm, key, pkey->keylen); in software_key_eds_op()
250 int public_key_verify_signature(const struct public_key *pkey, in public_key_verify_signature() argument
263 BUG_ON(!pkey); in public_key_verify_signature()
269 pkey, alg_name); in public_key_verify_signature()
282 key = kmalloc(pkey->keylen + sizeof(u32) * 2 + pkey->paramlen, in public_key_verify_signature()
287 memcpy(key, pkey->key, pkey->keylen); in public_key_verify_signature()
288 ptr = key + pkey->keylen; in public_key_verify_signature()
289 ptr = pkey_pack_u32(ptr, pkey->algo); in public_key_verify_signature()
290 ptr = pkey_pack_u32(ptr, pkey->paramlen); in public_key_verify_signature()
291 memcpy(ptr, pkey->params, pkey->paramlen); in public_key_verify_signature()
293 if (pkey->key_is_private) in public_key_verify_signature()
294 ret = crypto_akcipher_set_priv_key(tfm, key, pkey->keylen); in public_key_verify_signature()
296 ret = crypto_akcipher_set_pub_key(tfm, key, pkey->keylen); in public_key_verify_signature()