Lines Matching defs:subR
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];
396 subR[1] ^= rol32(dw, 1); /* modified for FLinv(kl2) */
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];
405 subR[1] ^= rol32(dw, 1); /* modified for FLinv(kl4) */
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];
421 subR[1] ^= rol32(dw, 1); /* modified for FLinv(kl6) */
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;
439 kw4l ^= kw4r & ~subR[24];
444 subL[22] ^= kw4l; subR[22] ^= kw4r;
446 subL[20] ^= kw4l; subR[20] ^= kw4r;
448 subL[18] ^= kw4l; subR[18] ^= kw4r;
449 kw4l ^= kw4r & ~subR[16];
453 subL[14] ^= kw4l; subR[14] ^= kw4r;
455 subL[12] ^= kw4l; subR[12] ^= kw4r;
457 subL[10] ^= kw4l; subR[10] ^= kw4r;
458 kw4l ^= kw4r & ~subR[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;
472 SUBKEY_R(0) = subR[0] ^ subR[2];
474 SUBKEY_R(2) = subR[3];
476 SUBKEY_R(3) = subR[2] ^ subR[4];
478 SUBKEY_R(4) = subR[3] ^ subR[5];
480 SUBKEY_R(5) = subR[4] ^ subR[6];
482 SUBKEY_R(6) = subR[5] ^ subR[7];
483 tl = subL[10] ^ (subR[10] & ~subR[8]);
485 tr = subR[10] ^ rol32(dw, 1);
487 SUBKEY_R(7) = subR[6] ^ tr;
489 SUBKEY_R(8) = subR[8];
491 SUBKEY_R(9) = subR[9];
492 tl = subL[7] ^ (subR[7] & ~subR[9]);
494 tr = subR[7] ^ rol32(dw, 1);
496 SUBKEY_R(10) = tr ^ subR[11];
498 SUBKEY_R(11) = subR[10] ^ subR[12];
500 SUBKEY_R(12) = subR[11] ^ subR[13];
502 SUBKEY_R(13) = subR[12] ^ subR[14];
504 SUBKEY_R(14) = subR[13] ^ subR[15];
505 tl = subL[18] ^ (subR[18] & ~subR[16]);
507 tr = subR[18] ^ rol32(dw, 1);
509 SUBKEY_R(15) = subR[14] ^ tr;
511 SUBKEY_R(16) = subR[16];
513 SUBKEY_R(17) = subR[17];
514 tl = subL[15] ^ (subR[15] & ~subR[17]);
516 tr = subR[15] ^ rol32(dw, 1);
518 SUBKEY_R(18) = tr ^ subR[19];
520 SUBKEY_R(19) = subR[18] ^ subR[20];
522 SUBKEY_R(20) = subR[19] ^ subR[21];
524 SUBKEY_R(21) = subR[20] ^ subR[22];
526 SUBKEY_R(22) = subR[21] ^ subR[23];
529 SUBKEY_R(23) = subR[22];
531 SUBKEY_R(24) = subR[24] ^ subR[23];
533 tl = subL[26] ^ (subR[26] & ~subR[24]);
535 tr = subR[26] ^ rol32(dw, 1);
537 SUBKEY_R(23) = subR[22] ^ tr;
539 SUBKEY_R(24) = subR[24];
541 SUBKEY_R(25) = subR[25];
542 tl = subL[23] ^ (subR[23] & ~subR[25]);
544 tr = subR[23] ^ rol32(dw, 1);
546 SUBKEY_R(26) = tr ^ subR[27];
548 SUBKEY_R(27) = subR[26] ^ subR[28];
550 SUBKEY_R(28) = subR[27] ^ subR[29];
552 SUBKEY_R(29) = subR[28] ^ subR[30];
554 SUBKEY_R(30) = subR[29] ^ subR[31];
556 SUBKEY_R(31) = subR[30];
558 SUBKEY_R(32) = subR[32] ^ subR[31];
585 u32 subR[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);
692 u32 subR[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);