函数逻辑报告 |
Source Code:security\keys\dh.c |
Create Date:2022-07-27 20:01:40 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:__keyctl_dh_compute
函数原型:long __keyctl_dh_compute(struct keyctl_dh_params __user *params, char __user *buffer, size_t buflen, struct keyctl_kdf_params *kdfcopy)
返回类型:long
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| struct keyctl_dh_params __user * | params | |
| char __user * | buffer | |
| size_t | buflen | |
| struct keyctl_kdf_params * | kdfcopy |
| 249 | 如果copy_from_user( & pcopy, params, pcopy的长度)不等于0则 |
| 254 | 如果kdfcopy则 |
| 270 | 如果是错误则 |
| 277 | 释放内存 |
| 284 | dlen等于dh_data_from_key(prime, & p) |
| 285 | 如果dlen小于0则 |
| 291 | dlen等于dh_data_from_key(base, & g) |
| 292 | 如果dlen小于0则 |
| 298 | dlen等于dh_data_from_key(private, & key) |
| 299 | 如果dlen小于0则 |
| 305 | secretlen等于rypto_dh_key_len() - Obtain the size of the private DH key*@params: private DH key* This function returns the packet DH key size |
| 307 | 如果非secret则 |
| 311 | ret等于rypto_dh_encode_key() - encode the private key*@buf: Buffer allocated by the caller to hold the packet DH* private key |
| 316 | 如果是错误则 |
| 325 | outlen等于rypto_kpp_maxsize() - Get len for output buffer* Function returns the output buffer size required for a given key |
| 327 | 如果非kdfcopy则 |
| 332 | 如果buflen恒等于0则 |
| 343 | 如果非outbuf则 |
| 348 | 初始化散列表项目 |
| 351 | 如果非req则 |
| 358 | init_completion( & completion) |
| 368 | 如果ret恒等于负EINPROGRESS则 |
| 375 | 如果kdfcopy则 |
| 380 | 如果copy_from_user(outbuf + dst_len, otherinfo, otherinfolen)不等于0则 |
| 386 | ret等于keyctl_dh_compute_kdf(sdesc, buffer, buflen, outbuf, dst_len + otherinfolen, outlen - dst_len) |
| 389 | 否则如果copy_to_user(buffer, outbuf, dst_len)恒等于0则 |
| 391 | 否则 |
| 395 | out6 : |
| 397 | out5 : |
| 399 | out4 : |
| 401 | out3 : |
| 403 | out2 : |
| 404 | dh_free_data( & dh_inputs) |
| 405 | out1 : |
| 406 | kdf_dealloc(sdesc) |
| 407 | 返回:ret |
| 名称 | 描述 |
|---|---|
| compat_keyctl_dh_compute | Perform the DH computation or DH based key derivation.* If successful, 0 will be returned. |
| keyctl_dh_compute |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |