Lines Matching +full:output +full:- +full:specific
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Key-agreement Protocol Primitives (KPP)
24 * @dst_len: Size of the output buffer. It needs to be at least
41 * struct crypto_kpp - user-instantiated object which encapsulate
55 * struct kpp_alg - generic key-agreement protocol primitives
57 * @set_secret: Function invokes the protocol specific function to
61 * counterpart. In case of error, where output is not big
62 * enough req->dst_len will be updated to the size
66 * In case of error, where output is not big enough,
67 * req->dst_len will be updated to the size required
68 * @max_size: Function returns the size of the output buffer
92 * DOC: Generic Key-agreement Protocol Primitives API
99 * crypto_alloc_kpp() - allocate KPP tfm handle
116 return &tfm->base; in crypto_kpp_tfm()
131 return __crypto_kpp_alg(crypto_kpp_tfm(tfm)->__crt_alg); in crypto_kpp_alg()
136 return tfm->reqsize; in crypto_kpp_reqsize()
142 req->base.tfm = crypto_kpp_tfm(tfm); in kpp_request_set_tfm()
147 return __crypto_kpp_tfm(req->base.tfm); in crypto_kpp_reqtfm()
161 * crypto_free_kpp() - free KPP tfm handle
173 * kpp_request_alloc() - allocates kpp request
193 * kpp_request_free() - zeroize and free kpp request
203 * kpp_request_set_callback() - Sets an asynchronous callback.
218 req->base.complete = cmpl; in kpp_request_set_callback()
219 req->base.data = data; in kpp_request_set_callback()
220 req->base.flags = flgs; in kpp_request_set_callback()
224 * kpp_request_set_input() - Sets input buffer
236 req->src = input; in kpp_request_set_input()
237 req->src_len = input_len; in kpp_request_set_input()
241 * kpp_request_set_output() - Sets output buffer
246 * @output: ptr to output scatter list
247 * @output_len: size of the output scatter list
250 struct scatterlist *output, in kpp_request_set_output() argument
253 req->dst = output; in kpp_request_set_output()
254 req->dst_len = output_len; in kpp_request_set_output()
264 * struct kpp_secret - small header for packing secret buffer
276 * crypto_kpp_set_secret() - Invoke kpp operation
278 * Function invokes the specific kpp operation for a given alg.
293 return crypto_kpp_alg(tfm)->set_secret(tfm, buffer, len); in crypto_kpp_set_secret()
297 * crypto_kpp_generate_public_key() - Invoke kpp operation
299 * Function invokes the specific kpp operation for generating the public part
303 * The output of the requested length serves as the private key.
313 return crypto_kpp_alg(tfm)->generate_public_key(req); in crypto_kpp_generate_public_key()
317 * crypto_kpp_compute_shared_secret() - Invoke kpp operation
319 * Function invokes the specific kpp operation for computing the shared secret
330 return crypto_kpp_alg(tfm)->compute_shared_secret(req); in crypto_kpp_compute_shared_secret()
334 * crypto_kpp_maxsize() - Get len for output buffer
336 * Function returns the output buffer size required for a given key.
347 return alg->max_size(tfm); in crypto_kpp_maxsize()