Branch Coverage

twofish.c
Criterion Covered Total %
branch 100 118 84.7


line true false branch
186 0 0 if (queryCnt < TAB_MIN_QUERY)
286 250 125 for (i=r=0;i<2;i++)
288 125 125 r ^= (i) ? k0 : k1; /* merge in 32 more key bits */
289 1000 250 for (j=0;j<4;j++) /* shift one byte at a time */
290 402 598 RS_rem(r);
385 615 RS_rem(r);
318 256 1 for (i=0;i<256;i++)
321 128 128 mX[0]=(BYTE) Mul_X(m1[0]);
128 128 mX[0]=(BYTE) Mul_X(m1[0]);
322 128 128 mY[0]=(BYTE) Mul_Y(m1[0]);
128 128 mY[0]=(BYTE) Mul_Y(m1[0]);
128 128 mY[0]=(BYTE) Mul_Y(m1[0]);
325 128 128 mX[1]=(BYTE) Mul_X(m1[1]);
128 128 mX[1]=(BYTE) Mul_X(m1[1]);
326 128 128 mY[1]=(BYTE) Mul_Y(m1[1]);
128 128 mY[1]=(BYTE) Mul_Y(m1[1]);
128 128 mY[1]=(BYTE) Mul_Y(m1[1]);
402 648 81 for (;r0 < r1;r0+=2,r1-=2)
493 1 40 if (needToBuildMDS) /* do this one time only */
530 125 41 for (i=0,j=k64Cnt-1;i
551 820 41 for (i=q=0;i
581 1664 13 sb128(0); sb128(1); sb128(2); sb128(3);
1664 13 sb128(0); sb128(1); sb128(2); sb128(3);
1664 13 sb128(0); sb128(1); sb128(2); sb128(3);
1664 13 sb128(0); sb128(1); sb128(2); sb128(3);
598 1664 13 sb192(0); sb192(1); sb192(2); sb192(3);
1664 13 sb192(0); sb192(1); sb192(2); sb192(3);
1664 13 sb192(0); sb192(1); sb192(2); sb192(3);
1664 13 sb192(0); sb192(1); sb192(2); sb192(3);
621 1920 15 sb256(0); sb256(1); sb256(2); sb256(3);
1920 15 sb256(0); sb256(1); sb256(2); sb256(3);
1920 15 sb256(0); sb256(1); sb256(2); sb256(3);
1920 15 sb256(0); sb256(1); sb256(2); sb256(3);
1920 15 sb256(0); sb256(1); sb256(2); sb256(3);
1920 15 sb256(0); sb256(1); sb256(2); sb256(3);
1920 15 sb256(0); sb256(1); sb256(2); sb256(3);
1920 15 sb256(0); sb256(1); sb256(2); sb256(3);
645 41 0 if (key->direction == DIR_ENCRYPT)
691 0 41 if (keyMaterial == NULL)
694 250 41 for (i=0;i
734 2 39 if ((mode != MODE_ECB) && (IV)) /* parse the IV */
0 2 if ((mode != MODE_ECB) && (IV)) /* parse the IV */
737 0 0 for (i=0;i
800 0 41 if (mode == MODE_CFB1)
803 0 0 for (n=0;n
810 0 0 for (i=BLOCK_SIZE/8-1;i>=0;i--)
822 0 41 if (key->direction != DIR_ENCRYPT)
836 2 39 if (mode == MODE_CBC)
841 43 41 for (n=0;n
888 4 39 if (mode == MODE_CBC)
897 2 39 if (mode == MODE_CBC)
957 0 41 if (cipher->mode == MODE_CFB1)
960 0 0 for (n=0;n
968 0 0 for (i=BLOCK_SIZE/8-1;i>=0;i--)
980 40 1 if (key->direction != DIR_DECRYPT)
993 2 39 if (mode == MODE_CBC)
998 43 41 for (n=0;n
1041 39 4 if (cipher->mode == MODE_ECB)
1061 2 39 if (mode == MODE_CBC) /* restore iv32 to cipher */