Lines Matching refs:block

430 static inline void Q (u32 * block, u8 * Kr, u32 * Km) {  in Q()  argument
432 block[2] ^= F1(block[3], Kr[0], Km[0]); in Q()
433 block[1] ^= F2(block[2], Kr[1], Km[1]); in Q()
434 block[0] ^= F3(block[1], Kr[2], Km[2]); in Q()
435 block[3] ^= F1(block[0], Kr[3], Km[3]); in Q()
439 static inline void QBAR (u32 * block, u8 * Kr, u32 * Km) { in QBAR() argument
441 block[3] ^= F1(block[0], Kr[3], Km[3]); in QBAR()
442 block[0] ^= F3(block[1], Kr[2], Km[2]); in QBAR()
443 block[1] ^= F2(block[2], Kr[1], Km[1]); in QBAR()
444 block[2] ^= F1(block[3], Kr[0], Km[0]); in QBAR()
449 u32 block[4]; in cast6_encrypt() local
453 block[0] = inbuf[0] << 24 | inbuf[1] << 16 | inbuf[2] << 8 | inbuf[3]; in cast6_encrypt()
454 block[1] = inbuf[4] << 24 | inbuf[5] << 16 | inbuf[6] << 8 | inbuf[7]; in cast6_encrypt()
455 block[2] = inbuf[8] << 24 | inbuf[9] << 16 | inbuf[10] << 8 | inbuf[11]; in cast6_encrypt()
456 block[3] = inbuf[12] << 24 | inbuf[13] << 16 | inbuf[14] << 8 | inbuf[15]; in cast6_encrypt()
458 Km = c->Km[0]; Kr = c->Kr[0]; Q (block, Kr, Km); in cast6_encrypt()
459 Km = c->Km[1]; Kr = c->Kr[1]; Q (block, Kr, Km); in cast6_encrypt()
460 Km = c->Km[2]; Kr = c->Kr[2]; Q (block, Kr, Km); in cast6_encrypt()
461 Km = c->Km[3]; Kr = c->Kr[3]; Q (block, Kr, Km); in cast6_encrypt()
462 Km = c->Km[4]; Kr = c->Kr[4]; Q (block, Kr, Km); in cast6_encrypt()
463 Km = c->Km[5]; Kr = c->Kr[5]; Q (block, Kr, Km); in cast6_encrypt()
464 Km = c->Km[6]; Kr = c->Kr[6]; QBAR (block, Kr, Km); in cast6_encrypt()
465 Km = c->Km[7]; Kr = c->Kr[7]; QBAR (block, Kr, Km); in cast6_encrypt()
466 Km = c->Km[8]; Kr = c->Kr[8]; QBAR (block, Kr, Km); in cast6_encrypt()
467 Km = c->Km[9]; Kr = c->Kr[9]; QBAR (block, Kr, Km); in cast6_encrypt()
468 Km = c->Km[10]; Kr = c->Kr[10]; QBAR (block, Kr, Km); in cast6_encrypt()
469 Km = c->Km[11]; Kr = c->Kr[11]; QBAR (block, Kr, Km); in cast6_encrypt()
471 outbuf[0] = (block[0] >> 24) & 0xff; in cast6_encrypt()
472 outbuf[1] = (block[0] >> 16) & 0xff; in cast6_encrypt()
473 outbuf[2] = (block[0] >> 8) & 0xff; in cast6_encrypt()
474 outbuf[3] = block[0] & 0xff; in cast6_encrypt()
475 outbuf[4] = (block[1] >> 24) & 0xff; in cast6_encrypt()
476 outbuf[5] = (block[1] >> 16) & 0xff; in cast6_encrypt()
477 outbuf[6] = (block[1] >> 8) & 0xff; in cast6_encrypt()
478 outbuf[7] = block[1] & 0xff; in cast6_encrypt()
479 outbuf[8] = (block[2] >> 24) & 0xff; in cast6_encrypt()
480 outbuf[9] = (block[2] >> 16) & 0xff; in cast6_encrypt()
481 outbuf[10] = (block[2] >> 8) & 0xff; in cast6_encrypt()
482 outbuf[11] = block[2] & 0xff; in cast6_encrypt()
483 outbuf[12] = (block[3] >> 24) & 0xff; in cast6_encrypt()
484 outbuf[13] = (block[3] >> 16) & 0xff; in cast6_encrypt()
485 outbuf[14] = (block[3] >> 8) & 0xff; in cast6_encrypt()
486 outbuf[15] = block[3] & 0xff; in cast6_encrypt()
491 u32 block[4]; in cast6_decrypt() local
495 block[0] = inbuf[0] << 24 | inbuf[1] << 16 | inbuf[2] << 8 | inbuf[3]; in cast6_decrypt()
496 block[1] = inbuf[4] << 24 | inbuf[5] << 16 | inbuf[6] << 8 | inbuf[7]; in cast6_decrypt()
497 block[2] = inbuf[8] << 24 | inbuf[9] << 16 | inbuf[10] << 8 | inbuf[11]; in cast6_decrypt()
498 block[3] = inbuf[12] << 24 | inbuf[13] << 16 | inbuf[14] << 8 | inbuf[15]; in cast6_decrypt()
500 Km = c->Km[11]; Kr = c->Kr[11]; Q (block, Kr, Km); in cast6_decrypt()
501 Km = c->Km[10]; Kr = c->Kr[10]; Q (block, Kr, Km); in cast6_decrypt()
502 Km = c->Km[9]; Kr = c->Kr[9]; Q (block, Kr, Km); in cast6_decrypt()
503 Km = c->Km[8]; Kr = c->Kr[8]; Q (block, Kr, Km); in cast6_decrypt()
504 Km = c->Km[7]; Kr = c->Kr[7]; Q (block, Kr, Km); in cast6_decrypt()
505 Km = c->Km[6]; Kr = c->Kr[6]; Q (block, Kr, Km); in cast6_decrypt()
506 Km = c->Km[5]; Kr = c->Kr[5]; QBAR (block, Kr, Km); in cast6_decrypt()
507 Km = c->Km[4]; Kr = c->Kr[4]; QBAR (block, Kr, Km); in cast6_decrypt()
508 Km = c->Km[3]; Kr = c->Kr[3]; QBAR (block, Kr, Km); in cast6_decrypt()
509 Km = c->Km[2]; Kr = c->Kr[2]; QBAR (block, Kr, Km); in cast6_decrypt()
510 Km = c->Km[1]; Kr = c->Kr[1]; QBAR (block, Kr, Km); in cast6_decrypt()
511 Km = c->Km[0]; Kr = c->Kr[0]; QBAR (block, Kr, Km); in cast6_decrypt()
513 outbuf[0] = (block[0] >> 24) & 0xff; in cast6_decrypt()
514 outbuf[1] = (block[0] >> 16) & 0xff; in cast6_decrypt()
515 outbuf[2] = (block[0] >> 8) & 0xff; in cast6_decrypt()
516 outbuf[3] = block[0] & 0xff; in cast6_decrypt()
517 outbuf[4] = (block[1] >> 24) & 0xff; in cast6_decrypt()
518 outbuf[5] = (block[1] >> 16) & 0xff; in cast6_decrypt()
519 outbuf[6] = (block[1] >> 8) & 0xff; in cast6_decrypt()
520 outbuf[7] = block[1] & 0xff; in cast6_decrypt()
521 outbuf[8] = (block[2] >> 24) & 0xff; in cast6_decrypt()
522 outbuf[9] = (block[2] >> 16) & 0xff; in cast6_decrypt()
523 outbuf[10] = (block[2] >> 8) & 0xff; in cast6_decrypt()
524 outbuf[11] = block[2] & 0xff; in cast6_decrypt()
525 outbuf[12] = (block[3] >> 24) & 0xff; in cast6_decrypt()
526 outbuf[13] = (block[3] >> 16) & 0xff; in cast6_decrypt()
527 outbuf[14] = (block[3] >> 8) & 0xff; in cast6_decrypt()
528 outbuf[15] = block[3] & 0xff; in cast6_decrypt()