aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2013-08-14 09:52:58 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2013-08-21 07:08:33 -0400
commit452ec0498f98304d4107842075062fe429ce7804 (patch)
treedaff094d71d5693854d2f4f80e3f93009ca6eb52
parent2a128b4b74e559e585028d0205e9729271530637 (diff)
crypto: camellia_generic - replace commas by semicolons and adjust code alignment
Adjust alignment and replace commas by semicolons in automatically generated code. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--crypto/camellia_generic.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/crypto/camellia_generic.c b/crypto/camellia_generic.c
index 75efa2052305..26bcd7a2d6b4 100644
--- a/crypto/camellia_generic.c
+++ b/crypto/camellia_generic.c
@@ -388,8 +388,8 @@ static void camellia_setup_tail(u32 *subkey, u32 *subL, u32 *subR, int max)
388 /* round 6 */ 388 /* round 6 */
389 subL[7] ^= subL[1]; subR[7] ^= subR[1]; 389 subL[7] ^= subL[1]; subR[7] ^= subR[1];
390 subL[1] ^= subR[1] & ~subR[9]; 390 subL[1] ^= subR[1] & ~subR[9];
391 dw = subL[1] & subL[9], 391 dw = subL[1] & subL[9];
392 subR[1] ^= rol32(dw, 1); /* modified for FLinv(kl2) */ 392 subR[1] ^= rol32(dw, 1); /* modified for FLinv(kl2) */
393 /* round 8 */ 393 /* round 8 */
394 subL[11] ^= subL[1]; subR[11] ^= subR[1]; 394 subL[11] ^= subL[1]; subR[11] ^= subR[1];
395 /* round 10 */ 395 /* round 10 */
@@ -397,8 +397,8 @@ static void camellia_setup_tail(u32 *subkey, u32 *subL, u32 *subR, int max)
397 /* round 12 */ 397 /* round 12 */
398 subL[15] ^= subL[1]; subR[15] ^= subR[1]; 398 subL[15] ^= subL[1]; subR[15] ^= subR[1];
399 subL[1] ^= subR[1] & ~subR[17]; 399 subL[1] ^= subR[1] & ~subR[17];
400 dw = subL[1] & subL[17], 400 dw = subL[1] & subL[17];
401 subR[1] ^= rol32(dw, 1); /* modified for FLinv(kl4) */ 401 subR[1] ^= rol32(dw, 1); /* modified for FLinv(kl4) */
402 /* round 14 */ 402 /* round 14 */
403 subL[19] ^= subL[1]; subR[19] ^= subR[1]; 403 subL[19] ^= subL[1]; subR[19] ^= subR[1];
404 /* round 16 */ 404 /* round 16 */
@@ -413,8 +413,8 @@ static void camellia_setup_tail(u32 *subkey, u32 *subL, u32 *subR, int max)
413 kw4l = subL[25]; kw4r = subR[25]; 413 kw4l = subL[25]; kw4r = subR[25];
414 } else { 414 } else {
415 subL[1] ^= subR[1] & ~subR[25]; 415 subL[1] ^= subR[1] & ~subR[25];
416 dw = subL[1] & subL[25], 416 dw = subL[1] & subL[25];
417 subR[1] ^= rol32(dw, 1); /* modified for FLinv(kl6) */ 417 subR[1] ^= rol32(dw, 1); /* modified for FLinv(kl6) */
418 /* round 20 */ 418 /* round 20 */
419 subL[27] ^= subL[1]; subR[27] ^= subR[1]; 419 subL[27] ^= subL[1]; subR[27] ^= subR[1];
420 /* round 22 */ 420 /* round 22 */
@@ -433,8 +433,8 @@ static void camellia_setup_tail(u32 *subkey, u32 *subL, u32 *subR, int max)
433 /* round 19 */ 433 /* round 19 */
434 subL[26] ^= kw4l; subR[26] ^= kw4r; 434 subL[26] ^= kw4l; subR[26] ^= kw4r;
435 kw4l ^= kw4r & ~subR[24]; 435 kw4l ^= kw4r & ~subR[24];
436 dw = kw4l & subL[24], 436 dw = kw4l & subL[24];
437 kw4r ^= rol32(dw, 1); /* modified for FL(kl5) */ 437 kw4r ^= rol32(dw, 1); /* modified for FL(kl5) */
438 } 438 }
439 /* round 17 */ 439 /* round 17 */
440 subL[22] ^= kw4l; subR[22] ^= kw4r; 440 subL[22] ^= kw4l; subR[22] ^= kw4r;
@@ -443,8 +443,8 @@ static void camellia_setup_tail(u32 *subkey, u32 *subL, u32 *subR, int max)
443 /* round 13 */ 443 /* round 13 */
444 subL[18] ^= kw4l; subR[18] ^= kw4r; 444 subL[18] ^= kw4l; subR[18] ^= kw4r;
445 kw4l ^= kw4r & ~subR[16]; 445 kw4l ^= kw4r & ~subR[16];
446 dw = kw4l & subL[16], 446 dw = kw4l & subL[16];
447 kw4r ^= rol32(dw, 1); /* modified for FL(kl3) */ 447 kw4r ^= rol32(dw, 1); /* modified for FL(kl3) */
448 /* round 11 */ 448 /* round 11 */
449 subL[14] ^= kw4l; subR[14] ^= kw4r; 449 subL[14] ^= kw4l; subR[14] ^= kw4r;
450 /* round 9 */ 450 /* round 9 */
@@ -452,8 +452,8 @@ static void camellia_setup_tail(u32 *subkey, u32 *subL, u32 *subR, int max)
452 /* round 7 */ 452 /* round 7 */
453 subL[10] ^= kw4l; subR[10] ^= kw4r; 453 subL[10] ^= kw4l; subR[10] ^= kw4r;
454 kw4l ^= kw4r & ~subR[8]; 454 kw4l ^= kw4r & ~subR[8];
455 dw = kw4l & subL[8], 455 dw = kw4l & subL[8];
456 kw4r ^= rol32(dw, 1); /* modified for FL(kl1) */ 456 kw4r ^= rol32(dw, 1); /* modified for FL(kl1) */
457 /* round 5 */ 457 /* round 5 */
458 subL[6] ^= kw4l; subR[6] ^= kw4r; 458 subL[6] ^= kw4l; subR[6] ^= kw4r;
459 /* round 3 */ 459 /* round 3 */
@@ -477,8 +477,8 @@ static void camellia_setup_tail(u32 *subkey, u32 *subL, u32 *subR, int max)
477 SUBKEY_L(6) = subL[5] ^ subL[7]; /* round 5 */ 477 SUBKEY_L(6) = subL[5] ^ subL[7]; /* round 5 */
478 SUBKEY_R(6) = subR[5] ^ subR[7]; 478 SUBKEY_R(6) = subR[5] ^ subR[7];
479 tl = subL[10] ^ (subR[10] & ~subR[8]); 479 tl = subL[10] ^ (subR[10] & ~subR[8]);
480 dw = tl & subL[8], /* FL(kl1) */ 480 dw = tl & subL[8]; /* FL(kl1) */
481 tr = subR[10] ^ rol32(dw, 1); 481 tr = subR[10] ^ rol32(dw, 1);
482 SUBKEY_L(7) = subL[6] ^ tl; /* round 6 */ 482 SUBKEY_L(7) = subL[6] ^ tl; /* round 6 */
483 SUBKEY_R(7) = subR[6] ^ tr; 483 SUBKEY_R(7) = subR[6] ^ tr;
484 SUBKEY_L(8) = subL[8]; /* FL(kl1) */ 484 SUBKEY_L(8) = subL[8]; /* FL(kl1) */
@@ -486,8 +486,8 @@ static void camellia_setup_tail(u32 *subkey, u32 *subL, u32 *subR, int max)
486 SUBKEY_L(9) = subL[9]; /* FLinv(kl2) */ 486 SUBKEY_L(9) = subL[9]; /* FLinv(kl2) */
487 SUBKEY_R(9) = subR[9]; 487 SUBKEY_R(9) = subR[9];
488 tl = subL[7] ^ (subR[7] & ~subR[9]); 488 tl = subL[7] ^ (subR[7] & ~subR[9]);
489 dw = tl & subL[9], /* FLinv(kl2) */ 489 dw = tl & subL[9]; /* FLinv(kl2) */
490 tr = subR[7] ^ rol32(dw, 1); 490 tr = subR[7] ^ rol32(dw, 1);
491 SUBKEY_L(10) = tl ^ subL[11]; /* round 7 */ 491 SUBKEY_L(10) = tl ^ subL[11]; /* round 7 */
492 SUBKEY_R(10) = tr ^ subR[11]; 492 SUBKEY_R(10) = tr ^ subR[11];
493 SUBKEY_L(11) = subL[10] ^ subL[12]; /* round 8 */ 493 SUBKEY_L(11) = subL[10] ^ subL[12]; /* round 8 */
@@ -499,8 +499,8 @@ static void camellia_setup_tail(u32 *subkey, u32 *subL, u32 *subR, int max)
499 SUBKEY_L(14) = subL[13] ^ subL[15]; /* round 11 */ 499 SUBKEY_L(14) = subL[13] ^ subL[15]; /* round 11 */
500 SUBKEY_R(14) = subR[13] ^ subR[15]; 500 SUBKEY_R(14) = subR[13] ^ subR[15];
501 tl = subL[18] ^ (subR[18] & ~subR[16]); 501 tl = subL[18] ^ (subR[18] & ~subR[16]);
502 dw = tl & subL[16], /* FL(kl3) */ 502 dw = tl & subL[16]; /* FL(kl3) */
503 tr = subR[18] ^ rol32(dw, 1); 503 tr = subR[18] ^ rol32(dw, 1);
504 SUBKEY_L(15) = subL[14] ^ tl; /* round 12 */ 504 SUBKEY_L(15) = subL[14] ^ tl; /* round 12 */
505 SUBKEY_R(15) = subR[14] ^ tr; 505 SUBKEY_R(15) = subR[14] ^ tr;
506 SUBKEY_L(16) = subL[16]; /* FL(kl3) */ 506 SUBKEY_L(16) = subL[16]; /* FL(kl3) */
@@ -508,8 +508,8 @@ static void camellia_setup_tail(u32 *subkey, u32 *subL, u32 *subR, int max)
508 SUBKEY_L(17) = subL[17]; /* FLinv(kl4) */ 508 SUBKEY_L(17) = subL[17]; /* FLinv(kl4) */
509 SUBKEY_R(17) = subR[17]; 509 SUBKEY_R(17) = subR[17];
510 tl = subL[15] ^ (subR[15] & ~subR[17]); 510 tl = subL[15] ^ (subR[15] & ~subR[17]);
511 dw = tl & subL[17], /* FLinv(kl4) */ 511 dw = tl & subL[17]; /* FLinv(kl4) */
512 tr = subR[15] ^ rol32(dw, 1); 512 tr = subR[15] ^ rol32(dw, 1);
513 SUBKEY_L(18) = tl ^ subL[19]; /* round 13 */ 513 SUBKEY_L(18) = tl ^ subL[19]; /* round 13 */
514 SUBKEY_R(18) = tr ^ subR[19]; 514 SUBKEY_R(18) = tr ^ subR[19];
515 SUBKEY_L(19) = subL[18] ^ subL[20]; /* round 14 */ 515 SUBKEY_L(19) = subL[18] ^ subL[20]; /* round 14 */
@@ -527,8 +527,8 @@ static void camellia_setup_tail(u32 *subkey, u32 *subL, u32 *subR, int max)
527 SUBKEY_R(24) = subR[24] ^ subR[23]; 527 SUBKEY_R(24) = subR[24] ^ subR[23];
528 } else { 528 } else {
529 tl = subL[26] ^ (subR[26] & ~subR[24]); 529 tl = subL[26] ^ (subR[26] & ~subR[24]);
530 dw = tl & subL[24], /* FL(kl5) */ 530 dw = tl & subL[24]; /* FL(kl5) */
531 tr = subR[26] ^ rol32(dw, 1); 531 tr = subR[26] ^ rol32(dw, 1);
532 SUBKEY_L(23) = subL[22] ^ tl; /* round 18 */ 532 SUBKEY_L(23) = subL[22] ^ tl; /* round 18 */
533 SUBKEY_R(23) = subR[22] ^ tr; 533 SUBKEY_R(23) = subR[22] ^ tr;
534 SUBKEY_L(24) = subL[24]; /* FL(kl5) */ 534 SUBKEY_L(24) = subL[24]; /* FL(kl5) */
@@ -536,8 +536,8 @@ static void camellia_setup_tail(u32 *subkey, u32 *subL, u32 *subR, int max)
536 SUBKEY_L(25) = subL[25]; /* FLinv(kl6) */ 536 SUBKEY_L(25) = subL[25]; /* FLinv(kl6) */
537 SUBKEY_R(25) = subR[25]; 537 SUBKEY_R(25) = subR[25];
538 tl = subL[23] ^ (subR[23] & ~subR[25]); 538 tl = subL[23] ^ (subR[23] & ~subR[25]);
539 dw = tl & subL[25], /* FLinv(kl6) */ 539 dw = tl & subL[25]; /* FLinv(kl6) */
540 tr = subR[23] ^ rol32(dw, 1); 540 tr = subR[23] ^ rol32(dw, 1);
541 SUBKEY_L(26) = tl ^ subL[27]; /* round 19 */ 541 SUBKEY_L(26) = tl ^ subL[27]; /* round 19 */
542 SUBKEY_R(26) = tr ^ subR[27]; 542 SUBKEY_R(26) = tr ^ subR[27];
543 SUBKEY_L(27) = subL[26] ^ subL[28]; /* round 20 */ 543 SUBKEY_L(27) = subL[26] ^ subL[28]; /* round 20 */