OpenCoverage

e_aria.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/evp/e_aria.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4typedef struct {-
5 ARIA_KEY ks;-
6} EVP_ARIA_KEY;-
7-
8-
9typedef struct {-
10 union {-
11 double align;-
12 ARIA_KEY ks;-
13 } ks;-
14 int key_set;-
15 int iv_set;-
16 GCM128_CONTEXT gcm;-
17 unsigned char *iv;-
18 int ivlen;-
19 int taglen;-
20 int iv_gen;-
21 int tls_aad_len;-
22} EVP_ARIA_GCM_CTX;-
23-
24-
25typedef struct {-
26 union {-
27 double align;-
28 ARIA_KEY ks;-
29 } ks;-
30 int key_set;-
31 int iv_set;-
32 int tag_set;-
33 int len_set;-
34 int L, M;-
35 int tls_aad_len;-
36 CCM128_CONTEXT ccm;-
37 ccm128_f str;-
38} EVP_ARIA_CCM_CTX;-
39-
40-
41static int aria_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,-
42 const unsigned char *iv, int enc)-
43{-
44 int ret;-
45 int mode = (EVP_CIPHER_flags(EVP_CIPHER_CTX_cipher(ctx)) & 0xF0007);-
46-
47 if (enc
encDescription
TRUEevaluated 318 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 318 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
|| (mode != 0x1
mode != 0x1Description
TRUEevaluated 237 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 81 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& mode != 0x2
mode != 0x2Description
TRUEevaluated 189 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 48 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
))
48-318
48 ret = aria_set_encrypt_key(key, EVP_CIPHER_CTX_key_length(ctx) * 8,
executed 507 times by 1 test: ret = aria_set_encrypt_key(key, EVP_CIPHER_CTX_key_length(ctx) * 8, EVP_CIPHER_CTX_get_cipher_data(ctx));
Executed by:
  • libcrypto.so.1.1
507
49 EVP_CIPHER_CTX_get_cipher_data(ctx));
executed 507 times by 1 test: ret = aria_set_encrypt_key(key, EVP_CIPHER_CTX_key_length(ctx) * 8, EVP_CIPHER_CTX_get_cipher_data(ctx));
Executed by:
  • libcrypto.so.1.1
507
50 else-
51 ret = aria_set_decrypt_key(key, EVP_CIPHER_CTX_key_length(ctx) * 8,
executed 129 times by 1 test: ret = aria_set_decrypt_key(key, EVP_CIPHER_CTX_key_length(ctx) * 8, EVP_CIPHER_CTX_get_cipher_data(ctx));
Executed by:
  • libcrypto.so.1.1
129
52 EVP_CIPHER_CTX_get_cipher_data(ctx));
executed 129 times by 1 test: ret = aria_set_decrypt_key(key, EVP_CIPHER_CTX_key_length(ctx) * 8, EVP_CIPHER_CTX_get_cipher_data(ctx));
Executed by:
  • libcrypto.so.1.1
129
53 if (ret < 0
ret < 0Description
TRUEnever evaluated
FALSEevaluated 636 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-636
54 ERR_put_error(6,(185),(176),__FILE__,73);-
55 return
never executed: return 0;
0;
never executed: return 0;
0
56 }-
57 return
executed 636 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 636 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
636
58}-
59-
60static void aria_cbc_encrypt(const unsigned char *in, unsigned char *out,-
61 size_t len, const ARIA_KEY *key,-
62 unsigned char *ivec, const int enc)-
63{-
64-
65 if (enc
encDescription
TRUEevaluated 306 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 240 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
240-306
66 CRYPTO_cbc128_encrypt(in, out, len, key, ivec,
executed 306 times by 1 test: CRYPTO_cbc128_encrypt(in, out, len, key, ivec, (block128_f) aria_encrypt);
Executed by:
  • libcrypto.so.1.1
306
67 (block128_f) aria_encrypt);
executed 306 times by 1 test: CRYPTO_cbc128_encrypt(in, out, len, key, ivec, (block128_f) aria_encrypt);
Executed by:
  • libcrypto.so.1.1
306
68 else-
69 CRYPTO_cbc128_decrypt(in, out, len, key, ivec,
executed 240 times by 1 test: CRYPTO_cbc128_decrypt(in, out, len, key, ivec, (block128_f) aria_encrypt);
Executed by:
  • libcrypto.so.1.1
240
70 (block128_f) aria_encrypt);
executed 240 times by 1 test: CRYPTO_cbc128_decrypt(in, out, len, key, ivec, (block128_f) aria_encrypt);
Executed by:
  • libcrypto.so.1.1
240
71}-
72-
73static void aria_cfb128_encrypt(const unsigned char *in, unsigned char *out,-
74 size_t length, const ARIA_KEY *key,-
75 unsigned char *ivec, int *num, const int enc)-
76{-
77-
78 CRYPTO_cfb128_encrypt(in, out, length, key, ivec, num, enc,-
79 (block128_f) aria_encrypt);-
80}
executed 354 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
354
81-
82static void aria_cfb1_encrypt(const unsigned char *in, unsigned char *out,-
83 size_t length, const ARIA_KEY *key,-
84 unsigned char *ivec, int *num, const int enc)-
85{-
86 CRYPTO_cfb128_1_encrypt(in, out, length, key, ivec, num, enc,-
87 (block128_f) aria_encrypt);-
88}
executed 210 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
210
89-
90static void aria_cfb8_encrypt(const unsigned char *in, unsigned char *out,-
91 size_t length, const ARIA_KEY *key,-
92 unsigned char *ivec, int *num, const int enc)-
93{-
94 CRYPTO_cfb128_8_encrypt(in, out, length, key, ivec, num, enc,-
95 (block128_f) aria_encrypt);-
96}
executed 354 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
354
97-
98static void aria_ecb_encrypt(const unsigned char *in, unsigned char *out,-
99 const ARIA_KEY *key, const int enc)-
100{-
101 aria_encrypt(in, out, key);-
102}
executed 3150 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
3150
103-
104static void aria_ofb128_encrypt(const unsigned char *in, unsigned char *out,-
105 size_t length, const ARIA_KEY *key,-
106 unsigned char *ivec, int *num)-
107{-
108 CRYPTO_ofb128_encrypt(in, out, length, key, ivec, num,-
109 (block128_f) aria_encrypt);-
110}
executed 354 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
354
111-
112static int aria_128_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { while(inl>=((size_t)1<<(sizeof(long)*8-2))
inl>=((size_t)...of(long)*8-2))Description
TRUEnever evaluated
FALSEevaluated 182 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) { aria_cbc_encrypt(in, out, (long)((size_t)1<<(sizeof(long)*8-2)), &((EVP_ARIA_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_iv_noconst(ctx), EVP_CIPHER_CTX_encrypting(ctx)); inl-=((size_t)1<<(sizeof(long)*8-2)); in +=((size_t)1<<(sizeof(long)*8-2)); out+=((size_t)1<<(sizeof(long)*8-2)); }
never executed: end of block
if (inl
inlDescription
TRUEevaluated 182 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) aria_cbc_encrypt(in, out, (long)inl, &((EVP_ARIA_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_iv_noconst(ctx), EVP_CIPHER_CTX_encrypting(ctx));
executed 182 times by 1 test: aria_cbc_encrypt(in, out, (long)inl, &((EVP_ARIA_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_iv_noconst(ctx), EVP_CIPHER_CTX_encrypting(ctx));
Executed by:
  • libcrypto.so.1.1
return
executed 182 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 182 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
} static int aria_128_cfb128_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { size_t chunk = ((size_t)1<<(sizeof(long)*8-2)); if (128 == 1
128 == 1Description
TRUEnever evaluated
FALSEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) chunk >>= 3;
never executed: chunk >>= 3;
if (inl < chunk
inl < chunkDescription
TRUEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) chunk = inl;
executed 118 times by 1 test: chunk = inl;
Executed by:
  • libcrypto.so.1.1
while (inl
inlDescription
TRUEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& inl >= chunk
inl >= chunkDescription
TRUEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) { int num = EVP_CIPHER_CTX_num(ctx); aria_cfb128_encrypt(in, out, (long) ((128 == 1) && !EVP_CIPHER_CTX_test_flags(ctx, 0x2000) ? chunk*8 : chunk), &((EVP_ARIA_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_iv_noconst(ctx), &num, EVP_CIPHER_CTX_encrypting(ctx)); EVP_CIPHER_CTX_set_num(ctx, num); inl -= chunk; in += chunk; out += chunk; if (inl < chunk
inl < chunkDescription
TRUEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) chunk = inl;
executed 118 times by 1 test: chunk = inl;
Executed by:
  • libcrypto.so.1.1
}
executed 118 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
return
executed 118 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 118 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
} static int aria_128_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { size_t i, bl; bl = EVP_CIPHER_CTX_cipher(ctx)->block_size; if (inl < bl
inl < blDescription
TRUEnever evaluated
FALSEevaluated 203 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) return
never executed: return 1;
1;
never executed: return 1;
inl -= bl; for (i=0; i <= inl
i <= inlDescription
TRUEevaluated 1050 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 203 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
; i+=bl) aria_ecb_encrypt(in + i, out + i, &((EVP_ARIA_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_encrypting(ctx));
executed 1050 times by 1 test: aria_ecb_encrypt(in + i, out + i, &((EVP_ARIA_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_encrypting(ctx));
Executed by:
  • libcrypto.so.1.1
return
executed 203 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 203 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
} static int aria_128_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { while(inl>=((size_t)1<<(sizeof(long)*8-2))
inl>=((size_t)...of(long)*8-2))Description
TRUEnever evaluated
FALSEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) { int num = EVP_CIPHER_CTX_num(ctx); aria_ofb128_encrypt(in, out, (long)((size_t)1<<(sizeof(long)*8-2)), &((EVP_ARIA_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_iv_noconst(ctx), &num); EVP_CIPHER_CTX_set_num(ctx, num); inl-=((size_t)1<<(sizeof(long)*8-2)); in +=((size_t)1<<(sizeof(long)*8-2)); out+=((size_t)1<<(sizeof(long)*8-2)); }
never executed: end of block
if (inl
inlDescription
TRUEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) { int num = EVP_CIPHER_CTX_num(ctx); aria_ofb128_encrypt(in, out, (long)inl, &((EVP_ARIA_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_iv_noconst(ctx), &num); EVP_CIPHER_CTX_set_num(ctx, num); }
executed 118 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
return
executed 118 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 118 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
} static const EVP_CIPHER aria_128_cbc = { 1066, 16, 16, 16, 0 | 0x2, aria_init_key, aria_128_cbc_cipher,
0-1050
113((void *)0)-
114, sizeof(EVP_ARIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, -
115((void *)0)-
116, -
117((void *)0) -
118}; const EVP_CIPHER *EVP_aria_128_cbc(void) { return
executed 1962 times by 1 test: return &aria_128_cbc;
Executed by:
  • libcrypto.so.1.1
&aria_128_cbc;
executed 1962 times by 1 test: return &aria_128_cbc;
Executed by:
  • libcrypto.so.1.1
} static const EVP_CIPHER aria_128_cfb128 = { 1067, 1, 16, 16, 0 | 0x3, aria_init_key, aria_128_cfb128_cipher,
1962
119((void *)0)-
120, sizeof(EVP_ARIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, -
121((void *)0)-
122, -
123((void *)0) -
124}; const EVP_CIPHER *EVP_aria_128_cfb128(void) { return
executed 1962 times by 1 test: return &aria_128_cfb128;
Executed by:
  • libcrypto.so.1.1
&aria_128_cfb128;
executed 1962 times by 1 test: return &aria_128_cfb128;
Executed by:
  • libcrypto.so.1.1
} static const EVP_CIPHER aria_128_ofb = { 1068, 1, 16, 16, 0 | 0x4, aria_init_key, aria_128_ofb_cipher,
1962
125((void *)0)-
126, sizeof(EVP_ARIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, -
127((void *)0)-
128, -
129((void *)0) -
130}; const EVP_CIPHER *EVP_aria_128_ofb(void) { return
executed 1962 times by 1 test: return &aria_128_ofb;
Executed by:
  • libcrypto.so.1.1
&aria_128_ofb;
executed 1962 times by 1 test: return &aria_128_ofb;
Executed by:
  • libcrypto.so.1.1
} static const EVP_CIPHER aria_128_ecb = { 1065, 16, 16, 0, 0 | 0x1, aria_init_key, aria_128_ecb_cipher,
1962
131((void *)0)-
132, sizeof(EVP_ARIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, -
133((void *)0)-
134, -
135((void *)0) -
136}; const EVP_CIPHER *EVP_aria_128_ecb(void) { return
executed 1962 times by 1 test: return &aria_128_ecb;
Executed by:
  • libcrypto.so.1.1
&aria_128_ecb;
executed 1962 times by 1 test: return &aria_128_ecb;
Executed by:
  • libcrypto.so.1.1
}
1962
137-
138-
139-
140-
141-
142static int aria_192_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { while(inl>=((size_t)1<<(sizeof(long)*8-2))
inl>=((size_t)...of(long)*8-2))Description
TRUEnever evaluated
FALSEevaluated 182 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) { aria_cbc_encrypt(in, out, (long)((size_t)1<<(sizeof(long)*8-2)), &((EVP_ARIA_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_iv_noconst(ctx), EVP_CIPHER_CTX_encrypting(ctx)); inl-=((size_t)1<<(sizeof(long)*8-2)); in +=((size_t)1<<(sizeof(long)*8-2)); out+=((size_t)1<<(sizeof(long)*8-2)); }
never executed: end of block
if (inl
inlDescription
TRUEevaluated 182 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) aria_cbc_encrypt(in, out, (long)inl, &((EVP_ARIA_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_iv_noconst(ctx), EVP_CIPHER_CTX_encrypting(ctx));
executed 182 times by 1 test: aria_cbc_encrypt(in, out, (long)inl, &((EVP_ARIA_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_iv_noconst(ctx), EVP_CIPHER_CTX_encrypting(ctx));
Executed by:
  • libcrypto.so.1.1
return
executed 182 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 182 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
} static int aria_192_cfb128_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { size_t chunk = ((size_t)1<<(sizeof(long)*8-2)); if (128 == 1
128 == 1Description
TRUEnever evaluated
FALSEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) chunk >>= 3;
never executed: chunk >>= 3;
if (inl < chunk
inl < chunkDescription
TRUEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) chunk = inl;
executed 118 times by 1 test: chunk = inl;
Executed by:
  • libcrypto.so.1.1
while (inl
inlDescription
TRUEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& inl >= chunk
inl >= chunkDescription
TRUEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) { int num = EVP_CIPHER_CTX_num(ctx); aria_cfb128_encrypt(in, out, (long) ((128 == 1) && !EVP_CIPHER_CTX_test_flags(ctx, 0x2000) ? chunk*8 : chunk), &((EVP_ARIA_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_iv_noconst(ctx), &num, EVP_CIPHER_CTX_encrypting(ctx)); EVP_CIPHER_CTX_set_num(ctx, num); inl -= chunk; in += chunk; out += chunk; if (inl < chunk
inl < chunkDescription
TRUEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) chunk = inl;
executed 118 times by 1 test: chunk = inl;
Executed by:
  • libcrypto.so.1.1
}
executed 118 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
return
executed 118 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 118 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
} static int aria_192_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { size_t i, bl; bl = EVP_CIPHER_CTX_cipher(ctx)->block_size; if (inl < bl
inl < blDescription
TRUEnever evaluated
FALSEevaluated 203 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) return
never executed: return 1;
1;
never executed: return 1;
inl -= bl; for (i=0; i <= inl
i <= inlDescription
TRUEevaluated 1050 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 203 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
; i+=bl) aria_ecb_encrypt(in + i, out + i, &((EVP_ARIA_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_encrypting(ctx));
executed 1050 times by 1 test: aria_ecb_encrypt(in + i, out + i, &((EVP_ARIA_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_encrypting(ctx));
Executed by:
  • libcrypto.so.1.1
return
executed 203 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 203 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
} static int aria_192_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { while(inl>=((size_t)1<<(sizeof(long)*8-2))
inl>=((size_t)...of(long)*8-2))Description
TRUEnever evaluated
FALSEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) { int num = EVP_CIPHER_CTX_num(ctx); aria_ofb128_encrypt(in, out, (long)((size_t)1<<(sizeof(long)*8-2)), &((EVP_ARIA_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_iv_noconst(ctx), &num); EVP_CIPHER_CTX_set_num(ctx, num); inl-=((size_t)1<<(sizeof(long)*8-2)); in +=((size_t)1<<(sizeof(long)*8-2)); out+=((size_t)1<<(sizeof(long)*8-2)); }
never executed: end of block
if (inl
inlDescription
TRUEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) { int num = EVP_CIPHER_CTX_num(ctx); aria_ofb128_encrypt(in, out, (long)inl, &((EVP_ARIA_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_iv_noconst(ctx), &num); EVP_CIPHER_CTX_set_num(ctx, num); }
executed 118 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
return
executed 118 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 118 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
} static const EVP_CIPHER aria_192_cbc = { 1071, 16, 24, 16, 0 | 0x2, aria_init_key, aria_192_cbc_cipher,
0-1050
143((void *)0)-
144, sizeof(EVP_ARIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, -
145((void *)0)-
146, -
147((void *)0) -
148}; const EVP_CIPHER *EVP_aria_192_cbc(void) { return
executed 1962 times by 1 test: return &aria_192_cbc;
Executed by:
  • libcrypto.so.1.1
&aria_192_cbc;
executed 1962 times by 1 test: return &aria_192_cbc;
Executed by:
  • libcrypto.so.1.1
} static const EVP_CIPHER aria_192_cfb128 = { 1072, 1, 24, 16, 0 | 0x3, aria_init_key, aria_192_cfb128_cipher,
1962
149((void *)0)-
150, sizeof(EVP_ARIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, -
151((void *)0)-
152, -
153((void *)0) -
154}; const EVP_CIPHER *EVP_aria_192_cfb128(void) { return
executed 1962 times by 1 test: return &aria_192_cfb128;
Executed by:
  • libcrypto.so.1.1
&aria_192_cfb128;
executed 1962 times by 1 test: return &aria_192_cfb128;
Executed by:
  • libcrypto.so.1.1
} static const EVP_CIPHER aria_192_ofb = { 1073, 1, 24, 16, 0 | 0x4, aria_init_key, aria_192_ofb_cipher,
1962
155((void *)0)-
156, sizeof(EVP_ARIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, -
157((void *)0)-
158, -
159((void *)0) -
160}; const EVP_CIPHER *EVP_aria_192_ofb(void) { return
executed 1962 times by 1 test: return &aria_192_ofb;
Executed by:
  • libcrypto.so.1.1
&aria_192_ofb;
executed 1962 times by 1 test: return &aria_192_ofb;
Executed by:
  • libcrypto.so.1.1
} static const EVP_CIPHER aria_192_ecb = { 1070, 16, 24, 0, 0 | 0x1, aria_init_key, aria_192_ecb_cipher,
1962
161((void *)0)-
162, sizeof(EVP_ARIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, -
163((void *)0)-
164, -
165((void *)0) -
166}; const EVP_CIPHER *EVP_aria_192_ecb(void) { return
executed 1962 times by 1 test: return &aria_192_ecb;
Executed by:
  • libcrypto.so.1.1
&aria_192_ecb;
executed 1962 times by 1 test: return &aria_192_ecb;
Executed by:
  • libcrypto.so.1.1
}
1962
167-
168-
169-
170-
171-
172static int aria_256_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { while(inl>=((size_t)1<<(sizeof(long)*8-2))
inl>=((size_t)...of(long)*8-2))Description
TRUEnever evaluated
FALSEevaluated 182 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) { aria_cbc_encrypt(in, out, (long)((size_t)1<<(sizeof(long)*8-2)), &((EVP_ARIA_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_iv_noconst(ctx), EVP_CIPHER_CTX_encrypting(ctx)); inl-=((size_t)1<<(sizeof(long)*8-2)); in +=((size_t)1<<(sizeof(long)*8-2)); out+=((size_t)1<<(sizeof(long)*8-2)); }
never executed: end of block
if (inl
inlDescription
TRUEevaluated 182 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) aria_cbc_encrypt(in, out, (long)inl, &((EVP_ARIA_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_iv_noconst(ctx), EVP_CIPHER_CTX_encrypting(ctx));
executed 182 times by 1 test: aria_cbc_encrypt(in, out, (long)inl, &((EVP_ARIA_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_iv_noconst(ctx), EVP_CIPHER_CTX_encrypting(ctx));
Executed by:
  • libcrypto.so.1.1
return
executed 182 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 182 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
} static int aria_256_cfb128_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { size_t chunk = ((size_t)1<<(sizeof(long)*8-2)); if (128 == 1
128 == 1Description
TRUEnever evaluated
FALSEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) chunk >>= 3;
never executed: chunk >>= 3;
if (inl < chunk
inl < chunkDescription
TRUEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) chunk = inl;
executed 118 times by 1 test: chunk = inl;
Executed by:
  • libcrypto.so.1.1
while (inl
inlDescription
TRUEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& inl >= chunk
inl >= chunkDescription
TRUEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) { int num = EVP_CIPHER_CTX_num(ctx); aria_cfb128_encrypt(in, out, (long) ((128 == 1) && !EVP_CIPHER_CTX_test_flags(ctx, 0x2000) ? chunk*8 : chunk), &((EVP_ARIA_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_iv_noconst(ctx), &num, EVP_CIPHER_CTX_encrypting(ctx)); EVP_CIPHER_CTX_set_num(ctx, num); inl -= chunk; in += chunk; out += chunk; if (inl < chunk
inl < chunkDescription
TRUEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) chunk = inl;
executed 118 times by 1 test: chunk = inl;
Executed by:
  • libcrypto.so.1.1
}
executed 118 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
return
executed 118 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 118 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
} static int aria_256_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { size_t i, bl; bl = EVP_CIPHER_CTX_cipher(ctx)->block_size; if (inl < bl
inl < blDescription
TRUEnever evaluated
FALSEevaluated 203 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) return
never executed: return 1;
1;
never executed: return 1;
inl -= bl; for (i=0; i <= inl
i <= inlDescription
TRUEevaluated 1050 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 203 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
; i+=bl) aria_ecb_encrypt(in + i, out + i, &((EVP_ARIA_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_encrypting(ctx));
executed 1050 times by 1 test: aria_ecb_encrypt(in + i, out + i, &((EVP_ARIA_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_encrypting(ctx));
Executed by:
  • libcrypto.so.1.1
return
executed 203 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 203 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
} static int aria_256_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { while(inl>=((size_t)1<<(sizeof(long)*8-2))
inl>=((size_t)...of(long)*8-2))Description
TRUEnever evaluated
FALSEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) { int num = EVP_CIPHER_CTX_num(ctx); aria_ofb128_encrypt(in, out, (long)((size_t)1<<(sizeof(long)*8-2)), &((EVP_ARIA_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_iv_noconst(ctx), &num); EVP_CIPHER_CTX_set_num(ctx, num); inl-=((size_t)1<<(sizeof(long)*8-2)); in +=((size_t)1<<(sizeof(long)*8-2)); out+=((size_t)1<<(sizeof(long)*8-2)); }
never executed: end of block
if (inl
inlDescription
TRUEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) { int num = EVP_CIPHER_CTX_num(ctx); aria_ofb128_encrypt(in, out, (long)inl, &((EVP_ARIA_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_iv_noconst(ctx), &num); EVP_CIPHER_CTX_set_num(ctx, num); }
executed 118 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
return
executed 118 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 118 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
} static const EVP_CIPHER aria_256_cbc = { 1076, 16, 32, 16, 0 | 0x2, aria_init_key, aria_256_cbc_cipher,
0-1050
173((void *)0)-
174, sizeof(EVP_ARIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, -
175((void *)0)-
176, -
177((void *)0) -
178}; const EVP_CIPHER *EVP_aria_256_cbc(void) { return
executed 1962 times by 1 test: return &aria_256_cbc;
Executed by:
  • libcrypto.so.1.1
&aria_256_cbc;
executed 1962 times by 1 test: return &aria_256_cbc;
Executed by:
  • libcrypto.so.1.1
} static const EVP_CIPHER aria_256_cfb128 = { 1077, 1, 32, 16, 0 | 0x3, aria_init_key, aria_256_cfb128_cipher,
1962
179((void *)0)-
180, sizeof(EVP_ARIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, -
181((void *)0)-
182, -
183((void *)0) -
184}; const EVP_CIPHER *EVP_aria_256_cfb128(void) { return
executed 1962 times by 1 test: return &aria_256_cfb128;
Executed by:
  • libcrypto.so.1.1
&aria_256_cfb128;
executed 1962 times by 1 test: return &aria_256_cfb128;
Executed by:
  • libcrypto.so.1.1
} static const EVP_CIPHER aria_256_ofb = { 1078, 1, 32, 16, 0 | 0x4, aria_init_key, aria_256_ofb_cipher,
1962
185((void *)0)-
186, sizeof(EVP_ARIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, -
187((void *)0)-
188, -
189((void *)0) -
190}; const EVP_CIPHER *EVP_aria_256_ofb(void) { return
executed 1962 times by 1 test: return &aria_256_ofb;
Executed by:
  • libcrypto.so.1.1
&aria_256_ofb;
executed 1962 times by 1 test: return &aria_256_ofb;
Executed by:
  • libcrypto.so.1.1
} static const EVP_CIPHER aria_256_ecb = { 1075, 16, 32, 0, 0 | 0x1, aria_init_key, aria_256_ecb_cipher,
1962
191((void *)0)-
192, sizeof(EVP_ARIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, -
193((void *)0)-
194, -
195((void *)0) -
196}; const EVP_CIPHER *EVP_aria_256_ecb(void) { return
executed 1962 times by 1 test: return &aria_256_ecb;
Executed by:
  • libcrypto.so.1.1
&aria_256_ecb;
executed 1962 times by 1 test: return &aria_256_ecb;
Executed by:
  • libcrypto.so.1.1
}
1962
197static int aria_128_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { size_t chunk = ((size_t)1<<(sizeof(long)*8-2)); if (1 == 1
1 == 1Description
TRUEevaluated 70 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) chunk >>= 3;
executed 70 times by 1 test: chunk >>= 3;
Executed by:
  • libcrypto.so.1.1
if (inl < chunk
inl < chunkDescription
TRUEevaluated 70 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) chunk = inl;
executed 70 times by 1 test: chunk = inl;
Executed by:
  • libcrypto.so.1.1
while (inl
inlDescription
TRUEevaluated 70 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 70 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& inl >= chunk
inl >= chunkDescription
TRUEevaluated 70 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) { int num = EVP_CIPHER_CTX_num(ctx); aria_cfb1_encrypt(in, out, (long) ((1 == 1) && !EVP_CIPHER_CTX_test_flags(ctx, 0x2000) ? chunk*8 : chunk), &((EVP_ARIA_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_iv_noconst(ctx), &num, EVP_CIPHER_CTX_encrypting(ctx)); EVP_CIPHER_CTX_set_num(ctx, num); inl -= chunk; in += chunk; out += chunk; if (inl < chunk
inl < chunkDescription
TRUEevaluated 70 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) chunk = inl;
executed 70 times by 1 test: chunk = inl;
Executed by:
  • libcrypto.so.1.1
}
executed 70 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
return
executed 70 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 70 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
} static const EVP_CIPHER aria_128_cfb1 = { 1080, 1, 128/8, 16, (0)|0x1000 | 0x3, aria_init_key, aria_128_cfb1_cipher,
0-70
198((void *)0)-
199, sizeof(EVP_ARIA_KEY), -
200((void *)0)-
201, -
202((void *)0)-
203, -
204((void *)0)-
205, -
206((void *)0) -
207}; const EVP_CIPHER *EVP_aria_128_cfb1(void) { return
executed 1962 times by 1 test: return &aria_128_cfb1;
Executed by:
  • libcrypto.so.1.1
&aria_128_cfb1;
executed 1962 times by 1 test: return &aria_128_cfb1;
Executed by:
  • libcrypto.so.1.1
}
1962
208static int aria_192_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { size_t chunk = ((size_t)1<<(sizeof(long)*8-2)); if (1 == 1
1 == 1Description
TRUEevaluated 70 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) chunk >>= 3;
executed 70 times by 1 test: chunk >>= 3;
Executed by:
  • libcrypto.so.1.1
if (inl < chunk
inl < chunkDescription
TRUEevaluated 70 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) chunk = inl;
executed 70 times by 1 test: chunk = inl;
Executed by:
  • libcrypto.so.1.1
while (inl
inlDescription
TRUEevaluated 70 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 70 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& inl >= chunk
inl >= chunkDescription
TRUEevaluated 70 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) { int num = EVP_CIPHER_CTX_num(ctx); aria_cfb1_encrypt(in, out, (long) ((1 == 1) && !EVP_CIPHER_CTX_test_flags(ctx, 0x2000) ? chunk*8 : chunk), &((EVP_ARIA_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_iv_noconst(ctx), &num, EVP_CIPHER_CTX_encrypting(ctx)); EVP_CIPHER_CTX_set_num(ctx, num); inl -= chunk; in += chunk; out += chunk; if (inl < chunk
inl < chunkDescription
TRUEevaluated 70 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) chunk = inl;
executed 70 times by 1 test: chunk = inl;
Executed by:
  • libcrypto.so.1.1
}
executed 70 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
return
executed 70 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 70 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
} static const EVP_CIPHER aria_192_cfb1 = { 1081, 1, 192/8, 16, (0)|0x1000 | 0x3, aria_init_key, aria_192_cfb1_cipher,
0-70
209((void *)0)-
210, sizeof(EVP_ARIA_KEY), -
211((void *)0)-
212, -
213((void *)0)-
214, -
215((void *)0)-
216, -
217((void *)0) -
218}; const EVP_CIPHER *EVP_aria_192_cfb1(void) { return
executed 1962 times by 1 test: return &aria_192_cfb1;
Executed by:
  • libcrypto.so.1.1
&aria_192_cfb1;
executed 1962 times by 1 test: return &aria_192_cfb1;
Executed by:
  • libcrypto.so.1.1
}
1962
219static int aria_256_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { size_t chunk = ((size_t)1<<(sizeof(long)*8-2)); if (1 == 1
1 == 1Description
TRUEevaluated 70 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) chunk >>= 3;
executed 70 times by 1 test: chunk >>= 3;
Executed by:
  • libcrypto.so.1.1
if (inl < chunk
inl < chunkDescription
TRUEevaluated 70 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) chunk = inl;
executed 70 times by 1 test: chunk = inl;
Executed by:
  • libcrypto.so.1.1
while (inl
inlDescription
TRUEevaluated 70 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 70 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& inl >= chunk
inl >= chunkDescription
TRUEevaluated 70 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) { int num = EVP_CIPHER_CTX_num(ctx); aria_cfb1_encrypt(in, out, (long) ((1 == 1) && !EVP_CIPHER_CTX_test_flags(ctx, 0x2000) ? chunk*8 : chunk), &((EVP_ARIA_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_iv_noconst(ctx), &num, EVP_CIPHER_CTX_encrypting(ctx)); EVP_CIPHER_CTX_set_num(ctx, num); inl -= chunk; in += chunk; out += chunk; if (inl < chunk
inl < chunkDescription
TRUEevaluated 70 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) chunk = inl;
executed 70 times by 1 test: chunk = inl;
Executed by:
  • libcrypto.so.1.1
}
executed 70 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
return
executed 70 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 70 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
} static const EVP_CIPHER aria_256_cfb1 = { 1082, 1, 256/8, 16, (0)|0x1000 | 0x3, aria_init_key, aria_256_cfb1_cipher,
0-70
220((void *)0)-
221, sizeof(EVP_ARIA_KEY), -
222((void *)0)-
223, -
224((void *)0)-
225, -
226((void *)0)-
227, -
228((void *)0) -
229}; const EVP_CIPHER *EVP_aria_256_cfb1(void) { return
executed 1962 times by 1 test: return &aria_256_cfb1;
Executed by:
  • libcrypto.so.1.1
&aria_256_cfb1;
executed 1962 times by 1 test: return &aria_256_cfb1;
Executed by:
  • libcrypto.so.1.1
}
1962
230static int aria_128_cfb8_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { size_t chunk = ((size_t)1<<(sizeof(long)*8-2)); if (8 == 1
8 == 1Description
TRUEnever evaluated
FALSEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) chunk >>= 3;
never executed: chunk >>= 3;
if (inl < chunk
inl < chunkDescription
TRUEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) chunk = inl;
executed 118 times by 1 test: chunk = inl;
Executed by:
  • libcrypto.so.1.1
while (inl
inlDescription
TRUEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& inl >= chunk
inl >= chunkDescription
TRUEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) { int num = EVP_CIPHER_CTX_num(ctx); aria_cfb8_encrypt(in, out, (long) ((8 == 1) && !EVP_CIPHER_CTX_test_flags(ctx, 0x2000) ? chunk*8 : chunk), &((EVP_ARIA_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_iv_noconst(ctx), &num, EVP_CIPHER_CTX_encrypting(ctx)); EVP_CIPHER_CTX_set_num(ctx, num); inl -= chunk; in += chunk; out += chunk; if (inl < chunk
inl < chunkDescription
TRUEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) chunk = inl;
executed 118 times by 1 test: chunk = inl;
Executed by:
  • libcrypto.so.1.1
}
executed 118 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
return
executed 118 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 118 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
} static const EVP_CIPHER aria_128_cfb8 = { 1083, 1, 128/8, 16, (0)|0x1000 | 0x3, aria_init_key, aria_128_cfb8_cipher,
0-118
231((void *)0)-
232, sizeof(EVP_ARIA_KEY), -
233((void *)0)-
234, -
235((void *)0)-
236, -
237((void *)0)-
238, -
239((void *)0) -
240}; const EVP_CIPHER *EVP_aria_128_cfb8(void) { return
executed 1962 times by 1 test: return &aria_128_cfb8;
Executed by:
  • libcrypto.so.1.1
&aria_128_cfb8;
executed 1962 times by 1 test: return &aria_128_cfb8;
Executed by:
  • libcrypto.so.1.1
}
1962
241static int aria_192_cfb8_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { size_t chunk = ((size_t)1<<(sizeof(long)*8-2)); if (8 == 1
8 == 1Description
TRUEnever evaluated
FALSEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) chunk >>= 3;
never executed: chunk >>= 3;
if (inl < chunk
inl < chunkDescription
TRUEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) chunk = inl;
executed 118 times by 1 test: chunk = inl;
Executed by:
  • libcrypto.so.1.1
while (inl
inlDescription
TRUEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& inl >= chunk
inl >= chunkDescription
TRUEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) { int num = EVP_CIPHER_CTX_num(ctx); aria_cfb8_encrypt(in, out, (long) ((8 == 1) && !EVP_CIPHER_CTX_test_flags(ctx, 0x2000) ? chunk*8 : chunk), &((EVP_ARIA_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_iv_noconst(ctx), &num, EVP_CIPHER_CTX_encrypting(ctx)); EVP_CIPHER_CTX_set_num(ctx, num); inl -= chunk; in += chunk; out += chunk; if (inl < chunk
inl < chunkDescription
TRUEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) chunk = inl;
executed 118 times by 1 test: chunk = inl;
Executed by:
  • libcrypto.so.1.1
}
executed 118 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
return
executed 118 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 118 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
} static const EVP_CIPHER aria_192_cfb8 = { 1084, 1, 192/8, 16, (0)|0x1000 | 0x3, aria_init_key, aria_192_cfb8_cipher,
0-118
242((void *)0)-
243, sizeof(EVP_ARIA_KEY), -
244((void *)0)-
245, -
246((void *)0)-
247, -
248((void *)0)-
249, -
250((void *)0) -
251}; const EVP_CIPHER *EVP_aria_192_cfb8(void) { return
executed 1962 times by 1 test: return &aria_192_cfb8;
Executed by:
  • libcrypto.so.1.1
&aria_192_cfb8;
executed 1962 times by 1 test: return &aria_192_cfb8;
Executed by:
  • libcrypto.so.1.1
}
1962
252static int aria_256_cfb8_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { size_t chunk = ((size_t)1<<(sizeof(long)*8-2)); if (8 == 1
8 == 1Description
TRUEnever evaluated
FALSEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) chunk >>= 3;
never executed: chunk >>= 3;
if (inl < chunk
inl < chunkDescription
TRUEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) chunk = inl;
executed 118 times by 1 test: chunk = inl;
Executed by:
  • libcrypto.so.1.1
while (inl
inlDescription
TRUEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& inl >= chunk
inl >= chunkDescription
TRUEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) { int num = EVP_CIPHER_CTX_num(ctx); aria_cfb8_encrypt(in, out, (long) ((8 == 1) && !EVP_CIPHER_CTX_test_flags(ctx, 0x2000) ? chunk*8 : chunk), &((EVP_ARIA_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_iv_noconst(ctx), &num, EVP_CIPHER_CTX_encrypting(ctx)); EVP_CIPHER_CTX_set_num(ctx, num); inl -= chunk; in += chunk; out += chunk; if (inl < chunk
inl < chunkDescription
TRUEevaluated 118 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) chunk = inl;
executed 118 times by 1 test: chunk = inl;
Executed by:
  • libcrypto.so.1.1
}
executed 118 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
return
executed 118 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 118 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
} static const EVP_CIPHER aria_256_cfb8 = { 1085, 1, 256/8, 16, (0)|0x1000 | 0x3, aria_init_key, aria_256_cfb8_cipher,
0-118
253((void *)0)-
254, sizeof(EVP_ARIA_KEY), -
255((void *)0)-
256, -
257((void *)0)-
258, -
259((void *)0)-
260, -
261((void *)0) -
262}; const EVP_CIPHER *EVP_aria_256_cfb8(void) { return
executed 1962 times by 1 test: return &aria_256_cfb8;
Executed by:
  • libcrypto.so.1.1
&aria_256_cfb8;
executed 1962 times by 1 test: return &aria_256_cfb8;
Executed by:
  • libcrypto.so.1.1
}
1962
263static int aria_ctr_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,-
264 const unsigned char *in, size_t len)-
265{-
266 unsigned int num = EVP_CIPHER_CTX_num(ctx);-
267 EVP_ARIA_KEY *dat = ((EVP_ARIA_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx));-
268-
269 CRYPTO_ctr128_encrypt(in, out, len, &dat->ks,-
270 EVP_CIPHER_CTX_iv_noconst(ctx),-
271 EVP_CIPHER_CTX_buf_noconst(ctx), &num,-
272 (block128_f) aria_encrypt);-
273 EVP_CIPHER_CTX_set_num(ctx, num);-
274 return
executed 354 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 354 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
354
275}-
276-
277static const EVP_CIPHER aria_128_ctr = { 1069,1,128/8,16, 0|0x5, aria_init_key, aria_ctr_cipher, -
278((void *)0)-
279, sizeof(EVP_ARIA_KEY), -
280((void *)0)-
281,-
282((void *)0)-
283,-
284((void *)0)-
285,-
286((void *)0) -
287}; const EVP_CIPHER *EVP_aria_128_ctr(void) { return
executed 1962 times by 1 test: return &aria_128_ctr;
Executed by:
  • libcrypto.so.1.1
&aria_128_ctr;
executed 1962 times by 1 test: return &aria_128_ctr;
Executed by:
  • libcrypto.so.1.1
}
1962
288static const EVP_CIPHER aria_192_ctr = { 1074,1,192/8,16, 0|0x5, aria_init_key, aria_ctr_cipher, -
289((void *)0)-
290, sizeof(EVP_ARIA_KEY), -
291((void *)0)-
292,-
293((void *)0)-
294,-
295((void *)0)-
296,-
297((void *)0) -
298}; const EVP_CIPHER *EVP_aria_192_ctr(void) { return
executed 1962 times by 1 test: return &aria_192_ctr;
Executed by:
  • libcrypto.so.1.1
&aria_192_ctr;
executed 1962 times by 1 test: return &aria_192_ctr;
Executed by:
  • libcrypto.so.1.1
}
1962
299static const EVP_CIPHER aria_256_ctr = { 1079,1,256/8,16, 0|0x5, aria_init_key, aria_ctr_cipher, -
300((void *)0)-
301, sizeof(EVP_ARIA_KEY), -
302((void *)0)-
303,-
304((void *)0)-
305,-
306((void *)0)-
307,-
308((void *)0) -
309}; const EVP_CIPHER *EVP_aria_256_ctr(void) { return
executed 1962 times by 1 test: return &aria_256_ctr;
Executed by:
  • libcrypto.so.1.1
&aria_256_ctr;
executed 1962 times by 1 test: return &aria_256_ctr;
Executed by:
  • libcrypto.so.1.1
}
1962
310-
311-
312-
313-
314static void ctr64_inc(unsigned char *counter)-
315{-
316 int n = 8;-
317 unsigned char c;-
318-
319 do {-
320 --n;-
321 c = counter[n];-
322 ++c;-
323 counter[n] = c;-
324 if (c
cDescription
TRUEevaluated 206 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
)
0-206
325 return;
executed 206 times by 1 test: return;
Executed by:
  • libcrypto.so.1.1
206
326 }
never executed: end of block
while (n
nDescription
TRUEnever evaluated
FALSEnever evaluated
);
0
327}
never executed: end of block
0
328-
329static int aria_gcm_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,-
330 const unsigned char *iv, int enc)-
331{-
332 int ret;-
333 EVP_ARIA_GCM_CTX *gctx = ((EVP_ARIA_GCM_CTX *)EVP_CIPHER_CTX_get_cipher_data(ctx));-
334-
335 if (!iv
!ivDescription
TRUEevaluated 207 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 48 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& !key
!keyDescription
TRUEevaluated 48 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 159 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
48-207
336 return
executed 48 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 48 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
48
337 if (key
keyDescription
TRUEevaluated 207 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) {
0-207
338 ret = aria_set_encrypt_key(key, EVP_CIPHER_CTX_key_length(ctx) * 8,-
339 &gctx->ks.ks);-
340 CRYPTO_gcm128_init(&gctx->gcm, &gctx->ks,-
341 (block128_f) aria_encrypt);-
342 if (ret < 0
ret < 0Description
TRUEnever evaluated
FALSEevaluated 207 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-207
343 ERR_put_error(6,(176),(176),__FILE__,221);-
344 return
never executed: return 0;
0;
never executed: return 0;
0
345 }-
346-
347-
348-
349-
350 if (iv ==
iv == ((void *)0)Description
TRUEevaluated 159 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 48 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
48-159
351 ((void *)0)
iv == ((void *)0)Description
TRUEevaluated 159 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 48 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
48-159
352 && gctx->iv_set
gctx->iv_setDescription
TRUEnever evaluated
FALSEevaluated 159 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-159
353 iv = gctx->iv;
never executed: iv = gctx->iv;
0
354 if (iv
ivDescription
TRUEevaluated 48 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 159 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
48-159
355 CRYPTO_gcm128_setiv(&gctx->gcm, iv, gctx->ivlen);-
356 gctx->iv_set = 1;-
357 }
executed 48 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
48
358 gctx->key_set = 1;-
359 }
executed 207 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else {
207
360-
361 if (gctx->key_set
gctx->key_setDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
362 CRYPTO_gcm128_setiv(&gctx->gcm, iv, gctx->ivlen);
never executed: CRYPTO_gcm128_setiv(&gctx->gcm, iv, gctx->ivlen);
0
363 else-
364 memcpy(gctx->iv, iv, gctx->ivlen);
never executed: memcpy(gctx->iv, iv, gctx->ivlen);
0
365 gctx->iv_set = 1;-
366 gctx->iv_gen = 0;-
367 }
never executed: end of block
0
368 return
executed 207 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 207 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
207
369}-
370-
371static int aria_gcm_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr)-
372{-
373 EVP_ARIA_GCM_CTX *gctx = ((EVP_ARIA_GCM_CTX *)EVP_CIPHER_CTX_get_cipher_data(c));-
374-
375 switch (type) {-
376 case
executed 207 times by 1 test: case 0x0:
Executed by:
  • libcrypto.so.1.1
0x0:
executed 207 times by 1 test: case 0x0:
Executed by:
  • libcrypto.so.1.1
207
377 gctx->key_set = 0;-
378 gctx->iv_set = 0;-
379 gctx->ivlen = EVP_CIPHER_CTX_iv_length(c);-
380 gctx->iv = EVP_CIPHER_CTX_iv_noconst(c);-
381 gctx->taglen = -1;-
382 gctx->iv_gen = 0;-
383 gctx->tls_aad_len = -1;-
384 return
executed 207 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 207 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
207
385-
386 case
executed 48 times by 1 test: case 0x9:
Executed by:
  • libcrypto.so.1.1
0x9:
executed 48 times by 1 test: case 0x9:
Executed by:
  • libcrypto.so.1.1
48
387 if (arg <= 0
arg <= 0Description
TRUEnever evaluated
FALSEevaluated 48 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-48
388 return
never executed: return 0;
0;
never executed: return 0;
0
389-
390 if ((
(arg > 16)Description
TRUEnever evaluated
FALSEevaluated 48 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
arg > 16)
(arg > 16)Description
TRUEnever evaluated
FALSEevaluated 48 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& (
(arg > gctx->ivlen)Description
TRUEnever evaluated
FALSEnever evaluated
arg > gctx->ivlen)
(arg > gctx->ivlen)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0-48
391 if (gctx->iv != EVP_CIPHER_CTX_iv_noconst(c)
gctx->iv != EV..._iv_noconst(c)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
392 CRYPTO_free(gctx->iv, __FILE__, 268);
never executed: CRYPTO_free(gctx->iv, __FILE__, 268);
0
393 if ((
(gctx->iv = CR...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
gctx->iv = CRYPTO_malloc(arg, __FILE__, 269)) ==
(gctx->iv = CR...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
394 ((void *)0)
(gctx->iv = CR...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
395 ) {-
396 ERR_put_error(6,(197),((1|64)),__FILE__,270);-
397 return
never executed: return 0;
0;
never executed: return 0;
0
398 }-
399 }
never executed: end of block
0
400 gctx->ivlen = arg;-
401 return
executed 48 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 48 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
48
402-
403 case
executed 24 times by 1 test: case 0x11:
Executed by:
  • libcrypto.so.1.1
0x11:
executed 24 times by 1 test: case 0x11:
Executed by:
  • libcrypto.so.1.1
24
404 if (arg <= 0
arg <= 0Description
TRUEnever evaluated
FALSEevaluated 24 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
|| arg > 16
arg > 16Description
TRUEnever evaluated
FALSEevaluated 24 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
|| EVP_CIPHER_CTX_encrypting(c)
EVP_CIPHER_CTX_encrypting(c)Description
TRUEnever evaluated
FALSEevaluated 24 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-24
405 return
never executed: return 0;
0;
never executed: return 0;
0
406 memcpy(EVP_CIPHER_CTX_buf_noconst(c), ptr, arg);-
407 gctx->taglen = arg;-
408 return
executed 24 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 24 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
24
409-
410 case
executed 24 times by 1 test: case 0x10:
Executed by:
  • libcrypto.so.1.1
0x10:
executed 24 times by 1 test: case 0x10:
Executed by:
  • libcrypto.so.1.1
24
411 if (arg <= 0
arg <= 0Description
TRUEnever evaluated
FALSEevaluated 24 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
|| arg > 16
arg > 16Description
TRUEnever evaluated
FALSEevaluated 24 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
|| !EVP_CIPHER_CTX_encrypting(c)
!EVP_CIPHER_CTX_encrypting(c)Description
TRUEnever evaluated
FALSEevaluated 24 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-24
412 || gctx->taglen < 0
gctx->taglen < 0Description
TRUEnever evaluated
FALSEevaluated 24 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-24
413 return
never executed: return 0;
0;
never executed: return 0;
0
414 memcpy(ptr, EVP_CIPHER_CTX_buf_noconst(c), arg);-
415 return
executed 24 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 24 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
24
416-
417 case
executed 159 times by 1 test: case 0x12:
Executed by:
  • libcrypto.so.1.1
0x12:
executed 159 times by 1 test: case 0x12:
Executed by:
  • libcrypto.so.1.1
159
418-
419 if (arg == -1
arg == -1Description
TRUEnever evaluated
FALSEevaluated 159 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-159
420 memcpy(gctx->iv, ptr, gctx->ivlen);-
421 gctx->iv_gen = 1;-
422 return
never executed: return 1;
1;
never executed: return 1;
0
423 }-
424-
425-
426-
427-
428 if ((
(arg < 4)Description
TRUEnever evaluated
FALSEevaluated 159 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
arg < 4)
(arg < 4)Description
TRUEnever evaluated
FALSEevaluated 159 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
|| (
(gctx->ivlen - arg) < 8Description
TRUEnever evaluated
FALSEevaluated 159 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
gctx->ivlen - arg) < 8
(gctx->ivlen - arg) < 8Description
TRUEnever evaluated
FALSEevaluated 159 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-159
429 return
never executed: return 0;
0;
never executed: return 0;
0
430 if (arg
argDescription
TRUEevaluated 159 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
)
0-159
431 memcpy(gctx->iv, ptr, arg);
executed 159 times by 1 test: memcpy(gctx->iv, ptr, arg);
Executed by:
  • libcrypto.so.1.1
159
432 if (EVP_CIPHER_CTX_encrypting(c)
EVP_CIPHER_CTX_encrypting(c)Description
TRUEevaluated 65 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 94 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
65-94
433 && RAND_bytes(gctx->iv + arg, gctx->ivlen - arg) <= 0
RAND_bytes(gct...en - arg) <= 0Description
TRUEnever evaluated
FALSEevaluated 65 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-65
434 return
never executed: return 0;
0;
never executed: return 0;
0
435 gctx->iv_gen = 1;-
436 return
executed 159 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 159 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
159
437-
438 case
executed 206 times by 1 test: case 0x13:
Executed by:
  • libcrypto.so.1.1
0x13:
executed 206 times by 1 test: case 0x13:
Executed by:
  • libcrypto.so.1.1
206
439 if (gctx->iv_gen == 0
gctx->iv_gen == 0Description
TRUEnever evaluated
FALSEevaluated 206 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
|| gctx->key_set == 0
gctx->key_set == 0Description
TRUEnever evaluated
FALSEevaluated 206 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-206
440 return
never executed: return 0;
0;
never executed: return 0;
0
441 CRYPTO_gcm128_setiv(&gctx->gcm, gctx->iv, gctx->ivlen);-
442 if (arg <= 0
arg <= 0Description
TRUEnever evaluated
FALSEevaluated 206 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
|| arg > gctx->ivlen
arg > gctx->ivlenDescription
TRUEnever evaluated
FALSEevaluated 206 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-206
443 arg = gctx->ivlen;
never executed: arg = gctx->ivlen;
0
444 memcpy(ptr, gctx->iv + gctx->ivlen - arg, arg);-
445-
446-
447-
448-
449 ctr64_inc(gctx->iv + gctx->ivlen - 8);-
450 gctx->iv_set = 1;-
451 return
executed 206 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 206 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
206
452-
453 case
executed 111 times by 1 test: case 0x18:
Executed by:
  • libcrypto.so.1.1
0x18:
executed 111 times by 1 test: case 0x18:
Executed by:
  • libcrypto.so.1.1
111
454 if (gctx->iv_gen == 0
gctx->iv_gen == 0Description
TRUEnever evaluated
FALSEevaluated 111 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
|| gctx->key_set == 0
gctx->key_set == 0Description
TRUEnever evaluated
FALSEevaluated 111 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-111
455 || EVP_CIPHER_CTX_encrypting(c)
EVP_CIPHER_CTX_encrypting(c)Description
TRUEnever evaluated
FALSEevaluated 111 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-111
456 return
never executed: return 0;
0;
never executed: return 0;
0
457 memcpy(gctx->iv + gctx->ivlen - arg, ptr, arg);-
458 CRYPTO_gcm128_setiv(&gctx->gcm, gctx->iv, gctx->ivlen);-
459 gctx->iv_set = 1;-
460 return
executed 111 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 111 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
111
461-
462 case
executed 321 times by 1 test: case 0x16:
Executed by:
  • libcrypto.so.1.1
0x16:
executed 321 times by 1 test: case 0x16:
Executed by:
  • libcrypto.so.1.1
321
463-
464 if (arg != 13
arg != 13Description
TRUEnever evaluated
FALSEevaluated 321 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-321
465 return
never executed: return 0;
0;
never executed: return 0;
0
466 memcpy(EVP_CIPHER_CTX_buf_noconst(c), ptr, arg);-
467 gctx->tls_aad_len = arg;-
468 {-
469 unsigned int len =-
470 EVP_CIPHER_CTX_buf_noconst(c)[arg - 2] << 8-
471 | EVP_CIPHER_CTX_buf_noconst(c)[arg - 1];-
472-
473 if (len < 8
len < 8Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 319 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
2-319
474 return
executed 2 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
0;
executed 2 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
2
475 len -= 8;-
476-
477 if (!EVP_CIPHER_CTX_encrypting(c)
!EVP_CIPHER_CTX_encrypting(c)Description
TRUEevaluated 113 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 206 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
113-206
478 if (len < 16
len < 16Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 111 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
2-111
479 return
executed 2 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
0;
executed 2 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
2
480 len -= 16;-
481 }
executed 111 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
111
482 EVP_CIPHER_CTX_buf_noconst(c)[arg - 2] = len >> 8;-
483 EVP_CIPHER_CTX_buf_noconst(c)[arg - 1] = len & 0xff;-
484 }-
485-
486 return
executed 317 times by 1 test: return 16;
Executed by:
  • libcrypto.so.1.1
16;
executed 317 times by 1 test: return 16;
Executed by:
  • libcrypto.so.1.1
317
487-
488 case
never executed: case 0x8:
0x8:
never executed: case 0x8:
0
489 {-
490 EVP_CIPHER_CTX *out = ptr;-
491 EVP_ARIA_GCM_CTX *gctx_out = ((EVP_ARIA_GCM_CTX *)EVP_CIPHER_CTX_get_cipher_data(out));-
492 if (gctx->gcm.key
gctx->gcm.keyDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
493 if (gctx->gcm.key != &gctx->ks
gctx->gcm.key != &gctx->ksDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
494 return
never executed: return 0;
0;
never executed: return 0;
0
495 gctx_out->gcm.key = &gctx_out->ks;-
496 }
never executed: end of block
0
497 if (gctx->iv == EVP_CIPHER_CTX_iv_noconst(c)
gctx->iv == EV..._iv_noconst(c)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
498 gctx_out->iv = EVP_CIPHER_CTX_iv_noconst(out);
never executed: gctx_out->iv = EVP_CIPHER_CTX_iv_noconst(out);
0
499 else {-
500 if ((
(gctx_out->iv ...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
gctx_out->iv = CRYPTO_malloc(gctx->ivlen, __FILE__, 374)) ==
(gctx_out->iv ...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
501 ((void *)0)
(gctx_out->iv ...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
502 ) {-
503 ERR_put_error(6,(197),((1|64)),__FILE__,375);-
504 return
never executed: return 0;
0;
never executed: return 0;
0
505 }-
506 memcpy(gctx_out->iv, gctx->iv, gctx->ivlen);-
507 }
never executed: end of block
0
508 return
never executed: return 1;
1;
never executed: return 1;
0
509 }-
510-
511 default
never executed: default:
:
never executed: default:
0
512 return
never executed: return -1;
-1;
never executed: return -1;
0
513-
514 }-
515}-
516-
517static int aria_gcm_tls_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,-
518 const unsigned char *in, size_t len)-
519{-
520 EVP_ARIA_GCM_CTX *gctx = ((EVP_ARIA_GCM_CTX *)EVP_CIPHER_CTX_get_cipher_data(ctx));-
521 int rv = -1;-
522-
523-
524 if (out != in
out != inDescription
TRUEnever evaluated
FALSEevaluated 317 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-317
525 || len < (8 + 16)
len < (8 + 16)Description
TRUEnever evaluated
FALSEevaluated 317 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-317
526 return
never executed: return -1;
-1;
never executed: return -1;
0
527-
528-
529-
530-
531 if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CIPHER_CTX_encrypting(ctx) ?
EVP_CIPHER_CTX..., 8, out) <= 0Description
TRUEnever evaluated
FALSEevaluated 317 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-317
532 0x13 : 0x18,
EVP_CIPHER_CTX..., 8, out) <= 0Description
TRUEnever evaluated
FALSEevaluated 317 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-317
533 8, out) <= 0
EVP_CIPHER_CTX..., 8, out) <= 0Description
TRUEnever evaluated
FALSEevaluated 317 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-317
534 goto
never executed: goto err;
err;
never executed: goto err;
0
535-
536 if (CRYPTO_gcm128_aad(&gctx->gcm, EVP_CIPHER_CTX_buf_noconst(ctx),
CRYPTO_gcm128_...->tls_aad_len)Description
TRUEnever evaluated
FALSEevaluated 317 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-317
537 gctx->tls_aad_len)
CRYPTO_gcm128_...->tls_aad_len)Description
TRUEnever evaluated
FALSEevaluated 317 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-317
538 goto
never executed: goto err;
err;
never executed: goto err;
0
539-
540 in += 8;-
541 out += 8;-
542 len -= 8 + 16;-
543 if (EVP_CIPHER_CTX_encrypting(ctx)
EVP_CIPHER_CTX_encrypting(ctx)Description
TRUEevaluated 206 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 111 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
111-206
544-
545 if (CRYPTO_gcm128_encrypt(&gctx->gcm, in, out, len)
CRYPTO_gcm128_... in, out, len)Description
TRUEnever evaluated
FALSEevaluated 206 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-206
546 goto
never executed: goto err;
err;
never executed: goto err;
0
547 out += len;-
548-
549 CRYPTO_gcm128_tag(&gctx->gcm, out, 16);-
550 rv = len + 8 + 16;-
551 }
executed 206 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else {
206
552-
553 if (CRYPTO_gcm128_decrypt(&gctx->gcm, in, out, len)
CRYPTO_gcm128_... in, out, len)Description
TRUEnever evaluated
FALSEevaluated 111 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-111
554 goto
never executed: goto err;
err;
never executed: goto err;
0
555-
556 CRYPTO_gcm128_tag(&gctx->gcm, EVP_CIPHER_CTX_buf_noconst(ctx),-
557 16);-
558-
559 if (CRYPTO_memcmp(EVP_CIPHER_CTX_buf_noconst(ctx), in + len,
CRYPTO_memcmp(... in + len, 16)Description
TRUEevaluated 65 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 46 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
46-65
560 16)
CRYPTO_memcmp(... in + len, 16)Description
TRUEevaluated 65 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 46 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
46-65
561 OPENSSL_cleanse(out, len);-
562 goto
executed 65 times by 1 test: goto err;
Executed by:
  • libcrypto.so.1.1
err;
executed 65 times by 1 test: goto err;
Executed by:
  • libcrypto.so.1.1
65
563 }-
564 rv = len;-
565 }
executed 46 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
46
566-
567 err:
code before this statement executed 252 times by 1 test: err:
Executed by:
  • libcrypto.so.1.1
252
568 gctx->iv_set = 0;-
569 gctx->tls_aad_len = -1;-
570 return
executed 317 times by 1 test: return rv;
Executed by:
  • libcrypto.so.1.1
rv;
executed 317 times by 1 test: return rv;
Executed by:
  • libcrypto.so.1.1
317
571}-
572-
573static int aria_gcm_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,-
574 const unsigned char *in, size_t len)-
575{-
576 EVP_ARIA_GCM_CTX *gctx = ((EVP_ARIA_GCM_CTX *)EVP_CIPHER_CTX_get_cipher_data(ctx));-
577-
578-
579 if (!gctx->key_set
!gctx->key_setDescription
TRUEnever evaluated
FALSEevaluated 557 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-557
580 return
never executed: return -1;
-1;
never executed: return -1;
0
581-
582 if (gctx->tls_aad_len >= 0
gctx->tls_aad_len >= 0Description
TRUEevaluated 317 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 240 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
240-317
583 return
executed 317 times by 1 test: return aria_gcm_tls_cipher(ctx, out, in, len);
Executed by:
  • libcrypto.so.1.1
aria_gcm_tls_cipher(ctx, out, in, len);
executed 317 times by 1 test: return aria_gcm_tls_cipher(ctx, out, in, len);
Executed by:
  • libcrypto.so.1.1
317
584-
585 if (!gctx->iv_set
!gctx->iv_setDescription
TRUEnever evaluated
FALSEevaluated 240 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-240
586 return
never executed: return -1;
-1;
never executed: return -1;
0
587 if (in
inDescription
TRUEevaluated 192 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 48 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
48-192
588 if (out ==
out == ((void *)0)Description
TRUEevaluated 96 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 96 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
96
589 ((void *)0)
out == ((void *)0)Description
TRUEevaluated 96 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 96 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
96
590 ) {-
591 if (CRYPTO_gcm128_aad(&gctx->gcm, in, len)
CRYPTO_gcm128_...>gcm, in, len)Description
TRUEnever evaluated
FALSEevaluated 96 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-96
592 return
never executed: return -1;
-1;
never executed: return -1;
0
593 }
executed 96 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else if (EVP_CIPHER_CTX_encrypting(ctx)
EVP_CIPHER_CTX_encrypting(ctx)Description
TRUEevaluated 48 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 48 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
48-96
594 if (CRYPTO_gcm128_encrypt(&gctx->gcm, in, out, len)
CRYPTO_gcm128_... in, out, len)Description
TRUEnever evaluated
FALSEevaluated 48 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-48
595 return
never executed: return -1;
-1;
never executed: return -1;
0
596 }
executed 48 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else {
48
597 if (CRYPTO_gcm128_decrypt(&gctx->gcm, in, out, len)
CRYPTO_gcm128_... in, out, len)Description
TRUEnever evaluated
FALSEevaluated 48 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-48
598 return
never executed: return -1;
-1;
never executed: return -1;
0
599 }
executed 48 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
48
600 return
executed 192 times by 1 test: return len;
Executed by:
  • libcrypto.so.1.1
len;
executed 192 times by 1 test: return len;
Executed by:
  • libcrypto.so.1.1
192
601 }-
602 if (!EVP_CIPHER_CTX_encrypting(ctx)
!EVP_CIPHER_CT...ncrypting(ctx)Description
TRUEevaluated 24 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 24 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
24
603 if (gctx->taglen < 0
gctx->taglen < 0Description
TRUEnever evaluated
FALSEevaluated 24 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-24
604 return
never executed: return -1;
-1;
never executed: return -1;
0
605 if (CRYPTO_gcm128_finish(&gctx->gcm,
CRYPTO_gcm128_...->taglen) != 0Description
TRUEnever evaluated
FALSEevaluated 24 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-24
606 EVP_CIPHER_CTX_buf_noconst(ctx),
CRYPTO_gcm128_...->taglen) != 0Description
TRUEnever evaluated
FALSEevaluated 24 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-24
607 gctx->taglen) != 0
CRYPTO_gcm128_...->taglen) != 0Description
TRUEnever evaluated
FALSEevaluated 24 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-24
608 return
never executed: return -1;
-1;
never executed: return -1;
0
609 gctx->iv_set = 0;-
610 return
executed 24 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
0;
executed 24 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
24
611 }-
612 CRYPTO_gcm128_tag(&gctx->gcm, EVP_CIPHER_CTX_buf_noconst(ctx), 16);-
613 gctx->taglen = 16;-
614-
615 gctx->iv_set = 0;-
616 return
executed 24 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
0;
executed 24 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
24
617}-
618-
619static int aria_ccm_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,-
620 const unsigned char *iv, int enc)-
621{-
622 int ret;-
623 EVP_ARIA_CCM_CTX *cctx = ((EVP_ARIA_CCM_CTX *)EVP_CIPHER_CTX_get_cipher_data(ctx));-
624-
625 if (!iv
!ivDescription
TRUEevaluated 72 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 72 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& !key
!keyDescription
TRUEevaluated 72 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
)
0-72
626 return
executed 72 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 72 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
72
627-
628 if (key
keyDescription
TRUEevaluated 72 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) {
0-72
629 ret = aria_set_encrypt_key(key, EVP_CIPHER_CTX_key_length(ctx) * 8,-
630 &cctx->ks.ks);-
631 CRYPTO_ccm128_init(&cctx->ccm, cctx->M, cctx->L,-
632 &cctx->ks, (block128_f) aria_encrypt);-
633 if (ret < 0
ret < 0Description
TRUEnever evaluated
FALSEevaluated 72 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-72
634 ERR_put_error(6,(175),(176),__FILE__,504);-
635 return
never executed: return 0;
0;
never executed: return 0;
0
636 }-
637 cctx->str = -
638 ((void *)0)-
639 ;-
640 cctx->key_set = 1;-
641 }
executed 72 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
72
642 if (iv
ivDescription
TRUEevaluated 72 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) {
0-72
643 memcpy(EVP_CIPHER_CTX_iv_noconst(ctx), iv, 15 - cctx->L);-
644 cctx->iv_set = 1;-
645 }
executed 72 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
72
646 return
executed 72 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 72 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
72
647}-
648-
649static int aria_ccm_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr)-
650{-
651 EVP_ARIA_CCM_CTX *cctx = ((EVP_ARIA_CCM_CTX *)EVP_CIPHER_CTX_get_cipher_data(c));-
652-
653 switch (type) {-
654 case
executed 72 times by 1 test: case 0x0:
Executed by:
  • libcrypto.so.1.1
0x0:
executed 72 times by 1 test: case 0x0:
Executed by:
  • libcrypto.so.1.1
72
655 cctx->key_set = 0;-
656 cctx->iv_set = 0;-
657 cctx->L = 8;-
658 cctx->M = 12;-
659 cctx->tag_set = 0;-
660 cctx->len_set = 0;-
661 cctx->tls_aad_len = -1;-
662 return
executed 72 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 72 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
72
663-
664 case
never executed: case 0x16:
0x16:
never executed: case 0x16:
0
665-
666 if (arg != 13
arg != 13Description
TRUEnever evaluated
FALSEnever evaluated
)
0
667 return
never executed: return 0;
0;
never executed: return 0;
0
668 memcpy(EVP_CIPHER_CTX_buf_noconst(c), ptr, arg);-
669 cctx->tls_aad_len = arg;-
670 {-
671 uint16_t len =-
672 EVP_CIPHER_CTX_buf_noconst(c)[arg - 2] << 8-
673 | EVP_CIPHER_CTX_buf_noconst(c)[arg - 1];-
674-
675 if (len < 8
len < 8Description
TRUEnever evaluated
FALSEnever evaluated
)
0
676 return
never executed: return 0;
0;
never executed: return 0;
0
677 len -= 8;-
678-
679 if (!EVP_CIPHER_CTX_encrypting(c)
!EVP_CIPHER_CTX_encrypting(c)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
680 if (len < cctx->M
len < cctx->MDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
681 return
never executed: return 0;
0;
never executed: return 0;
0
682 len -= cctx->M;-
683 }
never executed: end of block
0
684 EVP_CIPHER_CTX_buf_noconst(c)[arg - 2] = len >> 8;-
685 EVP_CIPHER_CTX_buf_noconst(c)[arg - 1] = len & 0xff;-
686 }-
687-
688 return
never executed: return cctx->M;
cctx->M;
never executed: return cctx->M;
0
689-
690 case
never executed: case 0x12:
0x12:
never executed: case 0x12:
0
691-
692 if (arg != 4
arg != 4Description
TRUEnever evaluated
FALSEnever evaluated
)
0
693 return
never executed: return 0;
0;
never executed: return 0;
0
694-
695 memcpy(EVP_CIPHER_CTX_iv_noconst(c), ptr, arg);-
696 return
never executed: return 1;
1;
never executed: return 1;
0
697-
698 case
executed 72 times by 1 test: case 0x9:
Executed by:
  • libcrypto.so.1.1
0x9:
executed 72 times by 1 test: case 0x9:
Executed by:
  • libcrypto.so.1.1
72
699 arg = 15 - arg;-
700-
701 case
never executed: case 0x14:
code before this statement executed 72 times by 1 test: case 0x14:
Executed by:
  • libcrypto.so.1.1
never executed: case 0x14:
0x14:
code before this statement executed 72 times by 1 test: case 0x14:
Executed by:
  • libcrypto.so.1.1
never executed: case 0x14:
0-72
702 if (arg < 2
arg < 2Description
TRUEnever evaluated
FALSEevaluated 72 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
|| arg > 8
arg > 8Description
TRUEnever evaluated
FALSEevaluated 72 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-72
703 return
never executed: return 0;
0;
never executed: return 0;
0
704 cctx->L = arg;-
705 return
executed 72 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 72 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
72
706 case
executed 72 times by 1 test: case 0x11:
Executed by:
  • libcrypto.so.1.1
0x11:
executed 72 times by 1 test: case 0x11:
Executed by:
  • libcrypto.so.1.1
72
707 if ((
(arg & 1)Description
TRUEnever evaluated
FALSEevaluated 72 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
arg & 1)
(arg & 1)Description
TRUEnever evaluated
FALSEevaluated 72 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
|| arg < 4
arg < 4Description
TRUEnever evaluated
FALSEevaluated 72 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
|| arg > 16
arg > 16Description
TRUEnever evaluated
FALSEevaluated 72 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-72
708 return
never executed: return 0;
0;
never executed: return 0;
0
709 if (EVP_CIPHER_CTX_encrypting(c)
EVP_CIPHER_CTX_encrypting(c)Description
TRUEevaluated 36 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 36 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& ptr
ptrDescription
TRUEnever evaluated
FALSEevaluated 36 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-36
710 return
never executed: return 0;
0;
never executed: return 0;
0
711 if (ptr
ptrDescription
TRUEevaluated 36 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 36 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
36
712 cctx->tag_set = 1;-
713 memcpy(EVP_CIPHER_CTX_buf_noconst(c), ptr, arg);-
714 }
executed 36 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
36
715 cctx->M = arg;-
716 return
executed 72 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 72 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
72
717-
718 case
executed 36 times by 1 test: case 0x10:
Executed by:
  • libcrypto.so.1.1
0x10:
executed 36 times by 1 test: case 0x10:
Executed by:
  • libcrypto.so.1.1
36
719 if (!EVP_CIPHER_CTX_encrypting(c)
!EVP_CIPHER_CTX_encrypting(c)Description
TRUEnever evaluated
FALSEevaluated 36 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
|| !cctx->tag_set
!cctx->tag_setDescription
TRUEnever evaluated
FALSEevaluated 36 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-36
720 return
never executed: return 0;
0;
never executed: return 0;
0
721 if (!CRYPTO_ccm128_tag(&cctx->ccm, ptr, (size_t)arg)
!CRYPTO_ccm128..., (size_t)arg)Description
TRUEnever evaluated
FALSEevaluated 36 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-36
722 return
never executed: return 0;
0;
never executed: return 0;
0
723 cctx->tag_set = 0;-
724 cctx->iv_set = 0;-
725 cctx->len_set = 0;-
726 return
executed 36 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 36 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
36
727-
728 case
never executed: case 0x8:
0x8:
never executed: case 0x8:
0
729 {-
730 EVP_CIPHER_CTX *out = ptr;-
731 EVP_ARIA_CCM_CTX *cctx_out = ((EVP_ARIA_CCM_CTX *)EVP_CIPHER_CTX_get_cipher_data(out));-
732 if (cctx->ccm.key
cctx->ccm.keyDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
733 if (cctx->ccm.key != &cctx->ks
cctx->ccm.key != &cctx->ksDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
734 return
never executed: return 0;
0;
never executed: return 0;
0
735 cctx_out->ccm.key = &cctx_out->ks;-
736 }
never executed: end of block
0
737 return
never executed: return 1;
1;
never executed: return 1;
0
738 }-
739-
740 default
never executed: default:
:
never executed: default:
0
741 return
never executed: return -1;
-1;
never executed: return -1;
0
742 }-
743}-
744-
745static int aria_ccm_tls_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,-
746 const unsigned char *in, size_t len)-
747{-
748 EVP_ARIA_CCM_CTX *cctx = ((EVP_ARIA_CCM_CTX *)EVP_CIPHER_CTX_get_cipher_data(ctx));-
749 CCM128_CONTEXT *ccm = &cctx->ccm;-
750-
751-
752 if (out != in
out != inDescription
TRUEnever evaluated
FALSEnever evaluated
|| len < (8 + (size_t)cctx->M)
len < (8 + (size_t)cctx->M)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
753 return
never executed: return -1;
-1;
never executed: return -1;
0
754-
755 if (EVP_CIPHER_CTX_encrypting(ctx)
EVP_CIPHER_CTX_encrypting(ctx)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
756 memcpy(out, EVP_CIPHER_CTX_buf_noconst(ctx),
never executed: memcpy(out, EVP_CIPHER_CTX_buf_noconst(ctx), 8);
0
757 8);
never executed: memcpy(out, EVP_CIPHER_CTX_buf_noconst(ctx), 8);
0
758-
759 memcpy(EVP_CIPHER_CTX_iv_noconst(ctx) + 4, in,-
760 8);-
761-
762 len -= 8 + cctx->M;-
763 if (CRYPTO_ccm128_setiv(ccm, EVP_CIPHER_CTX_iv_noconst(ctx), 15 - cctx->L,
CRYPTO_ccm128_... cctx->L, len)Description
TRUEnever evaluated
FALSEnever evaluated
0
764 len)
CRYPTO_ccm128_... cctx->L, len)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
765 return
never executed: return -1;
-1;
never executed: return -1;
0
766-
767 CRYPTO_ccm128_aad(ccm, EVP_CIPHER_CTX_buf_noconst(ctx), cctx->tls_aad_len);-
768-
769 in += 8;-
770 out += 8;-
771 if (EVP_CIPHER_CTX_encrypting(ctx)
EVP_CIPHER_CTX_encrypting(ctx)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
772 if (cctx->str
cctx->strDescription
TRUEnever evaluated
FALSEnever evaluated
? CRYPTO_ccm128_encrypt_ccm64(ccm, in, out, len, cctx->str)
cctx->str ? CR... in, out, len)Description
TRUEnever evaluated
FALSEnever evaluated
0
773 : CRYPTO_ccm128_encrypt(ccm, in, out, len)
cctx->str ? CR... in, out, len)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
774 return
never executed: return -1;
-1;
never executed: return -1;
0
775 if (!CRYPTO_ccm128_tag(ccm, out + len, cctx->M)
!CRYPTO_ccm128... len, cctx->M)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
776 return
never executed: return -1;
-1;
never executed: return -1;
0
777 return
never executed: return len + 8 + cctx->M;
len + 8 + cctx->M;
never executed: return len + 8 + cctx->M;
0
778 } else {-
779 if (cctx->str
cctx->strDescription
TRUEnever evaluated
FALSEnever evaluated
? !CRYPTO_ccm128_decrypt_ccm64(ccm, in, out, len, cctx->str)
cctx->str ? !C... in, out, len)Description
TRUEnever evaluated
FALSEnever evaluated
0
780 : !CRYPTO_ccm128_decrypt(ccm, in, out, len)
cctx->str ? !C... in, out, len)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
781 unsigned char tag[16];-
782 if (CRYPTO_ccm128_tag(ccm, tag, cctx->M)
CRYPTO_ccm128_... tag, cctx->M)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
783 if (!CRYPTO_memcmp(tag, in + len, cctx->M)
!CRYPTO_memcmp... len, cctx->M)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
784 return
never executed: return len;
len;
never executed: return len;
0
785 }
never executed: end of block
0
786 }
never executed: end of block
0
787 OPENSSL_cleanse(out, len);-
788 return
never executed: return -1;
-1;
never executed: return -1;
0
789 }-
790}-
791-
792static int aria_ccm_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,-
793 const unsigned char *in, size_t len)-
794{-
795 EVP_ARIA_CCM_CTX *cctx = ((EVP_ARIA_CCM_CTX *)EVP_CIPHER_CTX_get_cipher_data(ctx));-
796 CCM128_CONTEXT *ccm = &cctx->ccm;-
797-
798-
799 if (!cctx->key_set
!cctx->key_setDescription
TRUEnever evaluated
FALSEevaluated 288 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-288
800 return
never executed: return -1;
-1;
never executed: return -1;
0
801-
802 if (cctx->tls_aad_len >= 0
cctx->tls_aad_len >= 0Description
TRUEnever evaluated
FALSEevaluated 288 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-288
803 return
never executed: return aria_ccm_tls_cipher(ctx, out, in, len);
aria_ccm_tls_cipher(ctx, out, in, len);
never executed: return aria_ccm_tls_cipher(ctx, out, in, len);
0
804-
805-
806 if (in ==
in == ((void *)0)Description
TRUEevaluated 144 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 144 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
144
807 ((void *)0)
in == ((void *)0)Description
TRUEevaluated 144 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 144 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
144
808 && out !=
out != ((void *)0)Description
TRUEevaluated 72 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 72 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
72
809 ((void *)0)
out != ((void *)0)Description
TRUEevaluated 72 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 72 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
72
810 )-
811 return
executed 72 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
0;
executed 72 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
72
812-
813 if (!cctx->iv_set
!cctx->iv_setDescription
TRUEnever evaluated
FALSEevaluated 216 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-216
814 return
never executed: return -1;
-1;
never executed: return -1;
0
815-
816 if (!EVP_CIPHER_CTX_encrypting(ctx)
!EVP_CIPHER_CT...ncrypting(ctx)Description
TRUEevaluated 108 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 108 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& !cctx->tag_set
!cctx->tag_setDescription
TRUEnever evaluated
FALSEevaluated 108 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-108
817 return
never executed: return -1;
-1;
never executed: return -1;
0
818 if (!out
!outDescription
TRUEevaluated 144 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 72 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
72-144
819 if (!in
!inDescription
TRUEevaluated 72 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 72 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
72
820 if (CRYPTO_ccm128_setiv(ccm, EVP_CIPHER_CTX_iv_noconst(ctx),
CRYPTO_ccm128_... cctx->L, len)Description
TRUEnever evaluated
FALSEevaluated 72 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-72
821 15 - cctx->L, len)
CRYPTO_ccm128_... cctx->L, len)Description
TRUEnever evaluated
FALSEevaluated 72 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-72
822 return
never executed: return -1;
-1;
never executed: return -1;
0
823 cctx->len_set = 1;-
824 return
executed 72 times by 1 test: return len;
Executed by:
  • libcrypto.so.1.1
len;
executed 72 times by 1 test: return len;
Executed by:
  • libcrypto.so.1.1
72
825 }-
826-
827 if (!cctx->len_set
!cctx->len_setDescription
TRUEnever evaluated
FALSEevaluated 72 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& len
lenDescription
TRUEnever evaluated
FALSEnever evaluated
)
0-72
828 return
never executed: return -1;
-1;
never executed: return -1;
0
829 CRYPTO_ccm128_aad(ccm, in, len);-
830 return
executed 72 times by 1 test: return len;
Executed by:
  • libcrypto.so.1.1
len;
executed 72 times by 1 test: return len;
Executed by:
  • libcrypto.so.1.1
72
831 }-
832-
833 if (!cctx->len_set
!cctx->len_setDescription
TRUEnever evaluated
FALSEevaluated 72 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-72
834 if (CRYPTO_ccm128_setiv(ccm, EVP_CIPHER_CTX_iv_noconst(ctx),
CRYPTO_ccm128_... cctx->L, len)Description
TRUEnever evaluated
FALSEnever evaluated
0
835 15 - cctx->L, len)
CRYPTO_ccm128_... cctx->L, len)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
836 return
never executed: return -1;
-1;
never executed: return -1;
0
837 cctx->len_set = 1;-
838 }
never executed: end of block
0
839 if (EVP_CIPHER_CTX_encrypting(ctx)
EVP_CIPHER_CTX_encrypting(ctx)Description
TRUEevaluated 36 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 36 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
36
840 if (cctx->str
cctx->strDescription
TRUEnever evaluated
FALSEevaluated 36 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
? CRYPTO_ccm128_encrypt_ccm64(ccm, in, out, len, cctx->str)
cctx->str ? CR... in, out, len)Description
TRUEnever evaluated
FALSEevaluated 36 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-36
841 : CRYPTO_ccm128_encrypt(ccm, in, out, len)
cctx->str ? CR... in, out, len)Description
TRUEnever evaluated
FALSEevaluated 36 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-36
842 return
never executed: return -1;
-1;
never executed: return -1;
0
843 cctx->tag_set = 1;-
844 return
executed 36 times by 1 test: return len;
Executed by:
  • libcrypto.so.1.1
len;
executed 36 times by 1 test: return len;
Executed by:
  • libcrypto.so.1.1
36
845 } else {-
846 int rv = -1;-
847 if (cctx->str
cctx->strDescription
TRUEnever evaluated
FALSEevaluated 36 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
? !CRYPTO_ccm128_decrypt_ccm64(ccm, in, out, len,
cctx->str ? !C... in, out, len)Description
TRUEevaluated 36 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-36
848 cctx->str) :
cctx->str ? !C... in, out, len)Description
TRUEevaluated 36 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-36
849 !CRYPTO_ccm128_decrypt(ccm, in, out, len)
cctx->str ? !C... in, out, len)Description
TRUEevaluated 36 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) {
0-36
850 unsigned char tag[16];-
851 if (CRYPTO_ccm128_tag(ccm, tag, cctx->M)
CRYPTO_ccm128_... tag, cctx->M)Description
TRUEevaluated 36 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) {
0-36
852 if (!CRYPTO_memcmp(tag, EVP_CIPHER_CTX_buf_noconst(ctx),
!CRYPTO_memcmp...ctx), cctx->M)Description
TRUEevaluated 36 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-36
853 cctx->M)
!CRYPTO_memcmp...ctx), cctx->M)Description
TRUEevaluated 36 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
)
0-36
854 rv = len;
executed 36 times by 1 test: rv = len;
Executed by:
  • libcrypto.so.1.1
36
855 }
executed 36 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
36
856 }
executed 36 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
36
857 if (rv == -1
rv == -1Description
TRUEnever evaluated
FALSEevaluated 36 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-36
858 OPENSSL_cleanse(out, len);
never executed: OPENSSL_cleanse(out, len);
0
859 cctx->iv_set = 0;-
860 cctx->tag_set = 0;-
861 cctx->len_set = 0;-
862 return
executed 36 times by 1 test: return rv;
Executed by:
  • libcrypto.so.1.1
rv;
executed 36 times by 1 test: return rv;
Executed by:
  • libcrypto.so.1.1
36
863 }-
864}-
865static const EVP_CIPHER aria_128_gcm = { 1123, 1, 128/8, 12, (0x1000 | 0x10 | 0x100000 | 0x20 | 0x40 | 0x400 | 0x200000)|0x6, aria_gcm_init_key, aria_gcm_cipher, -
866((void *)0)-
867, sizeof(EVP_ARIA_GCM_CTX), -
868((void *)0)-
869,-
870((void *)0)-
871,aria_gcm_ctrl,-
872((void *)0) -
873}; const EVP_CIPHER *EVP_aria_128_gcm(void) { return
executed 3920 times by 1 test: return (EVP_CIPHER*)&aria_128_gcm;
Executed by:
  • libcrypto.so.1.1
(EVP_CIPHER*)&aria_128_gcm;
executed 3920 times by 1 test: return (EVP_CIPHER*)&aria_128_gcm;
Executed by:
  • libcrypto.so.1.1
}
3920
874static const EVP_CIPHER aria_192_gcm = { 1124, 1, 192/8, 12, (0x1000 | 0x10 | 0x100000 | 0x20 | 0x40 | 0x400 | 0x200000)|0x6, aria_gcm_init_key, aria_gcm_cipher, -
875((void *)0)-
876, sizeof(EVP_ARIA_GCM_CTX), -
877((void *)0)-
878,-
879((void *)0)-
880,aria_gcm_ctrl,-
881((void *)0) -
882}; const EVP_CIPHER *EVP_aria_192_gcm(void) { return
executed 1962 times by 1 test: return (EVP_CIPHER*)&aria_192_gcm;
Executed by:
  • libcrypto.so.1.1
(EVP_CIPHER*)&aria_192_gcm;
executed 1962 times by 1 test: return (EVP_CIPHER*)&aria_192_gcm;
Executed by:
  • libcrypto.so.1.1
}
1962
883static const EVP_CIPHER aria_256_gcm = { 1125, 1, 256/8, 12, (0x1000 | 0x10 | 0x100000 | 0x20 | 0x40 | 0x400 | 0x200000)|0x6, aria_gcm_init_key, aria_gcm_cipher, -
884((void *)0)-
885, sizeof(EVP_ARIA_GCM_CTX), -
886((void *)0)-
887,-
888((void *)0)-
889,aria_gcm_ctrl,-
890((void *)0) -
891}; const EVP_CIPHER *EVP_aria_256_gcm(void) { return
executed 3920 times by 1 test: return (EVP_CIPHER*)&aria_256_gcm;
Executed by:
  • libcrypto.so.1.1
(EVP_CIPHER*)&aria_256_gcm;
executed 3920 times by 1 test: return (EVP_CIPHER*)&aria_256_gcm;
Executed by:
  • libcrypto.so.1.1
}
3920
892-
893static const EVP_CIPHER aria_128_ccm = { 1120, 1, 128/8, 12, (0x1000 | 0x10 | 0x100000 | 0x20 | 0x40 | 0x400 | 0x200000)|0x7, aria_ccm_init_key, aria_ccm_cipher, -
894((void *)0)-
895, sizeof(EVP_ARIA_CCM_CTX), -
896((void *)0)-
897,-
898((void *)0)-
899,aria_ccm_ctrl,-
900((void *)0) -
901}; const EVP_CIPHER *EVP_aria_128_ccm(void) { return
executed 1962 times by 1 test: return (EVP_CIPHER*)&aria_128_ccm;
Executed by:
  • libcrypto.so.1.1
(EVP_CIPHER*)&aria_128_ccm;
executed 1962 times by 1 test: return (EVP_CIPHER*)&aria_128_ccm;
Executed by:
  • libcrypto.so.1.1
}
1962
902static const EVP_CIPHER aria_192_ccm = { 1121, 1, 192/8, 12, (0x1000 | 0x10 | 0x100000 | 0x20 | 0x40 | 0x400 | 0x200000)|0x7, aria_ccm_init_key, aria_ccm_cipher, -
903((void *)0)-
904, sizeof(EVP_ARIA_CCM_CTX), -
905((void *)0)-
906,-
907((void *)0)-
908,aria_ccm_ctrl,-
909((void *)0) -
910}; const EVP_CIPHER *EVP_aria_192_ccm(void) { return
executed 1962 times by 1 test: return (EVP_CIPHER*)&aria_192_ccm;
Executed by:
  • libcrypto.so.1.1
(EVP_CIPHER*)&aria_192_ccm;
executed 1962 times by 1 test: return (EVP_CIPHER*)&aria_192_ccm;
Executed by:
  • libcrypto.so.1.1
}
1962
911static const EVP_CIPHER aria_256_ccm = { 1122, 1, 256/8, 12, (0x1000 | 0x10 | 0x100000 | 0x20 | 0x40 | 0x400 | 0x200000)|0x7, aria_ccm_init_key, aria_ccm_cipher, -
912((void *)0)-
913, sizeof(EVP_ARIA_CCM_CTX), -
914((void *)0)-
915,-
916((void *)0)-
917,aria_ccm_ctrl,-
918((void *)0) -
919}; const EVP_CIPHER *EVP_aria_256_ccm(void) { return
executed 1962 times by 1 test: return (EVP_CIPHER*)&aria_256_ccm;
Executed by:
  • libcrypto.so.1.1
(EVP_CIPHER*)&aria_256_ccm;
executed 1962 times by 1 test: return (EVP_CIPHER*)&aria_256_ccm;
Executed by:
  • libcrypto.so.1.1
}
1962
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2