OpenCoverage

c_enc.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/libressl/src/crypto/cast/c_enc.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3void CAST_encrypt(unsigned int *data, const CAST_KEY *key)-
4 {-
5 unsigned int l,r,t;-
6 const unsigned int *k;-
7-
8 k= &(key->data[0]);-
9 l=data[0];-
10 r=data[1];-
11-
12 { unsigned int a,b,c,d; t=(k[0*2] + r)&0xffffffff; t=((((t)<<((k[0*2+1])))&0xffffffffL)|((t)>>(32-((k[0*2+1]))))); a=CAST_S_table0[(t>> 8)&0xff]; b=CAST_S_table1[(t )&0xff]; c=CAST_S_table2[(t>>24)&0xff]; d=CAST_S_table3[(t>>16)&0xff]; l^=(((((a ^ b)&0xffffffffL) - c)&0xffffffffL) + d)&0xffffffffL; };-
13 { unsigned int a,b,c,d; t=(k[1*2] ^ l)&0xffffffff; t=((((t)<<((k[1*2+1])))&0xffffffffL)|((t)>>(32-((k[1*2+1]))))); a=CAST_S_table0[(t>> 8)&0xff]; b=CAST_S_table1[(t )&0xff]; c=CAST_S_table2[(t>>24)&0xff]; d=CAST_S_table3[(t>>16)&0xff]; r^=(((((a - b)&0xffffffffL) + c)&0xffffffffL) ^ d)&0xffffffffL; };-
14 { unsigned int a,b,c,d; t=(k[2*2] - r)&0xffffffff; t=((((t)<<((k[2*2+1])))&0xffffffffL)|((t)>>(32-((k[2*2+1]))))); a=CAST_S_table0[(t>> 8)&0xff]; b=CAST_S_table1[(t )&0xff]; c=CAST_S_table2[(t>>24)&0xff]; d=CAST_S_table3[(t>>16)&0xff]; l^=(((((a + b)&0xffffffffL) ^ c)&0xffffffffL) - d)&0xffffffffL; };-
15 { unsigned int a,b,c,d; t=(k[3*2] + l)&0xffffffff; t=((((t)<<((k[3*2+1])))&0xffffffffL)|((t)>>(32-((k[3*2+1]))))); a=CAST_S_table0[(t>> 8)&0xff]; b=CAST_S_table1[(t )&0xff]; c=CAST_S_table2[(t>>24)&0xff]; d=CAST_S_table3[(t>>16)&0xff]; r^=(((((a ^ b)&0xffffffffL) - c)&0xffffffffL) + d)&0xffffffffL; };-
16 { unsigned int a,b,c,d; t=(k[4*2] ^ r)&0xffffffff; t=((((t)<<((k[4*2+1])))&0xffffffffL)|((t)>>(32-((k[4*2+1]))))); a=CAST_S_table0[(t>> 8)&0xff]; b=CAST_S_table1[(t )&0xff]; c=CAST_S_table2[(t>>24)&0xff]; d=CAST_S_table3[(t>>16)&0xff]; l^=(((((a - b)&0xffffffffL) + c)&0xffffffffL) ^ d)&0xffffffffL; };-
17 { unsigned int a,b,c,d; t=(k[5*2] - l)&0xffffffff; t=((((t)<<((k[5*2+1])))&0xffffffffL)|((t)>>(32-((k[5*2+1]))))); a=CAST_S_table0[(t>> 8)&0xff]; b=CAST_S_table1[(t )&0xff]; c=CAST_S_table2[(t>>24)&0xff]; d=CAST_S_table3[(t>>16)&0xff]; r^=(((((a + b)&0xffffffffL) ^ c)&0xffffffffL) - d)&0xffffffffL; };-
18 { unsigned int a,b,c,d; t=(k[6*2] + r)&0xffffffff; t=((((t)<<((k[6*2+1])))&0xffffffffL)|((t)>>(32-((k[6*2+1]))))); a=CAST_S_table0[(t>> 8)&0xff]; b=CAST_S_table1[(t )&0xff]; c=CAST_S_table2[(t>>24)&0xff]; d=CAST_S_table3[(t>>16)&0xff]; l^=(((((a ^ b)&0xffffffffL) - c)&0xffffffffL) + d)&0xffffffffL; };-
19 { unsigned int a,b,c,d; t=(k[7*2] ^ l)&0xffffffff; t=((((t)<<((k[7*2+1])))&0xffffffffL)|((t)>>(32-((k[7*2+1]))))); a=CAST_S_table0[(t>> 8)&0xff]; b=CAST_S_table1[(t )&0xff]; c=CAST_S_table2[(t>>24)&0xff]; d=CAST_S_table3[(t>>16)&0xff]; r^=(((((a - b)&0xffffffffL) + c)&0xffffffffL) ^ d)&0xffffffffL; };-
20 { unsigned int a,b,c,d; t=(k[8*2] - r)&0xffffffff; t=((((t)<<((k[8*2+1])))&0xffffffffL)|((t)>>(32-((k[8*2+1]))))); a=CAST_S_table0[(t>> 8)&0xff]; b=CAST_S_table1[(t )&0xff]; c=CAST_S_table2[(t>>24)&0xff]; d=CAST_S_table3[(t>>16)&0xff]; l^=(((((a + b)&0xffffffffL) ^ c)&0xffffffffL) - d)&0xffffffffL; };-
21 { unsigned int a,b,c,d; t=(k[9*2] + l)&0xffffffff; t=((((t)<<((k[9*2+1])))&0xffffffffL)|((t)>>(32-((k[9*2+1]))))); a=CAST_S_table0[(t>> 8)&0xff]; b=CAST_S_table1[(t )&0xff]; c=CAST_S_table2[(t>>24)&0xff]; d=CAST_S_table3[(t>>16)&0xff]; r^=(((((a ^ b)&0xffffffffL) - c)&0xffffffffL) + d)&0xffffffffL; };-
22 { unsigned int a,b,c,d; t=(k[10*2] ^ r)&0xffffffff; t=((((t)<<((k[10*2+1])))&0xffffffffL)|((t)>>(32-((k[10*2+1]))))); a=CAST_S_table0[(t>> 8)&0xff]; b=CAST_S_table1[(t )&0xff]; c=CAST_S_table2[(t>>24)&0xff]; d=CAST_S_table3[(t>>16)&0xff]; l^=(((((a - b)&0xffffffffL) + c)&0xffffffffL) ^ d)&0xffffffffL; };-
23 { unsigned int a,b,c,d; t=(k[11*2] - l)&0xffffffff; t=((((t)<<((k[11*2+1])))&0xffffffffL)|((t)>>(32-((k[11*2+1]))))); a=CAST_S_table0[(t>> 8)&0xff]; b=CAST_S_table1[(t )&0xff]; c=CAST_S_table2[(t>>24)&0xff]; d=CAST_S_table3[(t>>16)&0xff]; r^=(((((a + b)&0xffffffffL) ^ c)&0xffffffffL) - d)&0xffffffffL; };-
24 if(!key->short_key
!key->short_keyDescription
TRUEevaluated 4001561 times by 2 tests
Evaluated by:
  • casttest
  • libcrypto.so.44.0.1
FALSEevaluated 2 times by 1 test
Evaluated by:
  • casttest
)
2-4001561
25 {-
26 { unsigned int a,b,c,d; t=(k[12*2] + r)&0xffffffff; t=((((t)<<((k[12*2+1])))&0xffffffffL)|((t)>>(32-((k[12*2+1]))))); a=CAST_S_table0[(t>> 8)&0xff]; b=CAST_S_table1[(t )&0xff]; c=CAST_S_table2[(t>>24)&0xff]; d=CAST_S_table3[(t>>16)&0xff]; l^=(((((a ^ b)&0xffffffffL) - c)&0xffffffffL) + d)&0xffffffffL; };-
27 { unsigned int a,b,c,d; t=(k[13*2] ^ l)&0xffffffff; t=((((t)<<((k[13*2+1])))&0xffffffffL)|((t)>>(32-((k[13*2+1]))))); a=CAST_S_table0[(t>> 8)&0xff]; b=CAST_S_table1[(t )&0xff]; c=CAST_S_table2[(t>>24)&0xff]; d=CAST_S_table3[(t>>16)&0xff]; r^=(((((a - b)&0xffffffffL) + c)&0xffffffffL) ^ d)&0xffffffffL; };-
28 { unsigned int a,b,c,d; t=(k[14*2] - r)&0xffffffff; t=((((t)<<((k[14*2+1])))&0xffffffffL)|((t)>>(32-((k[14*2+1]))))); a=CAST_S_table0[(t>> 8)&0xff]; b=CAST_S_table1[(t )&0xff]; c=CAST_S_table2[(t>>24)&0xff]; d=CAST_S_table3[(t>>16)&0xff]; l^=(((((a + b)&0xffffffffL) ^ c)&0xffffffffL) - d)&0xffffffffL; };-
29 { unsigned int a,b,c,d; t=(k[15*2] + l)&0xffffffff; t=((((t)<<((k[15*2+1])))&0xffffffffL)|((t)>>(32-((k[15*2+1]))))); a=CAST_S_table0[(t>> 8)&0xff]; b=CAST_S_table1[(t )&0xff]; c=CAST_S_table2[(t>>24)&0xff]; d=CAST_S_table3[(t>>16)&0xff]; r^=(((((a ^ b)&0xffffffffL) - c)&0xffffffffL) + d)&0xffffffffL; };-
30 }
executed 4001561 times by 2 tests: end of block
Executed by:
  • casttest
  • libcrypto.so.44.0.1
4001561
31-
32 data[1]=l&0xffffffffL;-
33 data[0]=r&0xffffffffL;-
34 }
executed 4001563 times by 2 tests: end of block
Executed by:
  • casttest
  • libcrypto.so.44.0.1
4001563
35-
36void CAST_decrypt(unsigned int *data, const CAST_KEY *key)-
37 {-
38 unsigned int l,r,t;-
39 const unsigned int *k;-
40-
41 k= &(key->data[0]);-
42 l=data[0];-
43 r=data[1];-
44-
45 if(!key->short_key
!key->short_keyDescription
TRUEevaluated 673 times by 2 tests
Evaluated by:
  • casttest
  • libcrypto.so.44.0.1
FALSEevaluated 2 times by 1 test
Evaluated by:
  • casttest
)
2-673
46 {-
47 { unsigned int a,b,c,d; t=(k[15*2] + r)&0xffffffff; t=((((t)<<((k[15*2+1])))&0xffffffffL)|((t)>>(32-((k[15*2+1]))))); a=CAST_S_table0[(t>> 8)&0xff]; b=CAST_S_table1[(t )&0xff]; c=CAST_S_table2[(t>>24)&0xff]; d=CAST_S_table3[(t>>16)&0xff]; l^=(((((a ^ b)&0xffffffffL) - c)&0xffffffffL) + d)&0xffffffffL; };-
48 { unsigned int a,b,c,d; t=(k[14*2] - l)&0xffffffff; t=((((t)<<((k[14*2+1])))&0xffffffffL)|((t)>>(32-((k[14*2+1]))))); a=CAST_S_table0[(t>> 8)&0xff]; b=CAST_S_table1[(t )&0xff]; c=CAST_S_table2[(t>>24)&0xff]; d=CAST_S_table3[(t>>16)&0xff]; r^=(((((a + b)&0xffffffffL) ^ c)&0xffffffffL) - d)&0xffffffffL; };-
49 { unsigned int a,b,c,d; t=(k[13*2] ^ r)&0xffffffff; t=((((t)<<((k[13*2+1])))&0xffffffffL)|((t)>>(32-((k[13*2+1]))))); a=CAST_S_table0[(t>> 8)&0xff]; b=CAST_S_table1[(t )&0xff]; c=CAST_S_table2[(t>>24)&0xff]; d=CAST_S_table3[(t>>16)&0xff]; l^=(((((a - b)&0xffffffffL) + c)&0xffffffffL) ^ d)&0xffffffffL; };-
50 { unsigned int a,b,c,d; t=(k[12*2] + l)&0xffffffff; t=((((t)<<((k[12*2+1])))&0xffffffffL)|((t)>>(32-((k[12*2+1]))))); a=CAST_S_table0[(t>> 8)&0xff]; b=CAST_S_table1[(t )&0xff]; c=CAST_S_table2[(t>>24)&0xff]; d=CAST_S_table3[(t>>16)&0xff]; r^=(((((a ^ b)&0xffffffffL) - c)&0xffffffffL) + d)&0xffffffffL; };-
51 }
executed 673 times by 2 tests: end of block
Executed by:
  • casttest
  • libcrypto.so.44.0.1
673
52 { unsigned int a,b,c,d; t=(k[11*2] - r)&0xffffffff; t=((((t)<<((k[11*2+1])))&0xffffffffL)|((t)>>(32-((k[11*2+1]))))); a=CAST_S_table0[(t>> 8)&0xff]; b=CAST_S_table1[(t )&0xff]; c=CAST_S_table2[(t>>24)&0xff]; d=CAST_S_table3[(t>>16)&0xff]; l^=(((((a + b)&0xffffffffL) ^ c)&0xffffffffL) - d)&0xffffffffL; };-
53 { unsigned int a,b,c,d; t=(k[10*2] ^ l)&0xffffffff; t=((((t)<<((k[10*2+1])))&0xffffffffL)|((t)>>(32-((k[10*2+1]))))); a=CAST_S_table0[(t>> 8)&0xff]; b=CAST_S_table1[(t )&0xff]; c=CAST_S_table2[(t>>24)&0xff]; d=CAST_S_table3[(t>>16)&0xff]; r^=(((((a - b)&0xffffffffL) + c)&0xffffffffL) ^ d)&0xffffffffL; };-
54 { unsigned int a,b,c,d; t=(k[9*2] + r)&0xffffffff; t=((((t)<<((k[9*2+1])))&0xffffffffL)|((t)>>(32-((k[9*2+1]))))); a=CAST_S_table0[(t>> 8)&0xff]; b=CAST_S_table1[(t )&0xff]; c=CAST_S_table2[(t>>24)&0xff]; d=CAST_S_table3[(t>>16)&0xff]; l^=(((((a ^ b)&0xffffffffL) - c)&0xffffffffL) + d)&0xffffffffL; };-
55 { unsigned int a,b,c,d; t=(k[8*2] - l)&0xffffffff; t=((((t)<<((k[8*2+1])))&0xffffffffL)|((t)>>(32-((k[8*2+1]))))); a=CAST_S_table0[(t>> 8)&0xff]; b=CAST_S_table1[(t )&0xff]; c=CAST_S_table2[(t>>24)&0xff]; d=CAST_S_table3[(t>>16)&0xff]; r^=(((((a + b)&0xffffffffL) ^ c)&0xffffffffL) - d)&0xffffffffL; };-
56 { unsigned int a,b,c,d; t=(k[7*2] ^ r)&0xffffffff; t=((((t)<<((k[7*2+1])))&0xffffffffL)|((t)>>(32-((k[7*2+1]))))); a=CAST_S_table0[(t>> 8)&0xff]; b=CAST_S_table1[(t )&0xff]; c=CAST_S_table2[(t>>24)&0xff]; d=CAST_S_table3[(t>>16)&0xff]; l^=(((((a - b)&0xffffffffL) + c)&0xffffffffL) ^ d)&0xffffffffL; };-
57 { unsigned int a,b,c,d; t=(k[6*2] + l)&0xffffffff; t=((((t)<<((k[6*2+1])))&0xffffffffL)|((t)>>(32-((k[6*2+1]))))); a=CAST_S_table0[(t>> 8)&0xff]; b=CAST_S_table1[(t )&0xff]; c=CAST_S_table2[(t>>24)&0xff]; d=CAST_S_table3[(t>>16)&0xff]; r^=(((((a ^ b)&0xffffffffL) - c)&0xffffffffL) + d)&0xffffffffL; };-
58 { unsigned int a,b,c,d; t=(k[5*2] - r)&0xffffffff; t=((((t)<<((k[5*2+1])))&0xffffffffL)|((t)>>(32-((k[5*2+1]))))); a=CAST_S_table0[(t>> 8)&0xff]; b=CAST_S_table1[(t )&0xff]; c=CAST_S_table2[(t>>24)&0xff]; d=CAST_S_table3[(t>>16)&0xff]; l^=(((((a + b)&0xffffffffL) ^ c)&0xffffffffL) - d)&0xffffffffL; };-
59 { unsigned int a,b,c,d; t=(k[4*2] ^ l)&0xffffffff; t=((((t)<<((k[4*2+1])))&0xffffffffL)|((t)>>(32-((k[4*2+1]))))); a=CAST_S_table0[(t>> 8)&0xff]; b=CAST_S_table1[(t )&0xff]; c=CAST_S_table2[(t>>24)&0xff]; d=CAST_S_table3[(t>>16)&0xff]; r^=(((((a - b)&0xffffffffL) + c)&0xffffffffL) ^ d)&0xffffffffL; };-
60 { unsigned int a,b,c,d; t=(k[3*2] + r)&0xffffffff; t=((((t)<<((k[3*2+1])))&0xffffffffL)|((t)>>(32-((k[3*2+1]))))); a=CAST_S_table0[(t>> 8)&0xff]; b=CAST_S_table1[(t )&0xff]; c=CAST_S_table2[(t>>24)&0xff]; d=CAST_S_table3[(t>>16)&0xff]; l^=(((((a ^ b)&0xffffffffL) - c)&0xffffffffL) + d)&0xffffffffL; };-
61 { unsigned int a,b,c,d; t=(k[2*2] - l)&0xffffffff; t=((((t)<<((k[2*2+1])))&0xffffffffL)|((t)>>(32-((k[2*2+1]))))); a=CAST_S_table0[(t>> 8)&0xff]; b=CAST_S_table1[(t )&0xff]; c=CAST_S_table2[(t>>24)&0xff]; d=CAST_S_table3[(t>>16)&0xff]; r^=(((((a + b)&0xffffffffL) ^ c)&0xffffffffL) - d)&0xffffffffL; };-
62 { unsigned int a,b,c,d; t=(k[1*2] ^ r)&0xffffffff; t=((((t)<<((k[1*2+1])))&0xffffffffL)|((t)>>(32-((k[1*2+1]))))); a=CAST_S_table0[(t>> 8)&0xff]; b=CAST_S_table1[(t )&0xff]; c=CAST_S_table2[(t>>24)&0xff]; d=CAST_S_table3[(t>>16)&0xff]; l^=(((((a - b)&0xffffffffL) + c)&0xffffffffL) ^ d)&0xffffffffL; };-
63 { unsigned int a,b,c,d; t=(k[0*2] + l)&0xffffffff; t=((((t)<<((k[0*2+1])))&0xffffffffL)|((t)>>(32-((k[0*2+1]))))); a=CAST_S_table0[(t>> 8)&0xff]; b=CAST_S_table1[(t )&0xff]; c=CAST_S_table2[(t>>24)&0xff]; d=CAST_S_table3[(t>>16)&0xff]; r^=(((((a ^ b)&0xffffffffL) - c)&0xffffffffL) + d)&0xffffffffL; };-
64-
65 data[1]=l&0xffffffffL;-
66 data[0]=r&0xffffffffL;-
67 }
executed 675 times by 2 tests: end of block
Executed by:
  • casttest
  • libcrypto.so.44.0.1
675
68-
69-
70void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out, long length,-
71 const CAST_KEY *ks, unsigned char *iv, int enc)-
72 {-
73 unsigned int tin0,tin1;-
74 unsigned int tout0,tout1,xor0,xor1;-
75 long l=length;-
76 unsigned int tin[2];-
77-
78 if (enc
encDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • libcrypto.so.44.0.1
FALSEevaluated 4 times by 1 test
Evaluated by:
  • libcrypto.so.44.0.1
)
4-8
79 {-
80 (tout0 =((unsigned long)(*((iv)++)))<<24L, tout0|=((unsigned long)(*((iv)++)))<<16L, tout0|=((unsigned long)(*((iv)++)))<< 8L, tout0|=((unsigned long)(*((iv)++))));-
81 (tout1 =((unsigned long)(*((iv)++)))<<24L, tout1|=((unsigned long)(*((iv)++)))<<16L, tout1|=((unsigned long)(*((iv)++)))<< 8L, tout1|=((unsigned long)(*((iv)++))));-
82 iv-=8;-
83 for (l-=8; l>=0
l>=0Description
TRUEevaluated 448 times by 1 test
Evaluated by:
  • libcrypto.so.44.0.1
FALSEevaluated 8 times by 1 test
Evaluated by:
  • libcrypto.so.44.0.1
; l-=8)
8-448
84 {-
85 (tin0 =((unsigned long)(*((in)++)))<<24L, tin0|=((unsigned long)(*((in)++)))<<16L, tin0|=((unsigned long)(*((in)++)))<< 8L, tin0|=((unsigned long)(*((in)++))));-
86 (tin1 =((unsigned long)(*((in)++)))<<24L, tin1|=((unsigned long)(*((in)++)))<<16L, tin1|=((unsigned long)(*((in)++)))<< 8L, tin1|=((unsigned long)(*((in)++))));-
87 tin0^=tout0;-
88 tin1^=tout1;-
89 tin[0]=tin0;-
90 tin[1]=tin1;-
91 CAST_encrypt(tin,ks);-
92 tout0=tin[0];-
93 tout1=tin[1];-
94 (*((out)++)=(unsigned char)(((tout0)>>24L)&0xff), *((out)++)=(unsigned char)(((tout0)>>16L)&0xff), *((out)++)=(unsigned char)(((tout0)>> 8L)&0xff), *((out)++)=(unsigned char)(((tout0) )&0xff));-
95 (*((out)++)=(unsigned char)(((tout1)>>24L)&0xff), *((out)++)=(unsigned char)(((tout1)>>16L)&0xff), *((out)++)=(unsigned char)(((tout1)>> 8L)&0xff), *((out)++)=(unsigned char)(((tout1) )&0xff));-
96 }
executed 448 times by 1 test: end of block
Executed by:
  • libcrypto.so.44.0.1
448
97 if (l != -8
l != -8Description
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • libcrypto.so.44.0.1
)
0-8
98 {-
99 { in+=l+8; tin0=tin1=0; switch (l+8) { case
never executed: case 8:
8:
never executed: case 8:
tin1 =((unsigned long)(*(--(in)))) ; case
never executed: case 7:
7:
never executed: case 7:
code before this statement never executed: case 7:
tin1|=((unsigned long)(*(--(in))))<< 8; case
never executed: case 6:
6:
never executed: case 6:
code before this statement never executed: case 6:
tin1|=((unsigned long)(*(--(in))))<<16; case
never executed: case 5:
5:
never executed: case 5:
code before this statement never executed: case 5:
tin1|=((unsigned long)(*(--(in))))<<24; case
never executed: case 4:
4:
never executed: case 4:
code before this statement never executed: case 4:
tin0 =((unsigned long)(*(--(in)))) ; case
never executed: case 3:
3:
never executed: case 3:
code before this statement never executed: case 3:
tin0|=((unsigned long)(*(--(in))))<< 8; case
never executed: case 2:
2:
never executed: case 2:
code before this statement never executed: case 2:
tin0|=((unsigned long)(*(--(in))))<<16; case
never executed: case 1:
1:
never executed: case 1:
code before this statement never executed: case 1:
tin0|=((unsigned long)(*(--(in))))<<24; }
never executed: end of block
};
0
100 tin0^=tout0;-
101 tin1^=tout1;-
102 tin[0]=tin0;-
103 tin[1]=tin1;-
104 CAST_encrypt(tin,ks);-
105 tout0=tin[0];-
106 tout1=tin[1];-
107 (*((out)++)=(unsigned char)(((tout0)>>24L)&0xff), *((out)++)=(unsigned char)(((tout0)>>16L)&0xff), *((out)++)=(unsigned char)(((tout0)>> 8L)&0xff), *((out)++)=(unsigned char)(((tout0) )&0xff));-
108 (*((out)++)=(unsigned char)(((tout1)>>24L)&0xff), *((out)++)=(unsigned char)(((tout1)>>16L)&0xff), *((out)++)=(unsigned char)(((tout1)>> 8L)&0xff), *((out)++)=(unsigned char)(((tout1) )&0xff));-
109 }
never executed: end of block
0
110 (*((iv)++)=(unsigned char)(((tout0)>>24L)&0xff), *((iv)++)=(unsigned char)(((tout0)>>16L)&0xff), *((iv)++)=(unsigned char)(((tout0)>> 8L)&0xff), *((iv)++)=(unsigned char)(((tout0) )&0xff));-
111 (*((iv)++)=(unsigned char)(((tout1)>>24L)&0xff), *((iv)++)=(unsigned char)(((tout1)>>16L)&0xff), *((iv)++)=(unsigned char)(((tout1)>> 8L)&0xff), *((iv)++)=(unsigned char)(((tout1) )&0xff));-
112 }
executed 8 times by 1 test: end of block
Executed by:
  • libcrypto.so.44.0.1
8
113 else-
114 {-
115 (xor0 =((unsigned long)(*((iv)++)))<<24L, xor0|=((unsigned long)(*((iv)++)))<<16L, xor0|=((unsigned long)(*((iv)++)))<< 8L, xor0|=((unsigned long)(*((iv)++))));-
116 (xor1 =((unsigned long)(*((iv)++)))<<24L, xor1|=((unsigned long)(*((iv)++)))<<16L, xor1|=((unsigned long)(*((iv)++)))<< 8L, xor1|=((unsigned long)(*((iv)++))));-
117 iv-=8;-
118 for (l-=8; l>=0
l>=0Description
TRUEevaluated 448 times by 1 test
Evaluated by:
  • libcrypto.so.44.0.1
FALSEevaluated 4 times by 1 test
Evaluated by:
  • libcrypto.so.44.0.1
; l-=8)
4-448
119 {-
120 (tin0 =((unsigned long)(*((in)++)))<<24L, tin0|=((unsigned long)(*((in)++)))<<16L, tin0|=((unsigned long)(*((in)++)))<< 8L, tin0|=((unsigned long)(*((in)++))));-
121 (tin1 =((unsigned long)(*((in)++)))<<24L, tin1|=((unsigned long)(*((in)++)))<<16L, tin1|=((unsigned long)(*((in)++)))<< 8L, tin1|=((unsigned long)(*((in)++))));-
122 tin[0]=tin0;-
123 tin[1]=tin1;-
124 CAST_decrypt(tin,ks);-
125 tout0=tin[0]^xor0;-
126 tout1=tin[1]^xor1;-
127 (*((out)++)=(unsigned char)(((tout0)>>24L)&0xff), *((out)++)=(unsigned char)(((tout0)>>16L)&0xff), *((out)++)=(unsigned char)(((tout0)>> 8L)&0xff), *((out)++)=(unsigned char)(((tout0) )&0xff));-
128 (*((out)++)=(unsigned char)(((tout1)>>24L)&0xff), *((out)++)=(unsigned char)(((tout1)>>16L)&0xff), *((out)++)=(unsigned char)(((tout1)>> 8L)&0xff), *((out)++)=(unsigned char)(((tout1) )&0xff));-
129 xor0=tin0;-
130 xor1=tin1;-
131 }
executed 448 times by 1 test: end of block
Executed by:
  • libcrypto.so.44.0.1
448
132 if (l != -8
l != -8Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • libcrypto.so.44.0.1
)
0-4
133 {-
134 (tin0 =((unsigned long)(*((in)++)))<<24L, tin0|=((unsigned long)(*((in)++)))<<16L, tin0|=((unsigned long)(*((in)++)))<< 8L, tin0|=((unsigned long)(*((in)++))));-
135 (tin1 =((unsigned long)(*((in)++)))<<24L, tin1|=((unsigned long)(*((in)++)))<<16L, tin1|=((unsigned long)(*((in)++)))<< 8L, tin1|=((unsigned long)(*((in)++))));-
136 tin[0]=tin0;-
137 tin[1]=tin1;-
138 CAST_decrypt(tin,ks);-
139 tout0=tin[0]^xor0;-
140 tout1=tin[1]^xor1;-
141 { out+=l+8; switch (l+8) { case
never executed: case 8:
8:
never executed: case 8:
*(--(out))=(unsigned char)(((tout1) )&0xff); case
never executed: case 7:
7:
never executed: case 7:
code before this statement never executed: case 7:
*(--(out))=(unsigned char)(((tout1)>> 8)&0xff); case
never executed: case 6:
6:
never executed: case 6:
code before this statement never executed: case 6:
*(--(out))=(unsigned char)(((tout1)>>16)&0xff); case
never executed: case 5:
5:
never executed: case 5:
code before this statement never executed: case 5:
*(--(out))=(unsigned char)(((tout1)>>24)&0xff); case
never executed: case 4:
4:
never executed: case 4:
code before this statement never executed: case 4:
*(--(out))=(unsigned char)(((tout0) )&0xff); case
never executed: case 3:
3:
never executed: case 3:
code before this statement never executed: case 3:
*(--(out))=(unsigned char)(((tout0)>> 8)&0xff); case
never executed: case 2:
2:
never executed: case 2:
code before this statement never executed: case 2:
*(--(out))=(unsigned char)(((tout0)>>16)&0xff); case
never executed: case 1:
1:
never executed: case 1:
code before this statement never executed: case 1:
*(--(out))=(unsigned char)(((tout0)>>24)&0xff); }
never executed: end of block
};
0
142 xor0=tin0;-
143 xor1=tin1;-
144 }
never executed: end of block
0
145 (*((iv)++)=(unsigned char)(((xor0)>>24L)&0xff), *((iv)++)=(unsigned char)(((xor0)>>16L)&0xff), *((iv)++)=(unsigned char)(((xor0)>> 8L)&0xff), *((iv)++)=(unsigned char)(((xor0) )&0xff));-
146 (*((iv)++)=(unsigned char)(((xor1)>>24L)&0xff), *((iv)++)=(unsigned char)(((xor1)>>16L)&0xff), *((iv)++)=(unsigned char)(((xor1)>> 8L)&0xff), *((iv)++)=(unsigned char)(((xor1) )&0xff));-
147 }
executed 4 times by 1 test: end of block
Executed by:
  • libcrypto.so.44.0.1
4
148 tin0=tin1=tout0=tout1=xor0=xor1=0;-
149 tin[0]=tin[1]=0;-
150 }
executed 12 times by 1 test: end of block
Executed by:
  • libcrypto.so.44.0.1
12
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2