Lines Matching refs:block
153 static inline void Q(u32 *block, const u8 *Kr, const u32 *Km) in Q() argument
156 block[2] ^= F1(block[3], Kr[0], Km[0]); in Q()
157 block[1] ^= F2(block[2], Kr[1], Km[1]); in Q()
158 block[0] ^= F3(block[1], Kr[2], Km[2]); in Q()
159 block[3] ^= F1(block[0], Kr[3], Km[3]); in Q()
163 static inline void QBAR(u32 *block, const u8 *Kr, const u32 *Km) in QBAR() argument
166 block[3] ^= F1(block[0], Kr[3], Km[3]); in QBAR()
167 block[0] ^= F3(block[1], Kr[2], Km[2]); in QBAR()
168 block[1] ^= F2(block[2], Kr[1], Km[1]); in QBAR()
169 block[2] ^= F1(block[3], Kr[0], Km[0]); in QBAR()
175 u32 block[4]; in __cast6_encrypt() local
179 block[0] = get_unaligned_be32(inbuf); in __cast6_encrypt()
180 block[1] = get_unaligned_be32(inbuf + 4); in __cast6_encrypt()
181 block[2] = get_unaligned_be32(inbuf + 8); in __cast6_encrypt()
182 block[3] = get_unaligned_be32(inbuf + 12); in __cast6_encrypt()
184 Km = c->Km[0]; Kr = c->Kr[0]; Q(block, Kr, Km); in __cast6_encrypt()
185 Km = c->Km[1]; Kr = c->Kr[1]; Q(block, Kr, Km); in __cast6_encrypt()
186 Km = c->Km[2]; Kr = c->Kr[2]; Q(block, Kr, Km); in __cast6_encrypt()
187 Km = c->Km[3]; Kr = c->Kr[3]; Q(block, Kr, Km); in __cast6_encrypt()
188 Km = c->Km[4]; Kr = c->Kr[4]; Q(block, Kr, Km); in __cast6_encrypt()
189 Km = c->Km[5]; Kr = c->Kr[5]; Q(block, Kr, Km); in __cast6_encrypt()
190 Km = c->Km[6]; Kr = c->Kr[6]; QBAR(block, Kr, Km); in __cast6_encrypt()
191 Km = c->Km[7]; Kr = c->Kr[7]; QBAR(block, Kr, Km); in __cast6_encrypt()
192 Km = c->Km[8]; Kr = c->Kr[8]; QBAR(block, Kr, Km); in __cast6_encrypt()
193 Km = c->Km[9]; Kr = c->Kr[9]; QBAR(block, Kr, Km); in __cast6_encrypt()
194 Km = c->Km[10]; Kr = c->Kr[10]; QBAR(block, Kr, Km); in __cast6_encrypt()
195 Km = c->Km[11]; Kr = c->Kr[11]; QBAR(block, Kr, Km); in __cast6_encrypt()
197 put_unaligned_be32(block[0], outbuf); in __cast6_encrypt()
198 put_unaligned_be32(block[1], outbuf + 4); in __cast6_encrypt()
199 put_unaligned_be32(block[2], outbuf + 8); in __cast6_encrypt()
200 put_unaligned_be32(block[3], outbuf + 12); in __cast6_encrypt()
212 u32 block[4]; in __cast6_decrypt() local
216 block[0] = get_unaligned_be32(inbuf); in __cast6_decrypt()
217 block[1] = get_unaligned_be32(inbuf + 4); in __cast6_decrypt()
218 block[2] = get_unaligned_be32(inbuf + 8); in __cast6_decrypt()
219 block[3] = get_unaligned_be32(inbuf + 12); in __cast6_decrypt()
221 Km = c->Km[11]; Kr = c->Kr[11]; Q(block, Kr, Km); in __cast6_decrypt()
222 Km = c->Km[10]; Kr = c->Kr[10]; Q(block, Kr, Km); in __cast6_decrypt()
223 Km = c->Km[9]; Kr = c->Kr[9]; Q(block, Kr, Km); in __cast6_decrypt()
224 Km = c->Km[8]; Kr = c->Kr[8]; Q(block, Kr, Km); in __cast6_decrypt()
225 Km = c->Km[7]; Kr = c->Kr[7]; Q(block, Kr, Km); in __cast6_decrypt()
226 Km = c->Km[6]; Kr = c->Kr[6]; Q(block, Kr, Km); in __cast6_decrypt()
227 Km = c->Km[5]; Kr = c->Kr[5]; QBAR(block, Kr, Km); in __cast6_decrypt()
228 Km = c->Km[4]; Kr = c->Kr[4]; QBAR(block, Kr, Km); in __cast6_decrypt()
229 Km = c->Km[3]; Kr = c->Kr[3]; QBAR(block, Kr, Km); in __cast6_decrypt()
230 Km = c->Km[2]; Kr = c->Kr[2]; QBAR(block, Kr, Km); in __cast6_decrypt()
231 Km = c->Km[1]; Kr = c->Kr[1]; QBAR(block, Kr, Km); in __cast6_decrypt()
232 Km = c->Km[0]; Kr = c->Kr[0]; QBAR(block, Kr, Km); in __cast6_decrypt()
234 put_unaligned_be32(block[0], outbuf); in __cast6_decrypt()
235 put_unaligned_be32(block[1], outbuf + 4); in __cast6_decrypt()
236 put_unaligned_be32(block[2], outbuf + 8); in __cast6_decrypt()
237 put_unaligned_be32(block[3], outbuf + 12); in __cast6_decrypt()