Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\mpi\mpih-mul.c Create Date:2022-07-28 07:19:12
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:mpih_sqr_n

Proto:void mpih_sqr_n(mpi_ptr_t prodp, mpi_ptr_t up, mpi_size_t size, mpi_ptr_t tspace)

Type:void

Parameter:

TypeParameterName
mpi_ptr_tprodp
mpi_ptr_tup
mpi_size_tsize
mpi_ptr_ttspace
247  If size & 1 Then
258  esize = size - 1
262  cy_limb = mpihelp_addmul_1(prodp + esize, up, esize, up[esize])
263  prodp[esize + esize] = cy_limb
264  cy_limb = mpihelp_addmul_1(prodp + esize, up, size, up[esize])
266  prodp[esize + size] = cy_limb
267  Else
268  hsize = size >> 1
281  If Compare OP1_PTR/OP1_SIZE with OP2_PTR/OP2_SIZE.* There are no restrictions on the relative sizes of* the two arguments.* Return 1 if OP1 > OP2, 0 if they are equal, and -1 if OP1 < OP2. >= 0 Then mpihelp_sub_n(prodp, up + hsize, up, hsize)
283  Else mpihelp_sub_n(prodp, up, up + hsize, hsize)
292  Copy N limbs from S to D. (prodp + hsize, prodp + size, hsize)
293  cy = mpihelp_add_n(prodp + size, prodp + size, prodp + size + hsize, hsize)
297  cy -= mpihelp_sub_n(prodp + hsize, prodp + hsize, tspace, size)
307  cy += mpihelp_add_n(prodp + hsize, prodp + hsize, tspace, size)
308  If cy Then mpihelp_add_1(prodp + hsize + size, prodp + hsize + size, hsize, cy)
312  Copy N limbs from S to D. (prodp, tspace, hsize)
313  cy = mpihelp_add_n(prodp + hsize, prodp + hsize, tspace + hsize, hsize)
315  If cy Then mpihelp_add_1(prodp + size, prodp + size, size, 1)
Caller
NameDescribe
mpi_powmRES = BASE ^ EXP mod MOD