Lines Matching defs:R

117 #define	I256(R)								\
118 X0 += ks[((R) + 1) % 5]; /* inject the key schedule value */ \
119 X1 += ks[((R) + 2) % 5] + ts[((R) + 1) % 3]; \
120 X2 += ks[((R) + 3) % 5] + ts[((R) + 2) % 3]; \
121 X3 += ks[((R) + 4) % 5] + (R) + 1; \
128 #define I256(R) \
129 X0 += ks[r + (R) + 0]; /* inject the key schedule value */ \
130 X1 += ks[r + (R) + 1] + ts[r + (R) + 0]; \
131 X2 += ks[r + (R) + 2] + ts[r + (R) + 1]; \
132 X3 += ks[r + (R) + 3] + r + (R); \
133 ks[r + (R) + 4] = ks[r + (R) - 1]; /* rotate key schedule */ \
134 ts[r + (R) + 2] = ts[r + (R) - 1]; \
141 #define R256_8_rounds(R) \
142 R256(0, 1, 2, 3, R_256_0, 8 * (R) + 1); \
143 R256(0, 3, 2, 1, R_256_1, 8 * (R) + 2); \
144 R256(0, 1, 2, 3, R_256_2, 8 * (R) + 3); \
145 R256(0, 3, 2, 1, R_256_3, 8 * (R) + 4); \
146 I256(2 * (R)); \
147 R256(0, 1, 2, 3, R_256_4, 8 * (R) + 5); \
148 R256(0, 3, 2, 1, R_256_5, 8 * (R) + 6); \
149 R256(0, 1, 2, 3, R_256_6, 8 * (R) + 7); \
150 R256(0, 3, 2, 1, R_256_7, 8 * (R) + 8); \
151 I256(2 * (R) + 1);
336 #define I512(R) \
337 X0 += ks[((R) + 1) % 9]; /* inject the key schedule value */\
338 X1 += ks[((R) + 2) % 9]; \
339 X2 += ks[((R) + 3) % 9]; \
340 X3 += ks[((R) + 4) % 9]; \
341 X4 += ks[((R) + 5) % 9]; \
342 X5 += ks[((R) + 6) % 9] + ts[((R) + 1) % 3]; \
343 X6 += ks[((R) + 7) % 9] + ts[((R) + 2) % 3]; \
344 X7 += ks[((R) + 8) % 9] + (R) + 1; \
351 #define I512(R) \
352 X0 += ks[r + (R) + 0]; /* inject the key schedule value */ \
353 X1 += ks[r + (R) + 1]; \
354 X2 += ks[r + (R) + 2]; \
355 X3 += ks[r + (R) + 3]; \
356 X4 += ks[r + (R) + 4]; \
357 X5 += ks[r + (R) + 5] + ts[r + (R) + 0]; \
358 X6 += ks[r + (R) + 6] + ts[r + (R) + 1]; \
359 X7 += ks[r + (R) + 7] + r + (R); \
360 ks[r + (R)+8] = ks[r + (R) - 1]; /* rotate key schedule */\
361 ts[r + (R)+2] = ts[r + (R) - 1]; \
368 #define R512_8_rounds(R) /* do 8 full rounds */ \
369 R512(0, 1, 2, 3, 4, 5, 6, 7, R_512_0, 8 * (R) + 1); \
370 R512(2, 1, 4, 7, 6, 5, 0, 3, R_512_1, 8 * (R) + 2); \
371 R512(4, 1, 6, 3, 0, 5, 2, 7, R_512_2, 8 * (R) + 3); \
372 R512(6, 1, 0, 7, 2, 5, 4, 3, R_512_3, 8 * (R) + 4); \
373 I512(2 * (R)); \
374 R512(0, 1, 2, 3, 4, 5, 6, 7, R_512_4, 8 * (R) + 5); \
375 R512(2, 1, 4, 7, 6, 5, 0, 3, R_512_5, 8 * (R) + 6); \
376 R512(4, 1, 6, 3, 0, 5, 2, 7, R_512_6, 8 * (R) + 7); \
377 R512(6, 1, 0, 7, 2, 5, 4, 3, R_512_7, 8 * (R) + 8); \
378 I512(2*(R) + 1); /* and key injection */
601 #define I1024(R) \
602 X00 += ks[((R) + 1) % 17]; /* inject the key schedule value */\
603 X01 += ks[((R) + 2) % 17]; \
604 X02 += ks[((R) + 3) % 17]; \
605 X03 += ks[((R) + 4) % 17]; \
606 X04 += ks[((R) + 5) % 17]; \
607 X05 += ks[((R) + 6) % 17]; \
608 X06 += ks[((R) + 7) % 17]; \
609 X07 += ks[((R) + 8) % 17]; \
610 X08 += ks[((R) + 9) % 17]; \
611 X09 += ks[((R) + 10) % 17]; \
612 X10 += ks[((R) + 11) % 17]; \
613 X11 += ks[((R) + 12) % 17]; \
614 X12 += ks[((R) + 13) % 17]; \
615 X13 += ks[((R) + 14) % 17] + ts[((R) + 1) % 3]; \
616 X14 += ks[((R) + 15) % 17] + ts[((R) + 2) % 3]; \
617 X15 += ks[((R) + 16) % 17] + (R) +1; \
626 #define I1024(R) \
627 X00 += ks[r + (R) + 0]; /* inject the key schedule value */ \
628 X01 += ks[r + (R) + 1]; \
629 X02 += ks[r + (R) + 2]; \
630 X03 += ks[r + (R) + 3]; \
631 X04 += ks[r + (R) + 4]; \
632 X05 += ks[r + (R) + 5]; \
633 X06 += ks[r + (R) + 6]; \
634 X07 += ks[r + (R) + 7]; \
635 X08 += ks[r + (R) + 8]; \
636 X09 += ks[r + (R) + 9]; \
637 X10 += ks[r + (R) + 10]; \
638 X11 += ks[r + (R) + 11]; \
639 X12 += ks[r + (R) + 12]; \
640 X13 += ks[r + (R) + 13] + ts[r + (R) + 0]; \
641 X14 += ks[r + (R) + 14] + ts[r + (R) + 1]; \
642 X15 += ks[r + (R) + 15] + r + (R); \
643 ks[r + (R) + 16] = ks[r + (R) - 1]; /* rotate key schedule */\
644 ts[r + (R) + 2] = ts[r + (R) - 1]; \
651 #define R1024_8_rounds(R) /* do 8 full rounds */ \
653 14, 15, R1024_0, 8 * (R) + 1); \
655 08, 01, R1024_1, 8 * (R) + 2); \
657 10, 09, R1024_2, 8 * (R) + 3); \
659 12, 07, R1024_3, 8 * (R) + 4); \
660 I1024(2 * (R)); \
662 14, 15, R1024_4, 8 * (R) + 5); \
664 08, 01, R1024_5, 8 * (R) + 6); \
666 10, 09, R1024_6, 8 * (R) + 7); \
668 12, 07, R1024_7, 8 * (R) + 8); \
669 I1024(2 * (R) + 1);