Lines Matching refs:block
164 static inline void Q(u32 *block, u8 *Kr, u32 *Km) in Q() argument
167 block[2] ^= F1(block[3], Kr[0], Km[0]); in Q()
168 block[1] ^= F2(block[2], Kr[1], Km[1]); in Q()
169 block[0] ^= F3(block[1], Kr[2], Km[2]); in Q()
170 block[3] ^= F1(block[0], Kr[3], Km[3]); in Q()
174 static inline void QBAR(u32 *block, u8 *Kr, u32 *Km) in QBAR() argument
177 block[3] ^= F1(block[0], Kr[3], Km[3]); in QBAR()
178 block[0] ^= F3(block[1], Kr[2], Km[2]); in QBAR()
179 block[1] ^= F2(block[2], Kr[1], Km[1]); in QBAR()
180 block[2] ^= F1(block[3], Kr[0], Km[0]); in QBAR()
187 u32 block[4]; in __cast6_encrypt() local
191 block[0] = be32_to_cpu(src[0]); in __cast6_encrypt()
192 block[1] = be32_to_cpu(src[1]); in __cast6_encrypt()
193 block[2] = be32_to_cpu(src[2]); in __cast6_encrypt()
194 block[3] = be32_to_cpu(src[3]); in __cast6_encrypt()
196 Km = c->Km[0]; Kr = c->Kr[0]; Q(block, Kr, Km); in __cast6_encrypt()
197 Km = c->Km[1]; Kr = c->Kr[1]; Q(block, Kr, Km); in __cast6_encrypt()
198 Km = c->Km[2]; Kr = c->Kr[2]; Q(block, Kr, Km); in __cast6_encrypt()
199 Km = c->Km[3]; Kr = c->Kr[3]; Q(block, Kr, Km); in __cast6_encrypt()
200 Km = c->Km[4]; Kr = c->Kr[4]; Q(block, Kr, Km); in __cast6_encrypt()
201 Km = c->Km[5]; Kr = c->Kr[5]; Q(block, Kr, Km); in __cast6_encrypt()
202 Km = c->Km[6]; Kr = c->Kr[6]; QBAR(block, Kr, Km); in __cast6_encrypt()
203 Km = c->Km[7]; Kr = c->Kr[7]; QBAR(block, Kr, Km); in __cast6_encrypt()
204 Km = c->Km[8]; Kr = c->Kr[8]; QBAR(block, Kr, Km); in __cast6_encrypt()
205 Km = c->Km[9]; Kr = c->Kr[9]; QBAR(block, Kr, Km); in __cast6_encrypt()
206 Km = c->Km[10]; Kr = c->Kr[10]; QBAR(block, Kr, Km); in __cast6_encrypt()
207 Km = c->Km[11]; Kr = c->Kr[11]; QBAR(block, Kr, Km); in __cast6_encrypt()
209 dst[0] = cpu_to_be32(block[0]); in __cast6_encrypt()
210 dst[1] = cpu_to_be32(block[1]); in __cast6_encrypt()
211 dst[2] = cpu_to_be32(block[2]); in __cast6_encrypt()
212 dst[3] = cpu_to_be32(block[3]); in __cast6_encrypt()
225 u32 block[4]; in __cast6_decrypt() local
229 block[0] = be32_to_cpu(src[0]); in __cast6_decrypt()
230 block[1] = be32_to_cpu(src[1]); in __cast6_decrypt()
231 block[2] = be32_to_cpu(src[2]); in __cast6_decrypt()
232 block[3] = be32_to_cpu(src[3]); in __cast6_decrypt()
234 Km = c->Km[11]; Kr = c->Kr[11]; Q(block, Kr, Km); in __cast6_decrypt()
235 Km = c->Km[10]; Kr = c->Kr[10]; Q(block, Kr, Km); in __cast6_decrypt()
236 Km = c->Km[9]; Kr = c->Kr[9]; Q(block, Kr, Km); in __cast6_decrypt()
237 Km = c->Km[8]; Kr = c->Kr[8]; Q(block, Kr, Km); in __cast6_decrypt()
238 Km = c->Km[7]; Kr = c->Kr[7]; Q(block, Kr, Km); in __cast6_decrypt()
239 Km = c->Km[6]; Kr = c->Kr[6]; Q(block, Kr, Km); in __cast6_decrypt()
240 Km = c->Km[5]; Kr = c->Kr[5]; QBAR(block, Kr, Km); in __cast6_decrypt()
241 Km = c->Km[4]; Kr = c->Kr[4]; QBAR(block, Kr, Km); in __cast6_decrypt()
242 Km = c->Km[3]; Kr = c->Kr[3]; QBAR(block, Kr, Km); in __cast6_decrypt()
243 Km = c->Km[2]; Kr = c->Kr[2]; QBAR(block, Kr, Km); in __cast6_decrypt()
244 Km = c->Km[1]; Kr = c->Kr[1]; QBAR(block, Kr, Km); in __cast6_decrypt()
245 Km = c->Km[0]; Kr = c->Kr[0]; QBAR(block, Kr, Km); in __cast6_decrypt()
247 dst[0] = cpu_to_be32(block[0]); in __cast6_decrypt()
248 dst[1] = cpu_to_be32(block[1]); in __cast6_decrypt()
249 dst[2] = cpu_to_be32(block[2]); in __cast6_decrypt()
250 dst[3] = cpu_to_be32(block[3]); in __cast6_decrypt()