函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\keys\dh.c Create Date:2022-07-27 20:01:25
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Implementation of the KDF in counter mode according to SP800-108 section 5

函数原型:static int kdf_ctr(struct kdf_sdesc *sdesc, const u8 *src, unsigned int slen, u8 *dst, unsigned int dlen, unsigned int zlen)

返回类型:int

参数:

类型参数名称
struct kdf_sdesc *sdesc
const u8 *src
unsigned intslen
u8 *dst
unsigned intdlen
unsigned intzlen
146  desc等于shash
147  h等于获得消息文摘大小
148  err等于0
149  dst_orig等于dst
150  counter等于cpu_to_be32(1)
152 dlen循环
153  err等于rypto_shash_init() - (re)initialize message digest*@desc: operational state handle that is already filled* The call (re-)initializes the message digest referenced by the* operational state handle. Any potentially existing state created by
154  如果err则转到:err
157  err等于rypto_shash_update() - add data to message digest for processing*@desc: operational state handle that is already initialized*@data: input data to be added to the message digest*@len: length of the input data
158  如果err则转到:err
161  如果zlenh
164  memset(tmpbuffer, 0, chunk)
166  循环
174 zlen循环
177  如果srcslen
179  如果err则转到:err
183  err等于rypto_shash_final() - calculate message digest*@desc: operational state handle that is already filled with data*@out: output buffer filled with the message digest* Finalize the message digest operation and create the message digest
184  如果err则转到:err
187  dlen减等于h
188  dst加等于h
189  counter等于cpu_to_be32(be32_to_cpu(counter) + 1)
192  返回:0
194  err :
195  memzero_explicit - Fill a region of memory (e
196  返回:err
调用者
名称描述
keyctl_dh_compute_kdf