Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/libressl/src/crypto/evp/e_camellia.c |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5 | static int camellia_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6 | const unsigned char *iv, int enc); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
7 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
8 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
9 | typedef struct { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
10 | CAMELLIA_KEY ks; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
11 | } EVP_CAMELLIA_KEY; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
12 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
13 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
14 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
15 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
16 | static int camellia_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))
never executed: if (inlend of block
executed 38 times by 2 tests: returnCamellia_cbc_encrypt(in, out, (long)inl, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encrypt); Executed by:
executed 38 times by 2 tests: 1;return 1; Executed by:
executed 38 times by 2 tests: } static int camellia_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==1return 1; Executed by:
never executed: if (inl<chunkchunk>>=3;
executed 8 times by 1 test: while(inlchunk=inl; Executed by:
executed 8 times by 1 test: }chunk=inl; Executed by:
executed 8 times by 1 test: returnend of block Executed by:
executed 8 times by 1 test: 1;return 1; Executed by:
executed 8 times by 1 test: } static int camellia_128_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { size_t i, bl; bl = ctx->cipher->block_size; if(inl < blreturn 1; Executed by:
never executed: 1;return 1; never executed: inl -= bl; for(i=0; i <= inlreturn 1;
executed 11 times by 1 test: returnCamellia_ecb_encrypt(in + i, out + i, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->encrypt); Executed by:
executed 11 times by 1 test: 1;return 1; Executed by:
executed 11 times by 1 test: } static int camellia_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))return 1; Executed by:
never executed: if (inlend of block
executed 8 times by 1 test: returnCamellia_ofb128_encrypt(in, out, (long)inl, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num); Executed by:
executed 8 times by 1 test: 1;return 1; Executed by:
executed 8 times by 1 test: } static const EVP_CIPHER camellia_128_cbc = { 751, 16, 16, 16, 0 | 0x2, camellia_init_key, camellia_128_cbc_cipher, return 1; Executed by:
| 0-38 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
17 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
18 | , sizeof(EVP_CAMELLIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
19 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
20 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
21 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
22 | }; const EVP_CIPHER *EVP_camellia_128_cbc(void) { return executed 625 times by 33 tests: &camellia_128_cbc;return &camellia_128_cbc; Executed by:
executed 625 times by 33 tests: } static const EVP_CIPHER camellia_128_cfb128 = { 757, 1, 16, 16, 0 | 0x3, camellia_init_key, camellia_128_cfb128_cipher, return &camellia_128_cbc; Executed by:
| 625 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
23 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
24 | , sizeof(EVP_CAMELLIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
25 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
26 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
27 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
28 | }; const EVP_CIPHER *EVP_camellia_128_cfb128(void) { return executed 292 times by 33 tests: &camellia_128_cfb128;return &camellia_128_cfb128; Executed by:
executed 292 times by 33 tests: } static const EVP_CIPHER camellia_128_ofb = { 766, 1, 16, 16, 0 | 0x4, camellia_init_key, camellia_128_ofb_cipher, return &camellia_128_cfb128; Executed by:
| 292 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
29 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
30 | , sizeof(EVP_CAMELLIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
31 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
32 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
34 | }; const EVP_CIPHER *EVP_camellia_128_ofb(void) { return executed 292 times by 33 tests: &camellia_128_ofb;return &camellia_128_ofb; Executed by:
executed 292 times by 33 tests: } static const EVP_CIPHER camellia_128_ecb = { 754, 16, 16, 0, 0 | 0x1, camellia_init_key, camellia_128_ecb_cipher, return &camellia_128_ofb; Executed by:
| 292 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
35 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
36 | , sizeof(EVP_CAMELLIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
37 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
38 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
39 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
40 | }; const EVP_CIPHER *EVP_camellia_128_ecb(void) { return executed 292 times by 33 tests: &camellia_128_ecb;return &camellia_128_ecb; Executed by:
executed 292 times by 33 tests: }return &camellia_128_ecb; Executed by:
| 292 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
41 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
42 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
43 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
44 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
45 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
46 | static int camellia_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))
never executed: if (inlend of block
executed 8 times by 1 test: returnCamellia_cbc_encrypt(in, out, (long)inl, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encrypt); Executed by:
executed 8 times by 1 test: 1;return 1; Executed by:
executed 8 times by 1 test: } static int camellia_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==1return 1; Executed by:
never executed: if (inl<chunkchunk>>=3;
executed 8 times by 1 test: while(inlchunk=inl; Executed by:
executed 8 times by 1 test: }chunk=inl; Executed by:
executed 8 times by 1 test: returnend of block Executed by:
executed 8 times by 1 test: 1;return 1; Executed by:
executed 8 times by 1 test: } static int camellia_192_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { size_t i, bl; bl = ctx->cipher->block_size; if(inl < blreturn 1; Executed by:
never executed: 1;return 1; never executed: inl -= bl; for(i=0; i <= inlreturn 1;
executed 11 times by 1 test: returnCamellia_ecb_encrypt(in + i, out + i, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->encrypt); Executed by:
executed 11 times by 1 test: 1;return 1; Executed by:
executed 11 times by 1 test: } static int camellia_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))return 1; Executed by:
never executed: if (inlend of block
executed 8 times by 1 test: returnCamellia_ofb128_encrypt(in, out, (long)inl, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num); Executed by:
executed 8 times by 1 test: 1;return 1; Executed by:
executed 8 times by 1 test: } static const EVP_CIPHER camellia_192_cbc = { 752, 16, 24, 16, 0 | 0x2, camellia_init_key, camellia_192_cbc_cipher, return 1; Executed by:
| 0-11 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
47 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
48 | , sizeof(EVP_CAMELLIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
49 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
50 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
51 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
52 | }; const EVP_CIPHER *EVP_camellia_192_cbc(void) { return executed 292 times by 33 tests: &camellia_192_cbc;return &camellia_192_cbc; Executed by:
executed 292 times by 33 tests: } static const EVP_CIPHER camellia_192_cfb128 = { 758, 1, 24, 16, 0 | 0x3, camellia_init_key, camellia_192_cfb128_cipher, return &camellia_192_cbc; Executed by:
| 292 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
53 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
54 | , sizeof(EVP_CAMELLIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
55 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
56 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
57 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
58 | }; const EVP_CIPHER *EVP_camellia_192_cfb128(void) { return executed 292 times by 33 tests: &camellia_192_cfb128;return &camellia_192_cfb128; Executed by:
executed 292 times by 33 tests: } static const EVP_CIPHER camellia_192_ofb = { 767, 1, 24, 16, 0 | 0x4, camellia_init_key, camellia_192_ofb_cipher, return &camellia_192_cfb128; Executed by:
| 292 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
59 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
60 | , sizeof(EVP_CAMELLIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
61 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
62 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
63 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
64 | }; const EVP_CIPHER *EVP_camellia_192_ofb(void) { return executed 292 times by 33 tests: &camellia_192_ofb;return &camellia_192_ofb; Executed by:
executed 292 times by 33 tests: } static const EVP_CIPHER camellia_192_ecb = { 755, 16, 24, 0, 0 | 0x1, camellia_init_key, camellia_192_ecb_cipher, return &camellia_192_ofb; Executed by:
| 292 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
65 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
66 | , sizeof(EVP_CAMELLIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
67 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
68 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
69 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
70 | }; const EVP_CIPHER *EVP_camellia_192_ecb(void) { return executed 292 times by 33 tests: &camellia_192_ecb;return &camellia_192_ecb; Executed by:
executed 292 times by 33 tests: }return &camellia_192_ecb; Executed by:
| 292 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
71 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
72 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
73 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
74 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
75 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
76 | static int camellia_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))
never executed: if (inlend of block
executed 38 times by 2 tests: returnCamellia_cbc_encrypt(in, out, (long)inl, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encrypt); Executed by:
executed 38 times by 2 tests: 1;return 1; Executed by:
executed 38 times by 2 tests: } static int camellia_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==1return 1; Executed by:
never executed: if (inl<chunkchunk>>=3;
executed 8 times by 1 test: while(inlchunk=inl; Executed by:
executed 8 times by 1 test: }chunk=inl; Executed by:
executed 8 times by 1 test: returnend of block Executed by:
executed 8 times by 1 test: 1;return 1; Executed by:
executed 8 times by 1 test: } static int camellia_256_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { size_t i, bl; bl = ctx->cipher->block_size; if(inl < blreturn 1; Executed by:
never executed: 1;return 1; never executed: inl -= bl; for(i=0; i <= inlreturn 1;
executed 11 times by 1 test: returnCamellia_ecb_encrypt(in + i, out + i, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->encrypt); Executed by:
executed 11 times by 1 test: 1;return 1; Executed by:
executed 11 times by 1 test: } static int camellia_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))return 1; Executed by:
never executed: if (inlend of block
executed 8 times by 1 test: returnCamellia_ofb128_encrypt(in, out, (long)inl, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num); Executed by:
executed 8 times by 1 test: 1;return 1; Executed by:
executed 8 times by 1 test: } static const EVP_CIPHER camellia_256_cbc = { 753, 16, 32, 16, 0 | 0x2, camellia_init_key, camellia_256_cbc_cipher, return 1; Executed by:
| 0-38 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
77 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
78 | , sizeof(EVP_CAMELLIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
79 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
80 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
81 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
82 | }; const EVP_CIPHER *EVP_camellia_256_cbc(void) { return executed 625 times by 33 tests: &camellia_256_cbc;return &camellia_256_cbc; Executed by:
executed 625 times by 33 tests: } static const EVP_CIPHER camellia_256_cfb128 = { 759, 1, 32, 16, 0 | 0x3, camellia_init_key, camellia_256_cfb128_cipher, return &camellia_256_cbc; Executed by:
| 625 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
83 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
84 | , sizeof(EVP_CAMELLIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
85 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
86 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
87 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
88 | }; const EVP_CIPHER *EVP_camellia_256_cfb128(void) { return executed 292 times by 33 tests: &camellia_256_cfb128;return &camellia_256_cfb128; Executed by:
executed 292 times by 33 tests: } static const EVP_CIPHER camellia_256_ofb = { 768, 1, 32, 16, 0 | 0x4, camellia_init_key, camellia_256_ofb_cipher, return &camellia_256_cfb128; Executed by:
| 292 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
89 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
90 | , sizeof(EVP_CAMELLIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
91 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
92 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
93 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
94 | }; const EVP_CIPHER *EVP_camellia_256_ofb(void) { return executed 292 times by 33 tests: &camellia_256_ofb;return &camellia_256_ofb; Executed by:
executed 292 times by 33 tests: } static const EVP_CIPHER camellia_256_ecb = { 756, 16, 32, 0, 0 | 0x1, camellia_init_key, camellia_256_ecb_cipher, return &camellia_256_ofb; Executed by:
| 292 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
95 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
96 | , sizeof(EVP_CAMELLIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
97 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
98 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
99 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
100 | }; const EVP_CIPHER *EVP_camellia_256_ecb(void) { return executed 292 times by 33 tests: &camellia_256_ecb;return &camellia_256_ecb; Executed by:
executed 292 times by 33 tests: }return &camellia_256_ecb; Executed by:
| 292 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
101 | static int camellia_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
never executed: if (inl<chunkchunk>>=3;
never executed: while(inlchunk=inl;
never executed: }chunk=inl; never executed: returnend of block never executed: 1;return 1; never executed: } static const EVP_CIPHER camellia_128_cfb1 = { 760, 1, 128/8, 16, 0 | 0x3, camellia_init_key, camellia_128_cfb1_cipher, return 1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
102 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
103 | , sizeof(EVP_CAMELLIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
104 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
105 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
106 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
107 | }; const EVP_CIPHER *EVP_camellia_128_cfb1(void) { return executed 292 times by 33 tests: &camellia_128_cfb1;return &camellia_128_cfb1; Executed by:
executed 292 times by 33 tests: }return &camellia_128_cfb1; Executed by:
| 292 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
108 | static int camellia_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
never executed: if (inl<chunkchunk>>=3;
never executed: while(inlchunk=inl;
never executed: }chunk=inl; never executed: returnend of block never executed: 1;return 1; never executed: } static const EVP_CIPHER camellia_192_cfb1 = { 761, 1, 192/8, 16, 0 | 0x3, camellia_init_key, camellia_192_cfb1_cipher, return 1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
109 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
110 | , sizeof(EVP_CAMELLIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
111 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
112 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
113 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
114 | }; const EVP_CIPHER *EVP_camellia_192_cfb1(void) { return executed 292 times by 33 tests: &camellia_192_cfb1;return &camellia_192_cfb1; Executed by:
executed 292 times by 33 tests: }return &camellia_192_cfb1; Executed by:
| 292 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
115 | static int camellia_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
never executed: if (inl<chunkchunk>>=3;
never executed: while(inlchunk=inl;
never executed: }chunk=inl; never executed: returnend of block never executed: 1;return 1; never executed: } static const EVP_CIPHER camellia_256_cfb1 = { 762, 1, 256/8, 16, 0 | 0x3, camellia_init_key, camellia_256_cfb1_cipher, return 1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
116 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
117 | , sizeof(EVP_CAMELLIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
118 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
119 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
120 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
121 | }; const EVP_CIPHER *EVP_camellia_256_cfb1(void) { return executed 292 times by 33 tests: &camellia_256_cfb1;return &camellia_256_cfb1; Executed by:
executed 292 times by 33 tests: }return &camellia_256_cfb1; Executed by:
| 292 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
122 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
123 | static int camellia_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
never executed: if (inl<chunkchunk>>=3;
never executed: while(inlchunk=inl;
never executed: }chunk=inl; never executed: returnend of block never executed: 1;return 1; never executed: } static const EVP_CIPHER camellia_128_cfb8 = { 763, 1, 128/8, 16, 0 | 0x3, camellia_init_key, camellia_128_cfb8_cipher, return 1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
124 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
125 | , sizeof(EVP_CAMELLIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
126 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
127 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
128 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
129 | }; const EVP_CIPHER *EVP_camellia_128_cfb8(void) { return executed 292 times by 33 tests: &camellia_128_cfb8;return &camellia_128_cfb8; Executed by:
executed 292 times by 33 tests: }return &camellia_128_cfb8; Executed by:
| 292 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
130 | static int camellia_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
never executed: if (inl<chunkchunk>>=3;
never executed: while(inlchunk=inl;
never executed: }chunk=inl; never executed: returnend of block never executed: 1;return 1; never executed: } static const EVP_CIPHER camellia_192_cfb8 = { 764, 1, 192/8, 16, 0 | 0x3, camellia_init_key, camellia_192_cfb8_cipher, return 1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
131 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
132 | , sizeof(EVP_CAMELLIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
133 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
134 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
135 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
136 | }; const EVP_CIPHER *EVP_camellia_192_cfb8(void) { return executed 292 times by 33 tests: &camellia_192_cfb8;return &camellia_192_cfb8; Executed by:
executed 292 times by 33 tests: }return &camellia_192_cfb8; Executed by:
| 292 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
137 | static int camellia_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
never executed: if (inl<chunkchunk>>=3;
never executed: while(inlchunk=inl;
never executed: }chunk=inl; never executed: returnend of block never executed: 1;return 1; never executed: } static const EVP_CIPHER camellia_256_cfb8 = { 765, 1, 256/8, 16, 0 | 0x3, camellia_init_key, camellia_256_cfb8_cipher, return 1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
138 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
139 | , sizeof(EVP_CAMELLIA_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
140 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
141 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
142 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
143 | }; const EVP_CIPHER *EVP_camellia_256_cfb8(void) { return executed 292 times by 33 tests: &camellia_256_cfb8;return &camellia_256_cfb8; Executed by:
executed 292 times by 33 tests: }return &camellia_256_cfb8; Executed by:
| 292 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
144 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
145 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
146 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
147 | static int | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
148 | camellia_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
149 | const unsigned char *iv, int enc) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
150 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
151 | int ret; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
152 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
153 | ret = Camellia_set_key(key, ctx->key_len * 8, ctx->cipher_data); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
154 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
155 | if (ret < 0
| 0-129 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
156 | ERR_put_error(6,(0xfff),(157),__FILE__,117); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
157 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
158 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
159 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
160 | return executed 129 times by 2 tests: 1;return 1; Executed by:
executed 129 times by 2 tests: return 1; Executed by:
| 129 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
161 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Switch to Source code | Preprocessed file |