函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:curve25519_generic

函数原型:void curve25519_generic(u8 out[CURVE25519_KEY_SIZE], const u8 scalar[CURVE25519_KEY_SIZE], const u8 point[CURVE25519_KEY_SIZE])

返回类型:void

参数:

类型参数名称
u8out
const u8scalar
const u8point
762  swap等于0
766  内存复制(e, scalar, 32)
767  curve25519_clamp_secret(e)
794  fe_frombytes( & x1, point)
795  h = 1
796  h = 0
797  h = f
798  h = 1
800 pos大于等于0循环
814  b等于1按位与e[pos / 8]右移pos按位与7的值位
815  swap异或等于b
816  Replace (f,g) with (g,f) if b == 1;* replace (f,g) with (f,g) if b == 0.* Preconditions: b in {0,1}
817  Replace (f,g) with (g,f) if b == 1;* replace (f,g) with (f,g) if b == 0.* Preconditions: b in {0,1}
818  swap等于b
826  h = f - g* Can overlap h with f or g.
827  h = f - g* Can overlap h with f or g.
828  h = f + g* Can overlap h with f or g.
829  h = f + g* Can overlap h with f or g.
830  fe_mul_tll( & z3, & tmp0l, & x2l)
831  fe_mul_tll( & z2, & z2l, & tmp1l)
832  fe_sq_tl( & tmp0, & tmp1l)
833  fe_sq_tl( & tmp1, & x2l)
834  h = f + g* Can overlap h with f or g.
835  h = f - g* Can overlap h with f or g.
836  fe_mul_ttt( & x2, & tmp1, & tmp0)
837  h = f - g* Can overlap h with f or g.
838  fe_sq_tl( & z2, & z2l)
839  fe_mul121666( & z3, & tmp1l)
840  fe_sq_tl( & x3, & x3l)
841  h = f + g* Can overlap h with f or g.
842  fe_mul_ttt( & z3, & x1, & z2)
843  fe_mul_tll( & z2, & tmp1l, & tmp0l)
848  Replace (f,g) with (g,f) if b == 1;* replace (f,g) with (f,g) if b == 0.* Preconditions: b in {0,1}
849  Replace (f,g) with (g,f) if b == 1;* replace (f,g) with (f,g) if b == 0.* Preconditions: b in {0,1}
851  fe_invert( & z2, & z2)
852  fe_mul_ttt( & x2, & x2, & z2)
853  fe_tobytes(out, & x2)
855  memzero_explicit - Fill a region of memory (e
856  memzero_explicit - Fill a region of memory (e
857  memzero_explicit - Fill a region of memory (e
858  memzero_explicit - Fill a region of memory (e
859  memzero_explicit - Fill a region of memory (e
860  memzero_explicit - Fill a region of memory (e
861  memzero_explicit - Fill a region of memory (e
862  memzero_explicit - Fill a region of memory (e
863  memzero_explicit - Fill a region of memory (e