Lines Matching +full:buffer +full:- +full:size
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Diffie-Hellman secret to be used with kpp API along with helper functions
23 * struct dh - define a DH private key
26 * @p: Diffie-Hellman parameter P
27 * @g: Diffie-Hellman generator G
28 * @key_size: Size of the private DH key
29 * @p_size: Size of DH parameter P
30 * @g_size: Size of DH generator G
42 * crypto_dh_key_len() - Obtain the size of the private DH key
45 * This function returns the packet DH key size. A caller can use that
47 * memory size to hold a packet key.
49 * Return: size of the key in bytes
54 * crypto_dh_encode_key() - encode the private key
55 * @buf: Buffer allocated by the caller to hold the packet DH
56 * private key. The buffer should be at least crypto_dh_key_len
57 * bytes in size.
58 * @len: Length of the packet private key buffer
59 * @params: Buffer with the caller-specified private key
64 * Return: -EINVAL if buffer has insufficient size, 0 on success
69 * crypto_dh_decode_key() - decode a private key
70 * @buf: Buffer holding a packet key that should be decoded
71 * @len: Length of the packet private key buffer
72 * @params: Buffer allocated by the caller that is filled with the
78 * Return: -EINVAL if buffer has insufficient size, 0 on success
83 * __crypto_dh_decode_key() - decode a private key without parameter checks
84 * @buf: Buffer holding a packet key that should be decoded
85 * @len: Length of the packet private key buffer
86 * @params: Buffer allocated by the caller that is filled with the
93 * Return: -EINVAL if buffer has insufficient size, 0 on success