Lines Matching refs:s3
288 register u32 s0, s1, s2, s3; in Camellia_Ekeygen() local
293 k[3] = s3 = GETU32(rawKey + 12); in Camellia_Ekeygen()
300 k[11] = s3 = ~s1; in Camellia_Ekeygen()
303 k[11] = s3 = GETU32(rawKey + 28); in Camellia_Ekeygen()
305 s0 ^= k[0], s1 ^= k[1], s2 ^= k[2], s3 ^= k[3]; in Camellia_Ekeygen()
309 Camellia_Feistel(s0, s1, s2, s3, SIGMA + 0); in Camellia_Ekeygen()
310 Camellia_Feistel(s2, s3, s0, s1, SIGMA + 2); in Camellia_Ekeygen()
312 s0 ^= k[0], s1 ^= k[1], s2 ^= k[2], s3 ^= k[3]; in Camellia_Ekeygen()
313 Camellia_Feistel(s0, s1, s2, s3, SIGMA + 4); in Camellia_Ekeygen()
314 Camellia_Feistel(s2, s3, s0, s1, SIGMA + 6); in Camellia_Ekeygen()
318 k[4] = s0, k[5] = s1, k[6] = s2, k[7] = s3; in Camellia_Ekeygen()
319 RotLeft128(s0, s1, s2, s3, 15); /* KA <<< 15 */ in Camellia_Ekeygen()
320 k[12] = s0, k[13] = s1, k[14] = s2, k[15] = s3; in Camellia_Ekeygen()
321 RotLeft128(s0, s1, s2, s3, 15); /* KA <<< 30 */ in Camellia_Ekeygen()
322 k[16] = s0, k[17] = s1, k[18] = s2, k[19] = s3; in Camellia_Ekeygen()
323 RotLeft128(s0, s1, s2, s3, 15); /* KA <<< 45 */ in Camellia_Ekeygen()
325 RotLeft128(s0, s1, s2, s3, 15); /* KA <<< 60 */ in Camellia_Ekeygen()
326 k[28] = s0, k[29] = s1, k[30] = s2, k[31] = s3; in Camellia_Ekeygen()
327 RotLeft128(s1, s2, s3, s0, 2); /* KA <<< 94 */ in Camellia_Ekeygen()
328 k[40] = s1, k[41] = s2, k[42] = s3, k[43] = s0; in Camellia_Ekeygen()
329 RotLeft128(s1, s2, s3, s0, 17); /* KA <<<111 */ in Camellia_Ekeygen()
330 k[48] = s1, k[49] = s2, k[50] = s3, k[51] = s0; in Camellia_Ekeygen()
332 s0 = k[0], s1 = k[1], s2 = k[2], s3 = k[3]; in Camellia_Ekeygen()
333 RotLeft128(s0, s1, s2, s3, 15); /* KL <<< 15 */ in Camellia_Ekeygen()
334 k[8] = s0, k[9] = s1, k[10] = s2, k[11] = s3; in Camellia_Ekeygen()
335 RotLeft128(s0, s1, s2, s3, 30); /* KL <<< 45 */ in Camellia_Ekeygen()
336 k[20] = s0, k[21] = s1, k[22] = s2, k[23] = s3; in Camellia_Ekeygen()
337 RotLeft128(s0, s1, s2, s3, 15); /* KL <<< 60 */ in Camellia_Ekeygen()
338 k[26] = s2, k[27] = s3; in Camellia_Ekeygen()
339 RotLeft128(s0, s1, s2, s3, 17); /* KL <<< 77 */ in Camellia_Ekeygen()
340 k[32] = s0, k[33] = s1, k[34] = s2, k[35] = s3; in Camellia_Ekeygen()
341 RotLeft128(s0, s1, s2, s3, 17); /* KL <<< 94 */ in Camellia_Ekeygen()
342 k[36] = s0, k[37] = s1, k[38] = s2, k[39] = s3; in Camellia_Ekeygen()
343 RotLeft128(s0, s1, s2, s3, 17); /* KL <<<111 */ in Camellia_Ekeygen()
344 k[44] = s0, k[45] = s1, k[46] = s2, k[47] = s3; in Camellia_Ekeygen()
348 k[12] = s0, k[13] = s1, k[14] = s2, k[15] = s3; in Camellia_Ekeygen()
349 s0 ^= k[8], s1 ^= k[9], s2 ^= k[10], s3 ^= k[11]; in Camellia_Ekeygen()
350 Camellia_Feistel(s0, s1, s2, s3, (SIGMA + 8)); in Camellia_Ekeygen()
351 Camellia_Feistel(s2, s3, s0, s1, (SIGMA + 10)); in Camellia_Ekeygen()
353 k[4] = s0, k[5] = s1, k[6] = s2, k[7] = s3; in Camellia_Ekeygen()
354 RotLeft128(s0, s1, s2, s3, 30); /* KB <<< 30 */ in Camellia_Ekeygen()
355 k[20] = s0, k[21] = s1, k[22] = s2, k[23] = s3; in Camellia_Ekeygen()
356 RotLeft128(s0, s1, s2, s3, 30); /* KB <<< 60 */ in Camellia_Ekeygen()
357 k[40] = s0, k[41] = s1, k[42] = s2, k[43] = s3; in Camellia_Ekeygen()
358 RotLeft128(s1, s2, s3, s0, 19); /* KB <<<111 */ in Camellia_Ekeygen()
359 k[64] = s1, k[65] = s2, k[66] = s3, k[67] = s0; in Camellia_Ekeygen()
361 s0 = k[8], s1 = k[9], s2 = k[10], s3 = k[11]; in Camellia_Ekeygen()
362 RotLeft128(s0, s1, s2, s3, 15); /* KR <<< 15 */ in Camellia_Ekeygen()
363 k[8] = s0, k[9] = s1, k[10] = s2, k[11] = s3; in Camellia_Ekeygen()
364 RotLeft128(s0, s1, s2, s3, 15); /* KR <<< 30 */ in Camellia_Ekeygen()
365 k[16] = s0, k[17] = s1, k[18] = s2, k[19] = s3; in Camellia_Ekeygen()
366 RotLeft128(s0, s1, s2, s3, 30); /* KR <<< 60 */ in Camellia_Ekeygen()
367 k[36] = s0, k[37] = s1, k[38] = s2, k[39] = s3; in Camellia_Ekeygen()
368 RotLeft128(s1, s2, s3, s0, 2); /* KR <<< 94 */ in Camellia_Ekeygen()
369 k[52] = s1, k[53] = s2, k[54] = s3, k[55] = s0; in Camellia_Ekeygen()
371 s0 = k[12], s1 = k[13], s2 = k[14], s3 = k[15]; in Camellia_Ekeygen()
372 RotLeft128(s0, s1, s2, s3, 15); /* KA <<< 15 */ in Camellia_Ekeygen()
373 k[12] = s0, k[13] = s1, k[14] = s2, k[15] = s3; in Camellia_Ekeygen()
374 RotLeft128(s0, s1, s2, s3, 30); /* KA <<< 45 */ in Camellia_Ekeygen()
375 k[28] = s0, k[29] = s1, k[30] = s2, k[31] = s3; in Camellia_Ekeygen()
377 k[48] = s1, k[49] = s2, k[50] = s3, k[51] = s0; in Camellia_Ekeygen()
378 RotLeft128(s1, s2, s3, s0, 17); /* KA <<< 94 */ in Camellia_Ekeygen()
379 k[56] = s1, k[57] = s2, k[58] = s3, k[59] = s0; in Camellia_Ekeygen()
381 s0 = k[0], s1 = k[1], s2 = k[2], s3 = k[3]; in Camellia_Ekeygen()
382 RotLeft128(s1, s2, s3, s0, 13); /* KL <<< 45 */ in Camellia_Ekeygen()
383 k[24] = s1, k[25] = s2, k[26] = s3, k[27] = s0; in Camellia_Ekeygen()
384 RotLeft128(s1, s2, s3, s0, 15); /* KL <<< 60 */ in Camellia_Ekeygen()
385 k[32] = s1, k[33] = s2, k[34] = s3, k[35] = s0; in Camellia_Ekeygen()
386 RotLeft128(s1, s2, s3, s0, 17); /* KL <<< 77 */ in Camellia_Ekeygen()
387 k[44] = s1, k[45] = s2, k[46] = s3, k[47] = s0; in Camellia_Ekeygen()
388 RotLeft128(s2, s3, s0, s1, 2); /* KL <<<111 */ in Camellia_Ekeygen()
389 k[60] = s2, k[61] = s3, k[62] = s0, k[63] = s1; in Camellia_Ekeygen()
407 register u32 s0, s1, s2, s3; in Camellia_EncryptBlock_Rounds() local
413 s3 = GETU32(plaintext + 12) ^ k[3]; in Camellia_EncryptBlock_Rounds()
418 Camellia_Feistel(s0, s1, s2, s3, k + 0); in Camellia_EncryptBlock_Rounds()
419 Camellia_Feistel(s2, s3, s0, s1, k + 2); in Camellia_EncryptBlock_Rounds()
420 Camellia_Feistel(s0, s1, s2, s3, k + 4); in Camellia_EncryptBlock_Rounds()
421 Camellia_Feistel(s2, s3, s0, s1, k + 6); in Camellia_EncryptBlock_Rounds()
422 Camellia_Feistel(s0, s1, s2, s3, k + 8); in Camellia_EncryptBlock_Rounds()
423 Camellia_Feistel(s2, s3, s0, s1, k + 10); in Camellia_EncryptBlock_Rounds()
435 s2 ^= s3 | k[3]; in Camellia_EncryptBlock_Rounds()
437 s3 ^= LeftRotate(s2 & k[2], 1); in Camellia_EncryptBlock_Rounds()
441 s2 ^= k[0], s3 ^= k[1], s0 ^= k[2], s1 ^= k[3]; in Camellia_EncryptBlock_Rounds()
444 PUTU32(ciphertext + 4, s3); in Camellia_EncryptBlock_Rounds()
460 u32 s0, s1, s2, s3; in Camellia_DecryptBlock_Rounds() local
466 s3 = GETU32(ciphertext + 12) ^ k[3]; in Camellia_DecryptBlock_Rounds()
471 Camellia_Feistel(s0, s1, s2, s3, k + 10); in Camellia_DecryptBlock_Rounds()
472 Camellia_Feistel(s2, s3, s0, s1, k + 8); in Camellia_DecryptBlock_Rounds()
473 Camellia_Feistel(s0, s1, s2, s3, k + 6); in Camellia_DecryptBlock_Rounds()
474 Camellia_Feistel(s2, s3, s0, s1, k + 4); in Camellia_DecryptBlock_Rounds()
475 Camellia_Feistel(s0, s1, s2, s3, k + 2); in Camellia_DecryptBlock_Rounds()
476 Camellia_Feistel(s2, s3, s0, s1, k + 0); in Camellia_DecryptBlock_Rounds()
488 s2 ^= s3 | k[1]; in Camellia_DecryptBlock_Rounds()
490 s3 ^= LeftRotate(s2 & k[0], 1); in Camellia_DecryptBlock_Rounds()
494 s2 ^= k[0], s3 ^= k[1], s0 ^= k[2], s1 ^= k[3]; in Camellia_DecryptBlock_Rounds()
497 PUTU32(plaintext + 4, s3); in Camellia_DecryptBlock_Rounds()