Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:poly1305_core_emit

Proto:void poly1305_core_emit(const struct poly1305_state *state, void *dst)

Type:void

Parameter:

TypeParameterName
const struct poly1305_state *state
void *dst
116  h0 = accumulator, base 2^26 [0]
117  h1 = accumulator, base 2^26 [1]
118  h2 = accumulator, base 2^26 [2]
119  h3 = accumulator, base 2^26 [3]
120  h4 = accumulator, base 2^26 [4]
122  h2 += h1 >> 26
122  h1 = h1 & 0x3ffffff
123  h3 += h2 >> 26
123  h2 = h2 & 0x3ffffff
124  h4 += h3 >> 26
124  h3 = h3 & 0x3ffffff
125  h0 += (h4 >> 26) * 5
125  h4 = h4 & 0x3ffffff
126  h1 += h0 >> 26
126  h0 = h0 & 0x3ffffff
129  g0 = h0 + 5
130  g1 = h1 + (g0 >> 26)
130  g0 &= 0x3ffffff
131  g2 = h2 + (g1 >> 26)
131  g1 &= 0x3ffffff
132  g3 = h3 + (g2 >> 26)
132  g2 &= 0x3ffffff
133  g4 = h4 + (g3 >> 26) - (1 << 26)
133  g3 &= 0x3ffffff
136  mask = (g4 >> sizeof(u32) * 8 - 1 ) - 1
137  g0 &= mask
138  g1 &= mask
139  g2 &= mask
140  g3 &= mask
141  g4 &= mask
142  mask = ~mask
143  h0 = h0 & mask | g0
144  h1 = h1 & mask | g1
145  h2 = h2 & mask | g2
146  h3 = h3 & mask | g3
147  h4 = h4 & mask | g4
150  put_unaligned_le32((h0 >> 0) | (h1 << 26), dst + 0)
151  put_unaligned_le32((h1 >> 6) | (h2 << 20), dst + 4)
152  put_unaligned_le32((h2 >> 12) | (h3 << 14), dst + 8)
153  put_unaligned_le32((h3 >> 18) | (h4 << 8), dst + 12)
Caller
NameDescribe
poly1305_final_generic