函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\mpi\mpih-mul.c Create Date:2022-07-27 08:17:54
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Multiply the natural numbers u (pointed to by UP, with USIZE limbs)* and v (pointed to by VP, with VSIZE limbs), and store the result at* PRODP. USIZE + VSIZE limbs are always stored, but if the input* operands are normalized

函数原型:int mpihelp_mul(mpi_ptr_t prodp, mpi_ptr_t up, mpi_size_t usize, mpi_ptr_t vp, mpi_size_t vsize, mpi_limb_t *_result)

返回类型:int

参数:

类型参数名称
mpi_ptr_tprodp
mpi_ptr_tup
mpi_size_tusize
mpi_ptr_tvp
mpi_size_tvsize
mpi_limb_t *_result
430  prod_endp等于prodpusizevsize减1
434  如果vsize小于sted 4, 16, 32 and 64, where 16 gave the best performance when* checking a 768 and a 1024 bit ElGamal signature.* (wk 22.12.97)
438  如果非vsize
439  _result等于0
440  返回:0
445  v_limb等于vp[0]
446  如果v_limb小于等于1则
447  如果v_limb恒等于1则Copy N limbs from S to D. (prodp, up, usize)
451  cy等于0
452  否则cy等于mpihelp_mul_1(prodp, up, usize, v_limb)
455  prodp[usize]等于cy
456  prodp自加
460 i小于vsize循环
461  v_limb等于vp[i]
462  如果v_limb小于等于1则
463  cy等于0
464  如果v_limb恒等于1则cy等于mpihelp_add_n(prodp, prodp, up, usize)
467  否则cy等于mpihelp_addmul_1(prodp, up, usize, v_limb)
470  prodp[usize]等于cy
471  prodp自加
474  _result等于cy
475  返回:0
478  memset( & ctx, 0, sizeofctx)
479  如果mpihelp_mul_karatsuba_case(prodp, up, usize, vp, vsize, & ctx)小于0则返回:负ENOMEM
481  mpihelp_release_karatsuba_ctx( & ctx)
482  _result等于prod_endp
483  返回:0
调用者
名称描述
mpihelp_mul_karatsuba_case
mpi_powm异或取模