Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\crypto\curve25519-fiat32.c Create Date:2022-07-28 06:46:13
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:curve25519_generic

Proto:void curve25519_generic(u8 out[CURVE25519_KEY_SIZE], const u8 scalar[CURVE25519_KEY_SIZE], const u8 point[CURVE25519_KEY_SIZE])

Type:void

Parameter:

TypeParameterName
u8out
const u8scalar
const u8point
762  swap = 0
766  No 3D Now!(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  When pos >= 0 cycle
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