Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\keys\dh.c Create Date:2022-07-28 18:27:09
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:keyctl_dh_compute_kdf

Proto:static int keyctl_dh_compute_kdf(struct kdf_sdesc *sdesc, char __user *buffer, size_t buflen, uint8_t *kbuf, size_t kbuflen, size_t lzero)

Type:int

Parameter:

TypeParameterName
struct kdf_sdesc *sdesc
char __user *buffer
size_tbuflen
uint8_t *kbuf
size_tkbuflen
size_tlzero
203  uint8_t * outbuf = NULL
205  outbuf_len = undup - round up to the next specified multiple*@x: the value to up*@y: multiple to round up to* Rounds @x up to next multiple of @y. If @y will always be a power* of 2, consider using the faster round_up().(buflen, rypto_shash_digestsize() - obtain message digest size*@tfm: cipher handle* The size for the message digest created by the message digest cipher* referenced with the cipher handle is returned.* Return: digest size of cipher)
208  outbuf = Allocation memory
209  If Not outbuf Then
210  ret = -ENOMEM
211  Go to err
214  ret = Implementation of the KDF in counter mode according to SP800-108 section 5
215  If ret Then Go to err
218  ret = buflen
219  If copy_to_user(buffer, outbuf, buflen) != 0 Then ret = -EFAULT
222  err :
223  kzfree - like kfree but zero memory*@p: object to free memory of* The memory of the object @p points to is zeroed before freed.* If @p is %NULL, kzfree() does nothing.* Note: this function zeroes the whole allocated buffer which can be a good
224  Return ret
Caller
NameDescribe
__keyctl_dh_compute