Lines Matching +full:0 +full:x3

27 #define PHI 0x9e3779b9UL
32 #define loadkeys(x0, x1, x2, x3, i) \ argument
33 ({ x0 = k[i]; x1 = k[i+1]; x2 = k[i+2]; x3 = k[i+3]; })
35 #define storekeys(x0, x1, x2, x3, i) \ argument
36 ({ k[i] = x0; k[i+1] = x1; k[i+2] = x2; k[i+3] = x3; })
38 #define store_and_load_keys(x0, x1, x2, x3, s, l) \ argument
39 ({ storekeys(x0, x1, x2, x3, s); loadkeys(x0, x1, x2, x3, l); })
41 #define K(x0, x1, x2, x3, i) ({ \ argument
42 x3 ^= k[4*(i)+3]; x2 ^= k[4*(i)+2]; \
43 x1 ^= k[4*(i)+1]; x0 ^= k[4*(i)+0]; \
46 #define LK(x0, x1, x2, x3, x4, i) ({ \ argument
49 x3 ^= x2; x1 ^= x2; \
50 x1 = rol32(x1, 1); x3 ^= x4; \
51 x3 = rol32(x3, 7); x4 = x1; \
52 x0 ^= x1; x4 <<= 7; x2 ^= x3; \
53 x0 ^= x3; x2 ^= x4; x3 ^= k[4*i+3]; \
55 x0 ^= k[4*i+0]; x2 ^= k[4*i+2]; \
58 #define KL(x0, x1, x2, x3, x4, i) ({ \ argument
59 x0 ^= k[4*i+0]; x1 ^= k[4*i+1]; x2 ^= k[4*i+2]; \
60 x3 ^= k[4*i+3]; x0 = ror32(x0, 5); x2 = ror32(x2, 22);\
61 x4 = x1; x2 ^= x3; x0 ^= x3; \
63 x2 ^= x4; x3 = ror32(x3, 7); x4 = x0 << 3; \
64 x1 ^= x0; x3 ^= x4; x0 = ror32(x0, 13);\
65 x1 ^= x2; x3 ^= x2; x2 = ror32(x2, 3); \
68 #define S0(x0, x1, x2, x3, x4) ({ \ argument
69 x4 = x3; \
70 x3 |= x0; x0 ^= x4; x4 ^= x2; \
71 x4 = ~x4; x3 ^= x1; x1 &= x0; \
72 x1 ^= x4; x2 ^= x0; x0 ^= x3; \
74 x3 ^= x2; x1 = ~x1; x2 ^= x4; \
78 #define S1(x0, x1, x2, x3, x4) ({ \ argument
80 x1 ^= x0; x0 ^= x3; x3 = ~x3; \
81 x4 &= x1; x0 |= x1; x3 ^= x2; \
82 x0 ^= x3; x1 ^= x3; x3 ^= x4; \
88 #define S2(x0, x1, x2, x3, x4) ({ \ argument
89 x3 = ~x3; \
91 x0 ^= x3; x3 |= x4; x2 ^= x1; \
92 x3 ^= x1; x1 &= x0; x0 ^= x2; \
93 x2 &= x3; x3 |= x1; x0 = ~x0; \
94 x3 ^= x0; x4 ^= x0; x0 ^= x2; \
98 #define S3(x0, x1, x2, x3, x4) ({ \ argument
100 x1 ^= x3; x3 |= x0; x4 &= x0; \
101 x0 ^= x2; x2 ^= x1; x1 &= x3; \
102 x2 ^= x3; x0 |= x4; x4 ^= x3; \
103 x1 ^= x0; x0 &= x3; x3 &= x4; \
104 x3 ^= x2; x4 |= x1; x2 &= x1; \
105 x4 ^= x3; x0 ^= x3; x3 ^= x2; \
108 #define S4(x0, x1, x2, x3, x4) ({ \ argument
109 x4 = x3; \
110 x3 &= x0; x0 ^= x4; \
111 x3 ^= x2; x2 |= x4; x0 ^= x1; \
112 x4 ^= x3; x2 |= x0; \
114 x1 ^= x4; x4 &= x2; x2 ^= x3; \
115 x4 ^= x0; x3 |= x1; x1 = ~x1; \
116 x3 ^= x0; \
119 #define S5(x0, x1, x2, x3, x4) ({ \ argument
121 x2 ^= x1; x3 = ~x3; x4 ^= x0; \
122 x0 ^= x2; x1 &= x4; x4 |= x3; \
123 x4 ^= x0; x0 &= x3; x1 ^= x3; \
124 x3 ^= x2; x0 ^= x1; x2 &= x4; \
126 x3 ^= x2; \
129 #define S6(x0, x1, x2, x3, x4) ({ \ argument
131 x3 ^= x0; x1 ^= x2; x2 ^= x0; \
132 x0 &= x3; x1 |= x3; x4 = ~x4; \
134 x3 ^= x4; x4 ^= x0; x2 &= x0; \
135 x4 ^= x1; x2 ^= x3; x3 &= x1; \
136 x3 ^= x0; x1 ^= x2; \
139 #define S7(x0, x1, x2, x3, x4) ({ \ argument
142 x1 ^= x3; x3 |= x4; x4 ^= x2; \
143 x2 ^= x3; x3 ^= x0; x0 |= x1; \
144 x2 &= x0; x0 ^= x4; x4 ^= x3; \
145 x3 &= x0; x4 ^= x1; \
146 x2 ^= x4; x3 ^= x1; x4 |= x0; \
150 #define SI0(x0, x1, x2, x3, x4) ({ \ argument
151 x4 = x3; x1 ^= x0; \
152 x3 |= x1; x4 ^= x1; x0 = ~x0; \
153 x2 ^= x3; x3 ^= x0; x0 &= x1; \
154 x0 ^= x2; x2 &= x3; x3 ^= x4; \
155 x2 ^= x3; x1 ^= x3; x3 &= x0; \
156 x1 ^= x0; x0 ^= x2; x4 ^= x3; \
159 #define SI1(x0, x1, x2, x3, x4) ({ \ argument
160 x1 ^= x3; x4 = x0; \
162 x4 ^= x3; x3 &= x1; x1 ^= x2; \
163 x2 &= x4; x4 ^= x1; x1 |= x3; \
164 x3 ^= x0; x2 ^= x0; x0 |= x4; \
169 #define SI2(x0, x1, x2, x3, x4) ({ \ argument
170 x2 ^= x1; x4 = x3; x3 = ~x3; \
171 x3 |= x2; x2 ^= x4; x4 ^= x0; \
172 x3 ^= x1; x1 |= x2; x2 ^= x0; \
173 x1 ^= x4; x4 |= x3; x2 ^= x3; \
175 x2 ^= x3; x3 ^= x4; x4 ^= x0; \
178 #define SI3(x0, x1, x2, x3, x4) ({ \ argument
181 x1 ^= x0; x0 |= x4; x4 ^= x3; \
182 x0 ^= x3; x3 |= x1; x1 ^= x2; \
183 x1 ^= x3; x0 ^= x2; x2 ^= x3; \
184 x3 &= x1; x1 ^= x0; x0 &= x2; \
185 x4 ^= x3; x3 ^= x0; x0 ^= x1; \
188 #define SI4(x0, x1, x2, x3, x4) ({ \ argument
189 x2 ^= x3; x4 = x0; x0 &= x1; \
190 x0 ^= x2; x2 |= x3; x4 = ~x4; \
193 x0 ^= x3; x3 &= x2; \
194 x4 ^= x3; x3 ^= x1; x1 &= x0; \
195 x4 ^= x1; x0 ^= x3; \
198 #define SI5(x0, x1, x2, x3, x4) ({ \ argument
200 x2 ^= x4; x1 ^= x3; x3 &= x4; \
201 x2 ^= x3; x3 |= x0; x0 = ~x0; \
202 x3 ^= x2; x2 |= x0; x4 ^= x1; \
204 x1 ^= x3; x0 &= x2; x2 ^= x3; \
205 x0 ^= x2; x2 ^= x4; x4 ^= x3; \
208 #define SI6(x0, x1, x2, x3, x4) ({ \ argument
210 x4 = x0; x0 &= x3; x2 ^= x3; \
211 x0 ^= x2; x3 ^= x1; x2 |= x4; \
212 x2 ^= x3; x3 &= x0; x0 = ~x0; \
213 x3 ^= x1; x1 &= x2; x4 ^= x0; \
214 x3 ^= x4; x4 ^= x2; x0 ^= x1; \
218 #define SI7(x0, x1, x2, x3, x4) ({ \ argument
219 x4 = x3; x3 &= x0; x0 ^= x2; \
221 x1 |= x3; x4 ^= x0; x0 &= x2; \
222 x0 ^= x1; x1 &= x2; x3 ^= x2; \
223 x4 ^= x3; x2 &= x3; x3 |= x0; \
224 x1 ^= x4; x3 ^= x4; x4 &= x0; \
243 S1(r0, r2, r4, r1, r3); store_and_load_keys(r3, r4, r1, r0, 4, 0); in __serpent_setkey_sbox()
244 S2(r3, r4, r1, r0, r2); store_and_load_keys(r2, r4, r3, r0, 0, -4); in __serpent_setkey_sbox()
270 S2(r0, r4, r2, r1, r3); store_and_load_keys(r3, r4, r0, r1, 4, 0); in __serpent_setkey_sbox()
271 S3(r3, r4, r0, r1, r2); storekeys(r1, r2, r4, r3, 0); in __serpent_setkey_sbox()
284 for (i = 0; i < keylen; ++i) in __serpent_setkey()
289 k8[i++] = 0; in __serpent_setkey()
299 keyiter(le32_to_cpu(k[0]), r0, r4, r2, 0, 0); in __serpent_setkey()
308 keyiter(k[0], r3, r2, r0, 8, 8); in __serpent_setkey()
353 keyiter(k[-8], r0, r4, r2, 50, 0); in __serpent_setkey()
361 keyiter(k[0], r3, r2, r0, 58, 8); in __serpent_setkey()
406 keyiter(k[-8], r0, r4, r2, 100, 0); in __serpent_setkey()
414 keyiter(k[0], r3, r2, r0, 108, 8); in __serpent_setkey()
442 return 0; in __serpent_setkey()
465 r0 = le32_to_cpu(s[0]); in __serpent_encrypt()
470 K(r0, r1, r2, r3, 0); in __serpent_encrypt()
504 d[0] = cpu_to_le32(r0); in __serpent_encrypt()
526 r0 = le32_to_cpu(s[0]); in __serpent_decrypt()
563 SI0(r4, r1, r2, r0, r3); K(r2, r3, r1, r4, 0); in __serpent_decrypt()
565 d[0] = cpu_to_le32(r2); in __serpent_decrypt()
585 for (i = 0; i < keylen; ++i) in tnepres_setkey()
598 rs[0] = swab32(s[3]); in tnepres_encrypt()
601 rs[3] = swab32(s[0]); in tnepres_encrypt()
605 d[0] = swab32(rd[3]); in tnepres_encrypt()
608 d[3] = swab32(rd[0]); in tnepres_encrypt()
618 rs[0] = swab32(s[3]); in tnepres_decrypt()
621 rs[3] = swab32(s[0]); in tnepres_decrypt()
625 d[0] = swab32(rd[3]); in tnepres_decrypt()
628 d[3] = swab32(rd[0]); in tnepres_decrypt()