Lines Matching refs:subRL

797 static void camellia_setup_tail(u64 *subkey, u64 *subRL, int max)  in camellia_setup_tail()  argument
804 subRL[3] ^= subRL[1]; in camellia_setup_tail()
806 subRL[5] ^= subRL[1]; in camellia_setup_tail()
808 subRL[7] ^= subRL[1]; in camellia_setup_tail()
810 subRL[1] ^= (subRL[1] & ~subRL[9]) << 32; in camellia_setup_tail()
812 dw = (subRL[1] & subRL[9]) >> 32; in camellia_setup_tail()
813 subRL[1] ^= rol32(dw, 1); in camellia_setup_tail()
816 subRL[11] ^= subRL[1]; in camellia_setup_tail()
818 subRL[13] ^= subRL[1]; in camellia_setup_tail()
820 subRL[15] ^= subRL[1]; in camellia_setup_tail()
822 subRL[1] ^= (subRL[1] & ~subRL[17]) << 32; in camellia_setup_tail()
824 dw = (subRL[1] & subRL[17]) >> 32; in camellia_setup_tail()
825 subRL[1] ^= rol32(dw, 1); in camellia_setup_tail()
828 subRL[19] ^= subRL[1]; in camellia_setup_tail()
830 subRL[21] ^= subRL[1]; in camellia_setup_tail()
832 subRL[23] ^= subRL[1]; in camellia_setup_tail()
836 subRL[24] ^= subRL[1]; in camellia_setup_tail()
839 kw4 = subRL[25]; in camellia_setup_tail()
841 subRL[1] ^= (subRL[1] & ~subRL[25]) << 32; in camellia_setup_tail()
843 dw = (subRL[1] & subRL[25]) >> 32; in camellia_setup_tail()
844 subRL[1] ^= rol32(dw, 1); in camellia_setup_tail()
847 subRL[27] ^= subRL[1]; in camellia_setup_tail()
849 subRL[29] ^= subRL[1]; in camellia_setup_tail()
851 subRL[31] ^= subRL[1]; in camellia_setup_tail()
853 subRL[32] ^= subRL[1]; in camellia_setup_tail()
856 kw4 = subRL[33]; in camellia_setup_tail()
858 subRL[30] ^= kw4; in camellia_setup_tail()
860 subRL[28] ^= kw4; in camellia_setup_tail()
862 subRL[26] ^= kw4; in camellia_setup_tail()
864 kw4 ^= (kw4 & ~subRL[24]) << 32; in camellia_setup_tail()
866 dw = (kw4 & subRL[24]) >> 32; in camellia_setup_tail()
871 subRL[22] ^= kw4; in camellia_setup_tail()
873 subRL[20] ^= kw4; in camellia_setup_tail()
875 subRL[18] ^= kw4; in camellia_setup_tail()
877 kw4 ^= (kw4 & ~subRL[16]) << 32; in camellia_setup_tail()
879 dw = (kw4 & subRL[16]) >> 32; in camellia_setup_tail()
883 subRL[14] ^= kw4; in camellia_setup_tail()
885 subRL[12] ^= kw4; in camellia_setup_tail()
887 subRL[10] ^= kw4; in camellia_setup_tail()
889 kw4 ^= (kw4 & ~subRL[8]) << 32; in camellia_setup_tail()
891 dw = (kw4 & subRL[8]) >> 32; in camellia_setup_tail()
895 subRL[6] ^= kw4; in camellia_setup_tail()
897 subRL[4] ^= kw4; in camellia_setup_tail()
899 subRL[2] ^= kw4; in camellia_setup_tail()
901 subRL[0] ^= kw4; in camellia_setup_tail()
904 SET_SUBKEY_LR(0, subRL[0] ^ subRL[2]); /* kw1 */ in camellia_setup_tail()
905 SET_SUBKEY_LR(2, subRL[3]); /* round 1 */ in camellia_setup_tail()
906 SET_SUBKEY_LR(3, subRL[2] ^ subRL[4]); /* round 2 */ in camellia_setup_tail()
907 SET_SUBKEY_LR(4, subRL[3] ^ subRL[5]); /* round 3 */ in camellia_setup_tail()
908 SET_SUBKEY_LR(5, subRL[4] ^ subRL[6]); /* round 4 */ in camellia_setup_tail()
909 SET_SUBKEY_LR(6, subRL[5] ^ subRL[7]); /* round 5 */ in camellia_setup_tail()
911 tl = (subRL[10] >> 32) ^ (subRL[10] & ~subRL[8]); in camellia_setup_tail()
912 dw = tl & (subRL[8] >> 32); /* FL(kl1) */ in camellia_setup_tail()
913 tr = subRL[10] ^ rol32(dw, 1); in camellia_setup_tail()
916 SET_SUBKEY_LR(7, subRL[6] ^ tt); /* round 6 */ in camellia_setup_tail()
917 SET_SUBKEY_LR(8, subRL[8]); /* FL(kl1) */ in camellia_setup_tail()
918 SET_SUBKEY_LR(9, subRL[9]); /* FLinv(kl2) */ in camellia_setup_tail()
920 tl = (subRL[7] >> 32) ^ (subRL[7] & ~subRL[9]); in camellia_setup_tail()
921 dw = tl & (subRL[9] >> 32); /* FLinv(kl2) */ in camellia_setup_tail()
922 tr = subRL[7] ^ rol32(dw, 1); in camellia_setup_tail()
925 SET_SUBKEY_LR(10, subRL[11] ^ tt); /* round 7 */ in camellia_setup_tail()
926 SET_SUBKEY_LR(11, subRL[10] ^ subRL[12]); /* round 8 */ in camellia_setup_tail()
927 SET_SUBKEY_LR(12, subRL[11] ^ subRL[13]); /* round 9 */ in camellia_setup_tail()
928 SET_SUBKEY_LR(13, subRL[12] ^ subRL[14]); /* round 10 */ in camellia_setup_tail()
929 SET_SUBKEY_LR(14, subRL[13] ^ subRL[15]); /* round 11 */ in camellia_setup_tail()
931 tl = (subRL[18] >> 32) ^ (subRL[18] & ~subRL[16]); in camellia_setup_tail()
932 dw = tl & (subRL[16] >> 32); /* FL(kl3) */ in camellia_setup_tail()
933 tr = subRL[18] ^ rol32(dw, 1); in camellia_setup_tail()
936 SET_SUBKEY_LR(15, subRL[14] ^ tt); /* round 12 */ in camellia_setup_tail()
937 SET_SUBKEY_LR(16, subRL[16]); /* FL(kl3) */ in camellia_setup_tail()
938 SET_SUBKEY_LR(17, subRL[17]); /* FLinv(kl4) */ in camellia_setup_tail()
940 tl = (subRL[15] >> 32) ^ (subRL[15] & ~subRL[17]); in camellia_setup_tail()
941 dw = tl & (subRL[17] >> 32); /* FLinv(kl4) */ in camellia_setup_tail()
942 tr = subRL[15] ^ rol32(dw, 1); in camellia_setup_tail()
945 SET_SUBKEY_LR(18, subRL[19] ^ tt); /* round 13 */ in camellia_setup_tail()
946 SET_SUBKEY_LR(19, subRL[18] ^ subRL[20]); /* round 14 */ in camellia_setup_tail()
947 SET_SUBKEY_LR(20, subRL[19] ^ subRL[21]); /* round 15 */ in camellia_setup_tail()
948 SET_SUBKEY_LR(21, subRL[20] ^ subRL[22]); /* round 16 */ in camellia_setup_tail()
949 SET_SUBKEY_LR(22, subRL[21] ^ subRL[23]); /* round 17 */ in camellia_setup_tail()
952 SET_SUBKEY_LR(23, subRL[22]); /* round 18 */ in camellia_setup_tail()
953 SET_SUBKEY_LR(24, subRL[24] ^ subRL[23]); /* kw3 */ in camellia_setup_tail()
955 tl = (subRL[26] >> 32) ^ (subRL[26] & ~subRL[24]); in camellia_setup_tail()
956 dw = tl & (subRL[24] >> 32); /* FL(kl5) */ in camellia_setup_tail()
957 tr = subRL[26] ^ rol32(dw, 1); in camellia_setup_tail()
960 SET_SUBKEY_LR(23, subRL[22] ^ tt); /* round 18 */ in camellia_setup_tail()
961 SET_SUBKEY_LR(24, subRL[24]); /* FL(kl5) */ in camellia_setup_tail()
962 SET_SUBKEY_LR(25, subRL[25]); /* FLinv(kl6) */ in camellia_setup_tail()
964 tl = (subRL[23] >> 32) ^ (subRL[23] & ~subRL[25]); in camellia_setup_tail()
965 dw = tl & (subRL[25] >> 32); /* FLinv(kl6) */ in camellia_setup_tail()
966 tr = subRL[23] ^ rol32(dw, 1); in camellia_setup_tail()
969 SET_SUBKEY_LR(26, subRL[27] ^ tt); /* round 19 */ in camellia_setup_tail()
970 SET_SUBKEY_LR(27, subRL[26] ^ subRL[28]); /* round 20 */ in camellia_setup_tail()
971 SET_SUBKEY_LR(28, subRL[27] ^ subRL[29]); /* round 21 */ in camellia_setup_tail()
972 SET_SUBKEY_LR(29, subRL[28] ^ subRL[30]); /* round 22 */ in camellia_setup_tail()
973 SET_SUBKEY_LR(30, subRL[29] ^ subRL[31]); /* round 23 */ in camellia_setup_tail()
974 SET_SUBKEY_LR(31, subRL[30]); /* round 24 */ in camellia_setup_tail()
975 SET_SUBKEY_LR(32, subRL[32] ^ subRL[31]); /* kw3 */ in camellia_setup_tail()
982 u64 subRL[26]; in camellia_setup128() local
992 subRL[0] = kl; in camellia_setup128()
994 subRL[1] = kr; in camellia_setup128()
1000 subRL[4] = kl; in camellia_setup128()
1002 subRL[5] = kr; in camellia_setup128()
1008 subRL[10] = kl; in camellia_setup128()
1010 subRL[11] = kr; in camellia_setup128()
1016 subRL[13] = kr; in camellia_setup128()
1021 subRL[16] = kl; in camellia_setup128()
1023 subRL[17] = kr; in camellia_setup128()
1029 subRL[18] = kl; in camellia_setup128()
1031 subRL[19] = kr; in camellia_setup128()
1037 subRL[22] = kl; in camellia_setup128()
1039 subRL[23] = kr; in camellia_setup128()
1042 kl = subRL[0]; in camellia_setup128()
1043 kr = subRL[1]; in camellia_setup128()
1056 subRL[2] = kl; in camellia_setup128()
1057 subRL[3] = kr; in camellia_setup128()
1060 subRL[6] = kl; in camellia_setup128()
1061 subRL[7] = kr; in camellia_setup128()
1064 subRL[8] = kl; in camellia_setup128()
1065 subRL[9] = kr; in camellia_setup128()
1068 subRL[12] = kl; in camellia_setup128()
1071 subRL[14] = kl; in camellia_setup128()
1072 subRL[15] = kr; in camellia_setup128()
1075 subRL[20] = kl; in camellia_setup128()
1076 subRL[21] = kr; in camellia_setup128()
1079 subRL[24] = kl; in camellia_setup128()
1080 subRL[25] = kr; in camellia_setup128()
1082 camellia_setup_tail(subkey, subRL, 24); in camellia_setup128()
1090 u64 subRL[34]; in camellia_setup256() local
1102 subRL[0] = kl; in camellia_setup256()
1104 subRL[1] = kr; in camellia_setup256()
1107 subRL[12] = kl; in camellia_setup256()
1109 subRL[13] = kr; in camellia_setup256()
1112 subRL[16] = kl; in camellia_setup256()
1114 subRL[17] = kr; in camellia_setup256()
1117 subRL[22] = kl; in camellia_setup256()
1119 subRL[23] = kr; in camellia_setup256()
1122 subRL[30] = kl; in camellia_setup256()
1124 subRL[31] = kr; in camellia_setup256()
1129 subRL[4] = krl; in camellia_setup256()
1131 subRL[5] = krr; in camellia_setup256()
1134 subRL[8] = krl; in camellia_setup256()
1136 subRL[9] = krr; in camellia_setup256()
1139 subRL[18] = krl; in camellia_setup256()
1141 subRL[19] = krr; in camellia_setup256()
1144 subRL[26] = krl; in camellia_setup256()
1146 subRL[27] = krr; in camellia_setup256()
1150 kl = subRL[0] ^ krl; in camellia_setup256()
1151 kr = subRL[1] ^ krr; in camellia_setup256()
1173 subRL[6] = kl; in camellia_setup256()
1175 subRL[7] = kr; in camellia_setup256()
1178 subRL[14] = kl; in camellia_setup256()
1180 subRL[15] = kr; in camellia_setup256()
1184 subRL[24] = kl; in camellia_setup256()
1186 subRL[25] = kr; in camellia_setup256()
1190 subRL[28] = kl; in camellia_setup256()
1192 subRL[29] = kr; in camellia_setup256()
1196 subRL[2] = krl; in camellia_setup256()
1198 subRL[3] = krr; in camellia_setup256()
1201 subRL[10] = krl; in camellia_setup256()
1203 subRL[11] = krr; in camellia_setup256()
1206 subRL[20] = krl; in camellia_setup256()
1208 subRL[21] = krr; in camellia_setup256()
1211 subRL[32] = krl; in camellia_setup256()
1213 subRL[33] = krr; in camellia_setup256()
1215 camellia_setup_tail(subkey, subRL, 32); in camellia_setup256()