Lines Matching refs:subL
381 static void camellia_setup_tail(u32 *subkey, u32 *subL, u32 *subR, int max)
389 subL[3] ^= subL[1]; subR[3] ^= subR[1];
391 subL[5] ^= subL[1]; subR[5] ^= subR[1];
393 subL[7] ^= subL[1]; subR[7] ^= subR[1];
394 subL[1] ^= subR[1] & ~subR[9];
395 dw = subL[1] & subL[9],
398 subL[11] ^= subL[1]; subR[11] ^= subR[1];
400 subL[13] ^= subL[1]; subR[13] ^= subR[1];
402 subL[15] ^= subL[1]; subR[15] ^= subR[1];
403 subL[1] ^= subR[1] & ~subR[17];
404 dw = subL[1] & subL[17],
407 subL[19] ^= subL[1]; subR[19] ^= subR[1];
409 subL[21] ^= subL[1]; subR[21] ^= subR[1];
411 subL[23] ^= subL[1]; subR[23] ^= subR[1];
414 subL[24] ^= subL[1]; subR[24] ^= subR[1];
417 kw4l = subL[25]; kw4r = subR[25];
419 subL[1] ^= subR[1] & ~subR[25];
420 dw = subL[1] & subL[25],
423 subL[27] ^= subL[1]; subR[27] ^= subR[1];
425 subL[29] ^= subL[1]; subR[29] ^= subR[1];
427 subL[31] ^= subL[1]; subR[31] ^= subR[1];
429 subL[32] ^= subL[1]; subR[32] ^= subR[1];
432 kw4l = subL[33]; kw4r = subR[33];
434 subL[30] ^= kw4l; subR[30] ^= kw4r;
436 subL[28] ^= kw4l; subR[28] ^= kw4r;
438 subL[26] ^= kw4l; subR[26] ^= kw4r;
440 dw = kw4l & subL[24],
444 subL[22] ^= kw4l; subR[22] ^= kw4r;
446 subL[20] ^= kw4l; subR[20] ^= kw4r;
448 subL[18] ^= kw4l; subR[18] ^= kw4r;
450 dw = kw4l & subL[16],
453 subL[14] ^= kw4l; subR[14] ^= kw4r;
455 subL[12] ^= kw4l; subR[12] ^= kw4r;
457 subL[10] ^= kw4l; subR[10] ^= kw4r;
459 dw = kw4l & subL[8],
462 subL[6] ^= kw4l; subR[6] ^= kw4r;
464 subL[4] ^= kw4l; subR[4] ^= kw4r;
466 subL[2] ^= kw4l; subR[2] ^= kw4r;
468 subL[0] ^= kw4l; subR[0] ^= kw4r;
471 SUBKEY_L(0) = subL[0] ^ subL[2];/* kw1 */
473 SUBKEY_L(2) = subL[3]; /* round 1 */
475 SUBKEY_L(3) = subL[2] ^ subL[4]; /* round 2 */
477 SUBKEY_L(4) = subL[3] ^ subL[5]; /* round 3 */
479 SUBKEY_L(5) = subL[4] ^ subL[6]; /* round 4 */
481 SUBKEY_L(6) = subL[5] ^ subL[7]; /* round 5 */
483 tl = subL[10] ^ (subR[10] & ~subR[8]);
484 dw = tl & subL[8], /* FL(kl1) */
486 SUBKEY_L(7) = subL[6] ^ tl; /* round 6 */
488 SUBKEY_L(8) = subL[8]; /* FL(kl1) */
490 SUBKEY_L(9) = subL[9]; /* FLinv(kl2) */
492 tl = subL[7] ^ (subR[7] & ~subR[9]);
493 dw = tl & subL[9], /* FLinv(kl2) */
495 SUBKEY_L(10) = tl ^ subL[11]; /* round 7 */
497 SUBKEY_L(11) = subL[10] ^ subL[12]; /* round 8 */
499 SUBKEY_L(12) = subL[11] ^ subL[13]; /* round 9 */
501 SUBKEY_L(13) = subL[12] ^ subL[14]; /* round 10 */
503 SUBKEY_L(14) = subL[13] ^ subL[15]; /* round 11 */
505 tl = subL[18] ^ (subR[18] & ~subR[16]);
506 dw = tl & subL[16], /* FL(kl3) */
508 SUBKEY_L(15) = subL[14] ^ tl; /* round 12 */
510 SUBKEY_L(16) = subL[16]; /* FL(kl3) */
512 SUBKEY_L(17) = subL[17]; /* FLinv(kl4) */
514 tl = subL[15] ^ (subR[15] & ~subR[17]);
515 dw = tl & subL[17], /* FLinv(kl4) */
517 SUBKEY_L(18) = tl ^ subL[19]; /* round 13 */
519 SUBKEY_L(19) = subL[18] ^ subL[20]; /* round 14 */
521 SUBKEY_L(20) = subL[19] ^ subL[21]; /* round 15 */
523 SUBKEY_L(21) = subL[20] ^ subL[22]; /* round 16 */
525 SUBKEY_L(22) = subL[21] ^ subL[23]; /* round 17 */
528 SUBKEY_L(23) = subL[22]; /* round 18 */
530 SUBKEY_L(24) = subL[24] ^ subL[23]; /* kw3 */
533 tl = subL[26] ^ (subR[26] & ~subR[24]);
534 dw = tl & subL[24], /* FL(kl5) */
536 SUBKEY_L(23) = subL[22] ^ tl; /* round 18 */
538 SUBKEY_L(24) = subL[24]; /* FL(kl5) */
540 SUBKEY_L(25) = subL[25]; /* FLinv(kl6) */
542 tl = subL[23] ^ (subR[23] & ~subR[25]);
543 dw = tl & subL[25], /* FLinv(kl6) */
545 SUBKEY_L(26) = tl ^ subL[27]; /* round 19 */
547 SUBKEY_L(27) = subL[26] ^ subL[28]; /* round 20 */
549 SUBKEY_L(28) = subL[27] ^ subL[29]; /* round 21 */
551 SUBKEY_L(29) = subL[28] ^ subL[30]; /* round 22 */
553 SUBKEY_L(30) = subL[29] ^ subL[31]; /* round 23 */
555 SUBKEY_L(31) = subL[30]; /* round 24 */
557 SUBKEY_L(32) = subL[32] ^ subL[31]; /* kw3 */
584 u32 subL[26];
597 subL[0] = kll; subR[0] = klr;
599 subL[1] = krl; subR[1] = krr;
603 subL[4] = kll; subR[4] = klr;
605 subL[5] = krl; subR[5] = krr;
609 subL[10] = kll; subR[10] = klr;
611 subL[11] = krl; subR[11] = krr;
615 subL[13] = krl; subR[13] = krr;
619 subL[16] = kll; subR[16] = klr;
621 subL[17] = krl; subR[17] = krr;
625 subL[18] = kll; subR[18] = klr;
627 subL[19] = krl; subR[19] = krr;
631 subL[22] = kll; subR[22] = klr;
633 subL[23] = krl; subR[23] = krr;
636 kll = subL[0]; klr = subR[0];
637 krl = subL[1]; krr = subR[1];
657 subL[2] = kll; subR[2] = klr;
658 subL[3] = krl; subR[3] = krr;
661 subL[6] = kll; subR[6] = klr;
662 subL[7] = krl; subR[7] = krr;
665 subL[8] = kll; subR[8] = klr;
666 subL[9] = krl; subR[9] = krr;
669 subL[12] = kll; subR[12] = klr;
672 subL[14] = kll; subR[14] = klr;
673 subL[15] = krl; subR[15] = krr;
676 subL[20] = kll; subR[20] = klr;
677 subL[21] = krl; subR[21] = krr;
680 subL[24] = kll; subR[24] = klr;
681 subL[25] = krl; subR[25] = krr;
683 camellia_setup_tail(subkey, subL, subR, 24);
691 u32 subL[34];
709 subL[0] = kll; subR[0] = klr;
711 subL[1] = krl; subR[1] = krr;
714 subL[12] = kll; subR[12] = klr;
716 subL[13] = krl; subR[13] = krr;
719 subL[16] = kll; subR[16] = klr;
721 subL[17] = krl; subR[17] = krr;
724 subL[22] = kll; subR[22] = klr;
726 subL[23] = krl; subR[23] = krr;
729 subL[30] = kll; subR[30] = klr;
731 subL[31] = krl; subR[31] = krr;
736 subL[4] = krll; subR[4] = krlr;
738 subL[5] = krrl; subR[5] = krrr;
741 subL[8] = krll; subR[8] = krlr;
743 subL[9] = krrl; subR[9] = krrr;
746 subL[18] = krll; subR[18] = krlr;
748 subL[19] = krrl; subR[19] = krrr;
751 subL[26] = krll; subR[26] = krlr;
753 subL[27] = krrl; subR[27] = krrr;
757 kll = subL[0] ^ krll; klr = subR[0] ^ krlr;
758 krl = subL[1] ^ krrl; krr = subR[1] ^ krrr;
791 subL[6] = kll; subR[6] = klr;
793 subL[7] = krl; subR[7] = krr;
796 subL[14] = kll; subR[14] = klr;
798 subL[15] = krl; subR[15] = krr;
801 subL[24] = klr; subR[24] = krl;
803 subL[25] = krr; subR[25] = kll;
807 subL[28] = kll; subR[28] = klr;
809 subL[29] = krl; subR[29] = krr;
813 subL[2] = krll; subR[2] = krlr;
815 subL[3] = krrl; subR[3] = krrr;
818 subL[10] = krll; subR[10] = krlr;
820 subL[11] = krrl; subR[11] = krrr;
823 subL[20] = krll; subR[20] = krlr;
825 subL[21] = krrl; subR[21] = krrr;
828 subL[32] = krll; subR[32] = krlr;
830 subL[33] = krrl; subR[33] = krrr;
832 camellia_setup_tail(subkey, subL, subR, 32);