OpenCoverage

e_chacha.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/libressl/src/crypto/evp/e_chacha.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7static int chacha_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,-
8 const unsigned char *in, size_t len);-
9static int chacha_init(EVP_CIPHER_CTX *ctx, const unsigned char *key,-
10 const unsigned char *iv, int enc);-
11-
12static const EVP_CIPHER chacha20_cipher = {-
13 .nid = 937,-
14 .block_size = 1,-
15 .key_len = 32,-
16 .iv_len = 8,-
17 .flags = 0x0,-
18 .init = chacha_init,-
19 .do_cipher = chacha_cipher,-
20 .ctx_size = sizeof(ChaCha_ctx)-
21};-
22-
23const EVP_CIPHER *-
24EVP_chacha20(void)-
25{-
26 return
executed 292 times by 33 tests: return (&chacha20_cipher);
Executed by:
  • asn1test
  • base64test
  • bnaddsub
  • bntest
  • cipher_list
  • cipherstest
  • clienttest
  • configtest
  • dhtest
  • dsatest
  • ecdhtest
  • ecdsatest
  • ectest
  • enginetest
  • evptest
  • exptest
  • gost2814789t
  • hkdftest
  • keypairtest
  • libcrypto.so.44.0.1
  • mont
  • pbkdf2
  • pkcs7test
  • rc4test
  • rsa_test
  • ...
(&chacha20_cipher);
executed 292 times by 33 tests: return (&chacha20_cipher);
Executed by:
  • asn1test
  • base64test
  • bnaddsub
  • bntest
  • cipher_list
  • cipherstest
  • clienttest
  • configtest
  • dhtest
  • dsatest
  • ecdhtest
  • ecdsatest
  • ectest
  • enginetest
  • evptest
  • exptest
  • gost2814789t
  • hkdftest
  • keypairtest
  • libcrypto.so.44.0.1
  • mont
  • pbkdf2
  • pkcs7test
  • rc4test
  • rsa_test
  • ...
292
27}-
28-
29static int-
30chacha_init(EVP_CIPHER_CTX *ctx, const unsigned char *key,-
31 const unsigned char *iv, int enc)-
32{-
33 ChaCha_set_key((ChaCha_ctx *)ctx->cipher_data, key,-
34 EVP_CIPHER_CTX_key_length(ctx) * 8);-
35 if (iv !=
iv != ((void *)0)Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • evptest
FALSEnever evaluated
0-8
36 ((void *)0)
iv != ((void *)0)Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • evptest
FALSEnever evaluated
0-8
37 )-
38 ChaCha_set_iv((ChaCha_ctx *)ctx->cipher_data, iv,
executed 8 times by 1 test: ChaCha_set_iv((ChaCha_ctx *)ctx->cipher_data, iv, ((void *)0) );
Executed by:
  • evptest
8
39 ((void *)0)
executed 8 times by 1 test: ChaCha_set_iv((ChaCha_ctx *)ctx->cipher_data, iv, ((void *)0) );
Executed by:
  • evptest
8
40 );
executed 8 times by 1 test: ChaCha_set_iv((ChaCha_ctx *)ctx->cipher_data, iv, ((void *)0) );
Executed by:
  • evptest
8
41 return
executed 8 times by 1 test: return 1;
Executed by:
  • evptest
1;
executed 8 times by 1 test: return 1;
Executed by:
  • evptest
8
42}-
43-
44static int-
45chacha_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in,-
46 size_t len)-
47{-
48 ChaCha((ChaCha_ctx *)ctx->cipher_data, out, in, len);-
49 return
executed 8 times by 1 test: return 1;
Executed by:
  • evptest
1;
executed 8 times by 1 test: return 1;
Executed by:
  • evptest
8
50}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2