Lines Matching refs:s3
282 register u32 s0, s1, s2, s3; in Camellia_Ekeygen() local
287 k[3] = s3 = GETU32(rawKey + 12); in Camellia_Ekeygen()
294 k[11] = s3 = ~s1; in Camellia_Ekeygen()
297 k[11] = s3 = GETU32(rawKey + 28); in Camellia_Ekeygen()
299 s0 ^= k[0], s1 ^= k[1], s2 ^= k[2], s3 ^= k[3]; in Camellia_Ekeygen()
303 Camellia_Feistel(s0, s1, s2, s3, SIGMA + 0); in Camellia_Ekeygen()
304 Camellia_Feistel(s2, s3, s0, s1, SIGMA + 2); in Camellia_Ekeygen()
306 s0 ^= k[0], s1 ^= k[1], s2 ^= k[2], s3 ^= k[3]; in Camellia_Ekeygen()
307 Camellia_Feistel(s0, s1, s2, s3, SIGMA + 4); in Camellia_Ekeygen()
308 Camellia_Feistel(s2, s3, s0, s1, SIGMA + 6); in Camellia_Ekeygen()
312 k[4] = s0, k[5] = s1, k[6] = s2, k[7] = s3; in Camellia_Ekeygen()
313 RotLeft128(s0, s1, s2, s3, 15); /* KA <<< 15 */ in Camellia_Ekeygen()
314 k[12] = s0, k[13] = s1, k[14] = s2, k[15] = s3; in Camellia_Ekeygen()
315 RotLeft128(s0, s1, s2, s3, 15); /* KA <<< 30 */ in Camellia_Ekeygen()
316 k[16] = s0, k[17] = s1, k[18] = s2, k[19] = s3; in Camellia_Ekeygen()
317 RotLeft128(s0, s1, s2, s3, 15); /* KA <<< 45 */ in Camellia_Ekeygen()
319 RotLeft128(s0, s1, s2, s3, 15); /* KA <<< 60 */ in Camellia_Ekeygen()
320 k[28] = s0, k[29] = s1, k[30] = s2, k[31] = s3; in Camellia_Ekeygen()
321 RotLeft128(s1, s2, s3, s0, 2); /* KA <<< 94 */ in Camellia_Ekeygen()
322 k[40] = s1, k[41] = s2, k[42] = s3, k[43] = s0; in Camellia_Ekeygen()
323 RotLeft128(s1, s2, s3, s0, 17); /* KA <<<111 */ in Camellia_Ekeygen()
324 k[48] = s1, k[49] = s2, k[50] = s3, k[51] = s0; in Camellia_Ekeygen()
326 s0 = k[0], s1 = k[1], s2 = k[2], s3 = k[3]; in Camellia_Ekeygen()
327 RotLeft128(s0, s1, s2, s3, 15); /* KL <<< 15 */ in Camellia_Ekeygen()
328 k[8] = s0, k[9] = s1, k[10] = s2, k[11] = s3; in Camellia_Ekeygen()
329 RotLeft128(s0, s1, s2, s3, 30); /* KL <<< 45 */ in Camellia_Ekeygen()
330 k[20] = s0, k[21] = s1, k[22] = s2, k[23] = s3; in Camellia_Ekeygen()
331 RotLeft128(s0, s1, s2, s3, 15); /* KL <<< 60 */ in Camellia_Ekeygen()
332 k[26] = s2, k[27] = s3; in Camellia_Ekeygen()
333 RotLeft128(s0, s1, s2, s3, 17); /* KL <<< 77 */ in Camellia_Ekeygen()
334 k[32] = s0, k[33] = s1, k[34] = s2, k[35] = s3; in Camellia_Ekeygen()
335 RotLeft128(s0, s1, s2, s3, 17); /* KL <<< 94 */ in Camellia_Ekeygen()
336 k[36] = s0, k[37] = s1, k[38] = s2, k[39] = s3; in Camellia_Ekeygen()
337 RotLeft128(s0, s1, s2, s3, 17); /* KL <<<111 */ in Camellia_Ekeygen()
338 k[44] = s0, k[45] = s1, k[46] = s2, k[47] = s3; in Camellia_Ekeygen()
342 k[12] = s0, k[13] = s1, k[14] = s2, k[15] = s3; in Camellia_Ekeygen()
343 s0 ^= k[8], s1 ^= k[9], s2 ^= k[10], s3 ^= k[11]; in Camellia_Ekeygen()
344 Camellia_Feistel(s0, s1, s2, s3, (SIGMA + 8)); in Camellia_Ekeygen()
345 Camellia_Feistel(s2, s3, s0, s1, (SIGMA + 10)); in Camellia_Ekeygen()
347 k[4] = s0, k[5] = s1, k[6] = s2, k[7] = s3; in Camellia_Ekeygen()
348 RotLeft128(s0, s1, s2, s3, 30); /* KB <<< 30 */ in Camellia_Ekeygen()
349 k[20] = s0, k[21] = s1, k[22] = s2, k[23] = s3; in Camellia_Ekeygen()
350 RotLeft128(s0, s1, s2, s3, 30); /* KB <<< 60 */ in Camellia_Ekeygen()
351 k[40] = s0, k[41] = s1, k[42] = s2, k[43] = s3; in Camellia_Ekeygen()
352 RotLeft128(s1, s2, s3, s0, 19); /* KB <<<111 */ in Camellia_Ekeygen()
353 k[64] = s1, k[65] = s2, k[66] = s3, k[67] = s0; in Camellia_Ekeygen()
355 s0 = k[8], s1 = k[9], s2 = k[10], s3 = k[11]; in Camellia_Ekeygen()
356 RotLeft128(s0, s1, s2, s3, 15); /* KR <<< 15 */ in Camellia_Ekeygen()
357 k[8] = s0, k[9] = s1, k[10] = s2, k[11] = s3; in Camellia_Ekeygen()
358 RotLeft128(s0, s1, s2, s3, 15); /* KR <<< 30 */ in Camellia_Ekeygen()
359 k[16] = s0, k[17] = s1, k[18] = s2, k[19] = s3; in Camellia_Ekeygen()
360 RotLeft128(s0, s1, s2, s3, 30); /* KR <<< 60 */ in Camellia_Ekeygen()
361 k[36] = s0, k[37] = s1, k[38] = s2, k[39] = s3; in Camellia_Ekeygen()
362 RotLeft128(s1, s2, s3, s0, 2); /* KR <<< 94 */ in Camellia_Ekeygen()
363 k[52] = s1, k[53] = s2, k[54] = s3, k[55] = s0; in Camellia_Ekeygen()
365 s0 = k[12], s1 = k[13], s2 = k[14], s3 = k[15]; in Camellia_Ekeygen()
366 RotLeft128(s0, s1, s2, s3, 15); /* KA <<< 15 */ in Camellia_Ekeygen()
367 k[12] = s0, k[13] = s1, k[14] = s2, k[15] = s3; in Camellia_Ekeygen()
368 RotLeft128(s0, s1, s2, s3, 30); /* KA <<< 45 */ in Camellia_Ekeygen()
369 k[28] = s0, k[29] = s1, k[30] = s2, k[31] = s3; in Camellia_Ekeygen()
371 k[48] = s1, k[49] = s2, k[50] = s3, k[51] = s0; in Camellia_Ekeygen()
372 RotLeft128(s1, s2, s3, s0, 17); /* KA <<< 94 */ in Camellia_Ekeygen()
373 k[56] = s1, k[57] = s2, k[58] = s3, k[59] = s0; in Camellia_Ekeygen()
375 s0 = k[0], s1 = k[1], s2 = k[2], s3 = k[3]; in Camellia_Ekeygen()
376 RotLeft128(s1, s2, s3, s0, 13); /* KL <<< 45 */ in Camellia_Ekeygen()
377 k[24] = s1, k[25] = s2, k[26] = s3, k[27] = s0; in Camellia_Ekeygen()
378 RotLeft128(s1, s2, s3, s0, 15); /* KL <<< 60 */ in Camellia_Ekeygen()
379 k[32] = s1, k[33] = s2, k[34] = s3, k[35] = s0; in Camellia_Ekeygen()
380 RotLeft128(s1, s2, s3, s0, 17); /* KL <<< 77 */ in Camellia_Ekeygen()
381 k[44] = s1, k[45] = s2, k[46] = s3, k[47] = s0; in Camellia_Ekeygen()
382 RotLeft128(s2, s3, s0, s1, 2); /* KL <<<111 */ in Camellia_Ekeygen()
383 k[60] = s2, k[61] = s3, k[62] = s0, k[63] = s1; in Camellia_Ekeygen()
401 register u32 s0, s1, s2, s3; in Camellia_EncryptBlock_Rounds() local
407 s3 = GETU32(plaintext + 12) ^ k[3]; in Camellia_EncryptBlock_Rounds()
412 Camellia_Feistel(s0, s1, s2, s3, k + 0); in Camellia_EncryptBlock_Rounds()
413 Camellia_Feistel(s2, s3, s0, s1, k + 2); in Camellia_EncryptBlock_Rounds()
414 Camellia_Feistel(s0, s1, s2, s3, k + 4); in Camellia_EncryptBlock_Rounds()
415 Camellia_Feistel(s2, s3, s0, s1, k + 6); in Camellia_EncryptBlock_Rounds()
416 Camellia_Feistel(s0, s1, s2, s3, k + 8); in Camellia_EncryptBlock_Rounds()
417 Camellia_Feistel(s2, s3, s0, s1, k + 10); in Camellia_EncryptBlock_Rounds()
429 s2 ^= s3 | k[3]; in Camellia_EncryptBlock_Rounds()
431 s3 ^= LeftRotate(s2 & k[2], 1); in Camellia_EncryptBlock_Rounds()
435 s2 ^= k[0], s3 ^= k[1], s0 ^= k[2], s1 ^= k[3]; in Camellia_EncryptBlock_Rounds()
438 PUTU32(ciphertext + 4, s3); in Camellia_EncryptBlock_Rounds()
454 u32 s0, s1, s2, s3; in Camellia_DecryptBlock_Rounds() local
460 s3 = GETU32(ciphertext + 12) ^ k[3]; in Camellia_DecryptBlock_Rounds()
465 Camellia_Feistel(s0, s1, s2, s3, k + 10); in Camellia_DecryptBlock_Rounds()
466 Camellia_Feistel(s2, s3, s0, s1, k + 8); in Camellia_DecryptBlock_Rounds()
467 Camellia_Feistel(s0, s1, s2, s3, k + 6); in Camellia_DecryptBlock_Rounds()
468 Camellia_Feistel(s2, s3, s0, s1, k + 4); in Camellia_DecryptBlock_Rounds()
469 Camellia_Feistel(s0, s1, s2, s3, k + 2); in Camellia_DecryptBlock_Rounds()
470 Camellia_Feistel(s2, s3, s0, s1, k + 0); in Camellia_DecryptBlock_Rounds()
482 s2 ^= s3 | k[1]; in Camellia_DecryptBlock_Rounds()
484 s3 ^= LeftRotate(s2 & k[0], 1); in Camellia_DecryptBlock_Rounds()
488 s2 ^= k[0], s3 ^= k[1], s0 ^= k[2], s1 ^= k[3]; in Camellia_DecryptBlock_Rounds()
491 PUTU32(plaintext + 4, s3); in Camellia_DecryptBlock_Rounds()