函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:chacha_permute

函数原型:static void chacha_permute(u32 *x, int nrounds)

返回类型:void

参数:

类型参数名称
u32 *x
intnrounds
22  WARN_ON_ONCE(nrounds != 20 && nrounds != 12)
24 i小于nrounds循环
25  x[0]加等于x[4]
25  x[12]等于l32 - rotate a 32-bit value left*@word: value to rotate*@shift: bits to roll
26  x[1]加等于x[5]
26  x[13]等于l32 - rotate a 32-bit value left*@word: value to rotate*@shift: bits to roll
27  x[2]加等于x[6]
27  x[14]等于l32 - rotate a 32-bit value left*@word: value to rotate*@shift: bits to roll
28  x[3]加等于x[7]
28  x[15]等于l32 - rotate a 32-bit value left*@word: value to rotate*@shift: bits to roll
30  x[8]加等于x[12]
30  x[4]等于l32 - rotate a 32-bit value left*@word: value to rotate*@shift: bits to roll
31  x[9]加等于x[13]
31  x[5]等于l32 - rotate a 32-bit value left*@word: value to rotate*@shift: bits to roll
32  x[10]加等于x[14]
32  x[6]等于l32 - rotate a 32-bit value left*@word: value to rotate*@shift: bits to roll
33  x[11]加等于x[15]
33  x[7]等于l32 - rotate a 32-bit value left*@word: value to rotate*@shift: bits to roll
35  x[0]加等于x[4]
35  x[12]等于l32 - rotate a 32-bit value left*@word: value to rotate*@shift: bits to roll
36  x[1]加等于x[5]
36  x[13]等于l32 - rotate a 32-bit value left*@word: value to rotate*@shift: bits to roll
37  x[2]加等于x[6]
37  x[14]等于l32 - rotate a 32-bit value left*@word: value to rotate*@shift: bits to roll
38  x[3]加等于x[7]
38  x[15]等于l32 - rotate a 32-bit value left*@word: value to rotate*@shift: bits to roll
40  x[8]加等于x[12]
40  x[4]等于l32 - rotate a 32-bit value left*@word: value to rotate*@shift: bits to roll
41  x[9]加等于x[13]
41  x[5]等于l32 - rotate a 32-bit value left*@word: value to rotate*@shift: bits to roll
42  x[10]加等于x[14]
42  x[6]等于l32 - rotate a 32-bit value left*@word: value to rotate*@shift: bits to roll
43  x[11]加等于x[15]
43  x[7]等于l32 - rotate a 32-bit value left*@word: value to rotate*@shift: bits to roll
45  x[0]加等于x[5]
45  x[15]等于l32 - rotate a 32-bit value left*@word: value to rotate*@shift: bits to roll
46  x[1]加等于x[6]
46  x[12]等于l32 - rotate a 32-bit value left*@word: value to rotate*@shift: bits to roll
47  x[2]加等于x[7]
47  x[13]等于l32 - rotate a 32-bit value left*@word: value to rotate*@shift: bits to roll
48  x[3]加等于x[4]
48  x[14]等于l32 - rotate a 32-bit value left*@word: value to rotate*@shift: bits to roll
50  x[10]加等于x[15]
50  x[5]等于l32 - rotate a 32-bit value left*@word: value to rotate*@shift: bits to roll
51  x[11]加等于x[12]
51  x[6]等于l32 - rotate a 32-bit value left*@word: value to rotate*@shift: bits to roll
52  x[8]加等于x[13]
52  x[7]等于l32 - rotate a 32-bit value left*@word: value to rotate*@shift: bits to roll
53  x[9]加等于x[14]
53  x[4]等于l32 - rotate a 32-bit value left*@word: value to rotate*@shift: bits to roll
55  x[0]加等于x[5]
55  x[15]等于l32 - rotate a 32-bit value left*@word: value to rotate*@shift: bits to roll
56  x[1]加等于x[6]
56  x[12]等于l32 - rotate a 32-bit value left*@word: value to rotate*@shift: bits to roll
57  x[2]加等于x[7]
57  x[13]等于l32 - rotate a 32-bit value left*@word: value to rotate*@shift: bits to roll
58  x[3]加等于x[4]
58  x[14]等于l32 - rotate a 32-bit value left*@word: value to rotate*@shift: bits to roll
60  x[10]加等于x[15]
60  x[5]等于l32 - rotate a 32-bit value left*@word: value to rotate*@shift: bits to roll
61  x[11]加等于x[12]
61  x[6]等于l32 - rotate a 32-bit value left*@word: value to rotate*@shift: bits to roll
62  x[8]加等于x[13]
62  x[7]等于l32 - rotate a 32-bit value left*@word: value to rotate*@shift: bits to roll
63  x[9]加等于x[14]
63  x[4]等于l32 - rotate a 32-bit value left*@word: value to rotate*@shift: bits to roll
调用者
名称描述
chacha_block_generichacha_block - generate one keystream block and increment block counter*@state: input state matrix (16 32-bit words)*@stream: output keystream block (64 bytes)*@nrounds: number of rounds (20 or 12; 20 is recommended)
hchacha_block_generichchacha_block_generic - abbreviated ChaCha core, for XChaCha*@state: input state matrix (16 32-bit words)*@out: output (8 32-bit words)*@nrounds: number of rounds (20 or 12; 20 is recommended)* HChaCha is the ChaCha equivalent of HSalsa and is an