Coverage Report

Created: 2026-02-22 06:11

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/openssl/crypto/evp/e_camellia.c
Line
Count
Source
1
/*
2
 * Copyright 2006-2021 The OpenSSL Project Authors. All Rights Reserved.
3
 *
4
 * Licensed under the Apache License 2.0 (the "License").  You may not use
5
 * this file except in compliance with the License.  You can obtain a copy
6
 * in the file LICENSE in the source distribution or at
7
 * https://www.openssl.org/source/license.html
8
 */
9
10
#include "crypto/evp.h"
11
12
#define BLOCK_CIPHER_generic(nid, keylen, blocksize, ivlen, nmode, mode, MODE, flags) \
13
    static const EVP_CIPHER camellia_##keylen##_##mode = {                            \
14
        nid##_##keylen##_##nmode,                                                     \
15
        blocksize,                                                                    \
16
        keylen / 8,                                                                   \
17
        ivlen,                                                                        \
18
        flags | EVP_CIPH_##MODE##_MODE,                                               \
19
        EVP_ORIG_GLOBAL,                                                              \
20
    };                                                                                \
21
    const EVP_CIPHER *EVP_camellia_##keylen##_##mode(void)                            \
22
63
    {                                                                                 \
23
63
        return &camellia_##keylen##_##mode;                                           \
24
63
    }
EVP_camellia_128_cbc
Line
Count
Source
22
3
    {                                                                                 \
23
3
        return &camellia_##keylen##_##mode;                                           \
24
3
    }
EVP_camellia_128_ecb
Line
Count
Source
22
3
    {                                                                                 \
23
3
        return &camellia_##keylen##_##mode;                                           \
24
3
    }
EVP_camellia_128_ofb
Line
Count
Source
22
3
    {                                                                                 \
23
3
        return &camellia_##keylen##_##mode;                                           \
24
3
    }
EVP_camellia_128_cfb128
Line
Count
Source
22
3
    {                                                                                 \
23
3
        return &camellia_##keylen##_##mode;                                           \
24
3
    }
EVP_camellia_128_cfb1
Line
Count
Source
22
3
    {                                                                                 \
23
3
        return &camellia_##keylen##_##mode;                                           \
24
3
    }
EVP_camellia_128_cfb8
Line
Count
Source
22
3
    {                                                                                 \
23
3
        return &camellia_##keylen##_##mode;                                           \
24
3
    }
EVP_camellia_128_ctr
Line
Count
Source
22
3
    {                                                                                 \
23
3
        return &camellia_##keylen##_##mode;                                           \
24
3
    }
EVP_camellia_192_cbc
Line
Count
Source
22
3
    {                                                                                 \
23
3
        return &camellia_##keylen##_##mode;                                           \
24
3
    }
EVP_camellia_192_ecb
Line
Count
Source
22
3
    {                                                                                 \
23
3
        return &camellia_##keylen##_##mode;                                           \
24
3
    }
EVP_camellia_192_ofb
Line
Count
Source
22
3
    {                                                                                 \
23
3
        return &camellia_##keylen##_##mode;                                           \
24
3
    }
EVP_camellia_192_cfb128
Line
Count
Source
22
3
    {                                                                                 \
23
3
        return &camellia_##keylen##_##mode;                                           \
24
3
    }
EVP_camellia_192_cfb1
Line
Count
Source
22
3
    {                                                                                 \
23
3
        return &camellia_##keylen##_##mode;                                           \
24
3
    }
EVP_camellia_192_cfb8
Line
Count
Source
22
3
    {                                                                                 \
23
3
        return &camellia_##keylen##_##mode;                                           \
24
3
    }
EVP_camellia_192_ctr
Line
Count
Source
22
3
    {                                                                                 \
23
3
        return &camellia_##keylen##_##mode;                                           \
24
3
    }
EVP_camellia_256_cbc
Line
Count
Source
22
3
    {                                                                                 \
23
3
        return &camellia_##keylen##_##mode;                                           \
24
3
    }
EVP_camellia_256_ecb
Line
Count
Source
22
3
    {                                                                                 \
23
3
        return &camellia_##keylen##_##mode;                                           \
24
3
    }
EVP_camellia_256_ofb
Line
Count
Source
22
3
    {                                                                                 \
23
3
        return &camellia_##keylen##_##mode;                                           \
24
3
    }
EVP_camellia_256_cfb128
Line
Count
Source
22
3
    {                                                                                 \
23
3
        return &camellia_##keylen##_##mode;                                           \
24
3
    }
EVP_camellia_256_cfb1
Line
Count
Source
22
3
    {                                                                                 \
23
3
        return &camellia_##keylen##_##mode;                                           \
24
3
    }
EVP_camellia_256_cfb8
Line
Count
Source
22
3
    {                                                                                 \
23
3
        return &camellia_##keylen##_##mode;                                           \
24
3
    }
EVP_camellia_256_ctr
Line
Count
Source
22
3
    {                                                                                 \
23
3
        return &camellia_##keylen##_##mode;                                           \
24
3
    }
25
26
#define BLOCK_CIPHER_generic_pack(nid, keylen, flags)                                              \
27
    BLOCK_CIPHER_generic(nid, keylen, 16, 16, cbc, cbc, CBC, flags | EVP_CIPH_FLAG_DEFAULT_ASN1)   \
28
    BLOCK_CIPHER_generic(nid, keylen, 16, 0, ecb, ecb, ECB, flags | EVP_CIPH_FLAG_DEFAULT_ASN1)    \
29
    BLOCK_CIPHER_generic(nid, keylen, 1, 16, ofb128, ofb, OFB, flags | EVP_CIPH_FLAG_DEFAULT_ASN1) \
30
    BLOCK_CIPHER_generic(nid, keylen, 1, 16, cfb128, cfb, CFB, flags | EVP_CIPH_FLAG_DEFAULT_ASN1) \
31
    BLOCK_CIPHER_generic(nid, keylen, 1, 16, cfb1, cfb1, CFB, flags)                               \
32
    BLOCK_CIPHER_generic(nid, keylen, 1, 16, cfb8, cfb8, CFB, flags)                               \
33
    BLOCK_CIPHER_generic(nid, keylen, 1, 16, ctr, ctr, CTR, flags)
34
35
BLOCK_CIPHER_generic_pack(NID_camellia, 128, 0)
36
BLOCK_CIPHER_generic_pack(NID_camellia, 192, 0)
37
BLOCK_CIPHER_generic_pack(NID_camellia, 256, 0)