Coverage Report

Created: 2026-10-28 06:28

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/openssl35/providers/implementations/include/prov/ciphercommon.h
Line
Count
Source
1
/*
2
 * Copyright 2019-2026 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
#ifndef OSSL_PROV_CIPHERCOMMON_H
11
#define OSSL_PROV_CIPHERCOMMON_H
12
#pragma once
13
14
#include <openssl/params.h>
15
#include <openssl/core_dispatch.h>
16
#include <openssl/core_names.h>
17
#include <openssl/evp.h>
18
#include "internal/cryptlib.h"
19
#include "crypto/modes.h"
20
21
#ifdef FIPS_MODULE
22
#define CIPHER_FIPS_IND_GETTABLE_CTX_PARAM() \
23
    OSSL_PARAM_int(OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR, NULL),
24
#else
25
#define CIPHER_FIPS_IND_GETTABLE_CTX_PARAM()
26
#endif
27
28
171k
#define MAXCHUNK ((size_t)1 << 30)
29
147
#define MAXBITCHUNK ((size_t)1 << (sizeof(size_t) * 8 - 4))
30
31
#define GENERIC_BLOCK_SIZE 16
32
5.59M
#define IV_STATE_UNINITIALISED 0 /* initial state is not initialized */
33
8.56M
#define IV_STATE_BUFFERED 1 /* iv has been copied to the iv buffer */
34
1.83M
#define IV_STATE_COPIED 2 /* iv has been copied from the iv buffer */
35
6.75M
#define IV_STATE_FINISHED 3 /* the iv has been used - so don't reuse it */
36
37
#define PROV_CIPHER_FUNC(type, name, args) typedef type(*OSSL_##name##_fn) args
38
39
typedef struct prov_cipher_hw_st PROV_CIPHER_HW;
40
typedef struct prov_cipher_ctx_st PROV_CIPHER_CTX;
41
42
typedef int(PROV_CIPHER_HW_FN)(PROV_CIPHER_CTX *dat, unsigned char *out,
43
    const unsigned char *in, size_t len);
44
45
/* Internal flags that can be queried */
46
185k
#define PROV_CIPHER_FLAG_AEAD 0x0001
47
200k
#define PROV_CIPHER_FLAG_CUSTOM_IV 0x0002
48
3.38k
#define PROV_CIPHER_FLAG_CTS 0x0004
49
3.38k
#define PROV_CIPHER_FLAG_TLS1_MULTIBLOCK 0x0008
50
3.38k
#define PROV_CIPHER_FLAG_RAND_KEY 0x0010
51
/* Internal flags that are only used within the provider */
52
288k
#define PROV_CIPHER_FLAG_VARIABLE_LENGTH 0x0100
53
288k
#define PROV_CIPHER_FLAG_INVERSE_CIPHER 0x0200
54
55
struct prov_cipher_ctx_st {
56
    /* place buffer at the beginning for memory alignment */
57
    /* The original value of the iv */
58
    unsigned char oiv[GENERIC_BLOCK_SIZE];
59
    /* Buffer of partial blocks processed via update calls */
60
    unsigned char buf[GENERIC_BLOCK_SIZE];
61
    unsigned char iv[GENERIC_BLOCK_SIZE];
62
63
    block128_f block;
64
    union {
65
        cbc128_f cbc;
66
        ctr128_f ctr;
67
        ecb128_f ecb;
68
    } stream;
69
70
    unsigned int mode;
71
    size_t keylen; /* key size (in bytes) */
72
    size_t ivlen;
73
    size_t blocksize;
74
    size_t bufsz; /* Number of bytes in buf */
75
    unsigned int cts_mode; /* Use to set the type for CTS modes */
76
    unsigned int pad : 1; /* Whether padding should be used or not */
77
    unsigned int enc : 1; /* Set to 1 for encrypt, or 0 otherwise */
78
    unsigned int iv_set : 1; /* Set when the iv is copied to the iv/oiv buffers */
79
    unsigned int key_set : 1; /* Set when key is set on the context */
80
    unsigned int updated : 1; /* Set to 1 during update for one shot ciphers */
81
    unsigned int variable_keylength : 1;
82
    unsigned int inverse_cipher : 1; /* set to 1 to use inverse cipher */
83
    unsigned int use_bits : 1; /* Set to 0 for cfb1 to use bits instead of bytes */
84
85
    unsigned int tlsversion; /* If TLS padding is in use the TLS version number */
86
    unsigned char *tlsmac; /* tls MAC extracted from the last record */
87
    int alloced; /*
88
                  * Whether the tlsmac data has been allocated or
89
                  * points into the user buffer.
90
                  */
91
    size_t tlsmacsize; /* Size of the TLS MAC */
92
    int removetlspad; /* Whether TLS padding should be removed or not */
93
    size_t removetlsfixed; /*
94
                            * Length of the fixed size data to remove when
95
                            * processing TLS data (equals mac size plus
96
                            * IV size if applicable)
97
                            */
98
99
    /*
100
     * num contains the number of bytes of |iv| which are valid for modes that
101
     * manage partial blocks themselves.
102
     */
103
    unsigned int num;
104
    const PROV_CIPHER_HW *hw; /* hardware specific functions */
105
    const void *ks; /* Pointer to algorithm specific key data */
106
    OSSL_LIB_CTX *libctx;
107
};
108
109
struct prov_cipher_hw_st {
110
    int (*init)(PROV_CIPHER_CTX *dat, const uint8_t *key, size_t keylen);
111
    PROV_CIPHER_HW_FN *cipher;
112
    void (*copyctx)(PROV_CIPHER_CTX *dst, const PROV_CIPHER_CTX *src);
113
};
114
115
void ossl_cipher_generic_reset_ctx(PROV_CIPHER_CTX *ctx);
116
OSSL_FUNC_cipher_encrypt_init_fn ossl_cipher_generic_einit;
117
OSSL_FUNC_cipher_decrypt_init_fn ossl_cipher_generic_dinit;
118
OSSL_FUNC_cipher_update_fn ossl_cipher_generic_block_update;
119
OSSL_FUNC_cipher_final_fn ossl_cipher_generic_block_final;
120
OSSL_FUNC_cipher_update_fn ossl_cipher_generic_stream_update;
121
OSSL_FUNC_cipher_final_fn ossl_cipher_generic_stream_final;
122
OSSL_FUNC_cipher_cipher_fn ossl_cipher_generic_cipher;
123
OSSL_FUNC_cipher_get_ctx_params_fn ossl_cipher_generic_get_ctx_params;
124
OSSL_FUNC_cipher_set_ctx_params_fn ossl_cipher_generic_set_ctx_params;
125
OSSL_FUNC_cipher_gettable_params_fn ossl_cipher_generic_gettable_params;
126
OSSL_FUNC_cipher_gettable_ctx_params_fn ossl_cipher_generic_gettable_ctx_params;
127
OSSL_FUNC_cipher_settable_ctx_params_fn ossl_cipher_generic_settable_ctx_params;
128
OSSL_FUNC_cipher_set_ctx_params_fn ossl_cipher_var_keylen_set_ctx_params;
129
OSSL_FUNC_cipher_settable_ctx_params_fn ossl_cipher_var_keylen_settable_ctx_params;
130
OSSL_FUNC_cipher_gettable_ctx_params_fn ossl_cipher_aead_gettable_ctx_params;
131
OSSL_FUNC_cipher_settable_ctx_params_fn ossl_cipher_aead_settable_ctx_params;
132
OSSL_FUNC_cipher_encrypt_skey_init_fn ossl_cipher_generic_skey_einit;
133
OSSL_FUNC_cipher_decrypt_skey_init_fn ossl_cipher_generic_skey_dinit;
134
135
int ossl_cipher_generic_get_params(OSSL_PARAM params[], unsigned int md,
136
    uint64_t flags,
137
    size_t kbits, size_t blkbits, size_t ivbits);
138
void ossl_cipher_generic_initkey(void *vctx, size_t kbits, size_t blkbits,
139
    size_t ivbits, unsigned int mode,
140
    uint64_t flags,
141
    const PROV_CIPHER_HW *hw, void *provctx);
142
143
#define IMPLEMENT_generic_cipher_func(alg, UCALG, lcmode, UCMODE, flags, kbits,                 \
144
    blkbits, ivbits, typ)                                                                       \
145
    const OSSL_DISPATCH ossl_##alg##kbits##lcmode##_functions[] = {                             \
146
        { OSSL_FUNC_CIPHER_NEWCTX,                                                              \
147
            (void (*)(void))alg##_##kbits##_##lcmode##_newctx },                                \
148
        { OSSL_FUNC_CIPHER_FREECTX, (void (*)(void))alg##_freectx },                            \
149
        { OSSL_FUNC_CIPHER_DUPCTX, (void (*)(void))alg##_dupctx },                              \
150
        { OSSL_FUNC_CIPHER_ENCRYPT_INIT, (void (*)(void))ossl_cipher_generic_einit },           \
151
        { OSSL_FUNC_CIPHER_DECRYPT_INIT, (void (*)(void))ossl_cipher_generic_dinit },           \
152
        { OSSL_FUNC_CIPHER_UPDATE, (void (*)(void))ossl_cipher_generic_##typ##_update },        \
153
        { OSSL_FUNC_CIPHER_FINAL, (void (*)(void))ossl_cipher_generic_##typ##_final },          \
154
        { OSSL_FUNC_CIPHER_CIPHER, (void (*)(void))ossl_cipher_generic_cipher },                \
155
        { OSSL_FUNC_CIPHER_GET_PARAMS,                                                          \
156
            (void (*)(void))alg##_##kbits##_##lcmode##_get_params },                            \
157
        { OSSL_FUNC_CIPHER_GET_CTX_PARAMS,                                                      \
158
            (void (*)(void))ossl_cipher_generic_get_ctx_params },                               \
159
        { OSSL_FUNC_CIPHER_SET_CTX_PARAMS,                                                      \
160
            (void (*)(void))ossl_cipher_generic_set_ctx_params },                               \
161
        { OSSL_FUNC_CIPHER_GETTABLE_PARAMS,                                                     \
162
            (void (*)(void))ossl_cipher_generic_gettable_params },                              \
163
        { OSSL_FUNC_CIPHER_GETTABLE_CTX_PARAMS,                                                 \
164
            (void (*)(void))ossl_cipher_generic_gettable_ctx_params },                          \
165
        { OSSL_FUNC_CIPHER_SETTABLE_CTX_PARAMS,                                                 \
166
            (void (*)(void))ossl_cipher_generic_settable_ctx_params },                          \
167
        { OSSL_FUNC_CIPHER_ENCRYPT_SKEY_INIT, (void (*)(void))ossl_cipher_generic_skey_einit }, \
168
        { OSSL_FUNC_CIPHER_DECRYPT_SKEY_INIT, (void (*)(void))ossl_cipher_generic_skey_dinit }, \
169
        OSSL_DISPATCH_END                                                                       \
170
    };
171
172
#define IMPLEMENT_var_keylen_cipher_func(alg, UCALG, lcmode, UCMODE, flags,                     \
173
    kbits, blkbits, ivbits, typ)                                                                \
174
    const OSSL_DISPATCH ossl_##alg##kbits##lcmode##_functions[] = {                             \
175
        { OSSL_FUNC_CIPHER_NEWCTX,                                                              \
176
            (void (*)(void))alg##_##kbits##_##lcmode##_newctx },                                \
177
        { OSSL_FUNC_CIPHER_FREECTX, (void (*)(void))alg##_freectx },                            \
178
        { OSSL_FUNC_CIPHER_DUPCTX, (void (*)(void))alg##_dupctx },                              \
179
        { OSSL_FUNC_CIPHER_ENCRYPT_INIT, (void (*)(void))ossl_cipher_generic_einit },           \
180
        { OSSL_FUNC_CIPHER_DECRYPT_INIT, (void (*)(void))ossl_cipher_generic_dinit },           \
181
        { OSSL_FUNC_CIPHER_UPDATE, (void (*)(void))ossl_cipher_generic_##typ##_update },        \
182
        { OSSL_FUNC_CIPHER_FINAL, (void (*)(void))ossl_cipher_generic_##typ##_final },          \
183
        { OSSL_FUNC_CIPHER_CIPHER, (void (*)(void))ossl_cipher_generic_cipher },                \
184
        { OSSL_FUNC_CIPHER_GET_PARAMS,                                                          \
185
            (void (*)(void))alg##_##kbits##_##lcmode##_get_params },                            \
186
        { OSSL_FUNC_CIPHER_GET_CTX_PARAMS,                                                      \
187
            (void (*)(void))ossl_cipher_generic_get_ctx_params },                               \
188
        { OSSL_FUNC_CIPHER_SET_CTX_PARAMS,                                                      \
189
            (void (*)(void))ossl_cipher_var_keylen_set_ctx_params },                            \
190
        { OSSL_FUNC_CIPHER_GETTABLE_PARAMS,                                                     \
191
            (void (*)(void))ossl_cipher_generic_gettable_params },                              \
192
        { OSSL_FUNC_CIPHER_GETTABLE_CTX_PARAMS,                                                 \
193
            (void (*)(void))ossl_cipher_generic_gettable_ctx_params },                          \
194
        { OSSL_FUNC_CIPHER_SETTABLE_CTX_PARAMS,                                                 \
195
            (void (*)(void))ossl_cipher_var_keylen_settable_ctx_params },                       \
196
        { OSSL_FUNC_CIPHER_ENCRYPT_SKEY_INIT, (void (*)(void))ossl_cipher_generic_skey_einit }, \
197
        { OSSL_FUNC_CIPHER_DECRYPT_SKEY_INIT, (void (*)(void))ossl_cipher_generic_skey_dinit }, \
198
        OSSL_DISPATCH_END                                                                       \
199
    };
200
201
#define IMPLEMENT_generic_cipher_genfn(alg, UCALG, lcmode, UCMODE, flags,               \
202
    kbits, blkbits, ivbits, typ)                                                        \
203
    static OSSL_FUNC_cipher_get_params_fn alg##_##kbits##_##lcmode##_get_params;        \
204
    static int alg##_##kbits##_##lcmode##_get_params(OSSL_PARAM params[])               \
205
697k
    {                                                                                   \
206
697k
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
697k
            flags, kbits, blkbits, ivbits);                                             \
208
697k
    }                                                                                   \
cipher_aes.c:aes_256_ecb_get_params
Line
Count
Source
205
111
    {                                                                                   \
206
111
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
111
            flags, kbits, blkbits, ivbits);                                             \
208
111
    }                                                                                   \
cipher_aes.c:aes_192_ecb_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_aes.c:aes_128_ecb_get_params
Line
Count
Source
205
230
    {                                                                                   \
206
230
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
230
            flags, kbits, blkbits, ivbits);                                             \
208
230
    }                                                                                   \
cipher_aes.c:aes_256_cbc_get_params
Line
Count
Source
205
172k
    {                                                                                   \
206
172k
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
172k
            flags, kbits, blkbits, ivbits);                                             \
208
172k
    }                                                                                   \
cipher_aes.c:aes_192_cbc_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_aes.c:aes_128_cbc_get_params
Line
Count
Source
205
172k
    {                                                                                   \
206
172k
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
172k
            flags, kbits, blkbits, ivbits);                                             \
208
172k
    }                                                                                   \
cipher_aes.c:aes_256_ofb_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_aes.c:aes_192_ofb_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_aes.c:aes_128_ofb_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_aes.c:aes_256_cfb_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_aes.c:aes_192_cfb_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_aes.c:aes_128_cfb_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_aes.c:aes_256_cfb1_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_aes.c:aes_192_cfb1_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_aes.c:aes_128_cfb1_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_aes.c:aes_256_cfb8_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_aes.c:aes_192_cfb8_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_aes.c:aes_128_cfb8_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_aes.c:aes_256_ctr_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_aes.c:aes_192_ctr_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_aes.c:aes_128_ctr_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_aria.c:aria_256_ecb_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_aria.c:aria_192_ecb_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_aria.c:aria_128_ecb_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_aria.c:aria_256_cbc_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_aria.c:aria_192_cbc_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_aria.c:aria_128_cbc_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_aria.c:aria_256_ofb_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_aria.c:aria_192_ofb_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_aria.c:aria_128_ofb_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_aria.c:aria_256_cfb_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_aria.c:aria_192_cfb_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_aria.c:aria_128_cfb_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_aria.c:aria_256_cfb1_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_aria.c:aria_192_cfb1_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_aria.c:aria_128_cfb1_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_aria.c:aria_256_cfb8_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_aria.c:aria_192_cfb8_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_aria.c:aria_128_cfb8_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_aria.c:aria_256_ctr_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_aria.c:aria_192_ctr_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_aria.c:aria_128_ctr_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_camellia.c:camellia_256_ecb_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_camellia.c:camellia_192_ecb_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_camellia.c:camellia_128_ecb_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_camellia.c:camellia_256_cbc_get_params
Line
Count
Source
205
172k
    {                                                                                   \
206
172k
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
172k
            flags, kbits, blkbits, ivbits);                                             \
208
172k
    }                                                                                   \
cipher_camellia.c:camellia_192_cbc_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_camellia.c:camellia_128_cbc_get_params
Line
Count
Source
205
172k
    {                                                                                   \
206
172k
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
172k
            flags, kbits, blkbits, ivbits);                                             \
208
172k
    }                                                                                   \
cipher_camellia.c:camellia_256_ofb_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_camellia.c:camellia_192_ofb_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_camellia.c:camellia_128_ofb_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_camellia.c:camellia_256_cfb_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_camellia.c:camellia_192_cfb_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_camellia.c:camellia_128_cfb_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_camellia.c:camellia_256_cfb1_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_camellia.c:camellia_192_cfb1_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_camellia.c:camellia_128_cfb1_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_camellia.c:camellia_256_cfb8_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_camellia.c:camellia_192_cfb8_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_camellia.c:camellia_128_cfb8_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_camellia.c:camellia_256_ctr_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_camellia.c:camellia_192_ctr_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_camellia.c:camellia_128_ctr_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_sm4.c:sm4_128_ecb_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_sm4.c:sm4_128_cbc_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_sm4.c:sm4_128_ctr_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_sm4.c:sm4_128_ofb128_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
cipher_sm4.c:sm4_128_cfb128_get_params
Line
Count
Source
205
85
    {                                                                                   \
206
85
        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
207
85
            flags, kbits, blkbits, ivbits);                                             \
208
85
    }                                                                                   \
209
    static OSSL_FUNC_cipher_newctx_fn alg##_##kbits##_##lcmode##_newctx;                \
210
    static void *alg##_##kbits##_##lcmode##_newctx(void *provctx)                       \
211
136k
    {                                                                                   \
212
136k
        PROV_##UCALG##_CTX *ctx = ossl_prov_is_running() ? OPENSSL_zalloc(sizeof(*ctx)) \
213
136k
                                                         : NULL;                        \
214
136k
        if (ctx != NULL) {                                                              \
215
136k
            ossl_cipher_generic_initkey(ctx, kbits, blkbits, ivbits,                    \
216
136k
                EVP_CIPH_##UCMODE##_MODE, flags,                                        \
217
136k
                ossl_prov_cipher_hw_##alg##_##lcmode(kbits),                            \
218
136k
                provctx);                                                               \
219
136k
        }                                                                               \
220
136k
        return ctx;                                                                     \
221
136k
    }
222
223
#define IMPLEMENT_generic_cipher(alg, UCALG, lcmode, UCMODE, flags, kbits,   \
224
    blkbits, ivbits, typ)                                                    \
225
    IMPLEMENT_generic_cipher_genfn(alg, UCALG, lcmode, UCMODE, flags, kbits, \
226
        blkbits, ivbits, typ)                                                \
227
    IMPLEMENT_generic_cipher_func(alg, UCALG, lcmode, UCMODE, flags, kbits,  \
228
        blkbits, ivbits, typ)
229
230
#define IMPLEMENT_var_keylen_cipher(alg, UCALG, lcmode, UCMODE, flags, kbits,  \
231
    blkbits, ivbits, typ)                                                      \
232
    IMPLEMENT_generic_cipher_genfn(alg, UCALG, lcmode, UCMODE, flags, kbits,   \
233
        blkbits, ivbits, typ)                                                  \
234
    IMPLEMENT_var_keylen_cipher_func(alg, UCALG, lcmode, UCMODE, flags, kbits, \
235
        blkbits, ivbits, typ)
236
237
PROV_CIPHER_HW_FN ossl_cipher_hw_generic_cbc;
238
PROV_CIPHER_HW_FN ossl_cipher_hw_generic_ecb;
239
PROV_CIPHER_HW_FN ossl_cipher_hw_generic_ofb128;
240
PROV_CIPHER_HW_FN ossl_cipher_hw_generic_cfb128;
241
PROV_CIPHER_HW_FN ossl_cipher_hw_generic_cfb8;
242
PROV_CIPHER_HW_FN ossl_cipher_hw_generic_cfb1;
243
PROV_CIPHER_HW_FN ossl_cipher_hw_generic_ctr;
244
PROV_CIPHER_HW_FN ossl_cipher_hw_chunked_cbc;
245
PROV_CIPHER_HW_FN ossl_cipher_hw_chunked_cfb8;
246
PROV_CIPHER_HW_FN ossl_cipher_hw_chunked_cfb128;
247
PROV_CIPHER_HW_FN ossl_cipher_hw_chunked_ofb128;
248
#define ossl_cipher_hw_chunked_ecb ossl_cipher_hw_generic_ecb
249
#define ossl_cipher_hw_chunked_ctr ossl_cipher_hw_generic_ctr
250
#define ossl_cipher_hw_chunked_cfb1 ossl_cipher_hw_generic_cfb1
251
252
#define IMPLEMENT_CIPHER_HW_OFB(MODE, NAME, CTX_NAME, KEY_NAME, FUNC_PREFIX) \
253
    static int cipher_hw_##NAME##_##MODE##_cipher(PROV_CIPHER_CTX *ctx,      \
254
        unsigned char *out,                                                  \
255
        const unsigned char *in, size_t len)                                 \
256
    {                                                                        \
257
        int num = ctx->num;                                                  \
258
        KEY_NAME *key = &(((CTX_NAME *)ctx)->ks.ks);                         \
259
                                                                             \
260
        while (len >= MAXCHUNK) {                                            \
261
            FUNC_PREFIX##_encrypt(in, out, MAXCHUNK, key, ctx->iv, &num);    \
262
            len -= MAXCHUNK;                                                 \
263
            in += MAXCHUNK;                                                  \
264
            out += MAXCHUNK;                                                 \
265
        }                                                                    \
266
        if (len > 0) {                                                       \
267
            FUNC_PREFIX##_encrypt(in, out, (long)len, key, ctx->iv, &num);   \
268
        }                                                                    \
269
        ctx->num = num;                                                      \
270
        return 1;                                                            \
271
    }
272
273
#define IMPLEMENT_CIPHER_HW_ECB(MODE, NAME, CTX_NAME, KEY_NAME, FUNC_PREFIX) \
274
    static int cipher_hw_##NAME##_##MODE##_cipher(PROV_CIPHER_CTX *ctx,      \
275
        unsigned char *out,                                                  \
276
        const unsigned char *in, size_t len)                                 \
277
    {                                                                        \
278
        size_t i, bl = ctx->blocksize;                                       \
279
        KEY_NAME *key = &(((CTX_NAME *)ctx)->ks.ks);                         \
280
                                                                             \
281
        if (len < bl)                                                        \
282
            return 1;                                                        \
283
        for (i = 0, len -= bl; i <= len; i += bl)                            \
284
            FUNC_PREFIX##_encrypt(in + i, out + i, key, ctx->enc);           \
285
        return 1;                                                            \
286
    }
287
288
#define IMPLEMENT_CIPHER_HW_CBC(MODE, NAME, CTX_NAME, KEY_NAME, FUNC_PREFIX)   \
289
    static int cipher_hw_##NAME##_##MODE##_cipher(PROV_CIPHER_CTX *ctx,        \
290
        unsigned char *out,                                                    \
291
        const unsigned char *in, size_t len)                                   \
292
    {                                                                          \
293
        KEY_NAME *key = &(((CTX_NAME *)ctx)->ks.ks);                           \
294
                                                                               \
295
        while (len >= MAXCHUNK) {                                              \
296
            FUNC_PREFIX##_encrypt(in, out, MAXCHUNK, key, ctx->iv, ctx->enc);  \
297
            len -= MAXCHUNK;                                                   \
298
            in += MAXCHUNK;                                                    \
299
            out += MAXCHUNK;                                                   \
300
        }                                                                      \
301
        if (len > 0)                                                           \
302
            FUNC_PREFIX##_encrypt(in, out, (long)len, key, ctx->iv, ctx->enc); \
303
        return 1;                                                              \
304
    }
305
306
#define IMPLEMENT_CIPHER_HW_CFB(MODE, NAME, CTX_NAME, KEY_NAME, FUNC_PREFIX) \
307
    static int cipher_hw_##NAME##_##MODE##_cipher(PROV_CIPHER_CTX *ctx,      \
308
        unsigned char *out,                                                  \
309
        const unsigned char *in, size_t len)                                 \
310
    {                                                                        \
311
        size_t chunk = MAXCHUNK;                                             \
312
        KEY_NAME *key = &(((CTX_NAME *)ctx)->ks.ks);                         \
313
        int num = ctx->num;                                                  \
314
                                                                             \
315
        if (len < chunk)                                                     \
316
            chunk = len;                                                     \
317
        while (len > 0 && len >= chunk) {                                    \
318
            FUNC_PREFIX##_encrypt(in, out, (long)chunk, key, ctx->iv, &num,  \
319
                ctx->enc);                                                   \
320
            len -= chunk;                                                    \
321
            in += chunk;                                                     \
322
            out += chunk;                                                    \
323
            if (len < chunk)                                                 \
324
                chunk = len;                                                 \
325
        }                                                                    \
326
        ctx->num = num;                                                      \
327
        return 1;                                                            \
328
    }
329
330
#define IMPLEMENT_CIPHER_HW_COPYCTX(name, CTX_TYPE)                    \
331
    static void name(PROV_CIPHER_CTX *dst, const PROV_CIPHER_CTX *src) \
332
1.23k
    {                                                                  \
333
1.23k
        CTX_TYPE *sctx = (CTX_TYPE *)src;                              \
334
1.23k
        CTX_TYPE *dctx = (CTX_TYPE *)dst;                              \
335
1.23k
                                                                       \
336
1.23k
        *dctx = *sctx;                                                 \
337
1.23k
        dst->ks = &dctx->ks.ks;                                        \
338
1.23k
    }
cipher_aes_hw.c:cipher_hw_aes_copyctx
Line
Count
Source
332
819
    {                                                                  \
333
819
        CTX_TYPE *sctx = (CTX_TYPE *)src;                              \
334
819
        CTX_TYPE *dctx = (CTX_TYPE *)dst;                              \
335
819
                                                                       \
336
819
        *dctx = *sctx;                                                 \
337
819
        dst->ks = &dctx->ks.ks;                                        \
338
819
    }
Unexecuted instantiation: cipher_aria_hw.c:cipher_hw_aria_copyctx
cipher_camellia_hw.c:cipher_hw_camellia_copyctx
Line
Count
Source
332
42
    {                                                                  \
333
42
        CTX_TYPE *sctx = (CTX_TYPE *)src;                              \
334
42
        CTX_TYPE *dctx = (CTX_TYPE *)dst;                              \
335
42
                                                                       \
336
42
        *dctx = *sctx;                                                 \
337
42
        dst->ks = &dctx->ks.ks;                                        \
338
42
    }
cipher_sm4_hw.c:cipher_hw_sm4_copyctx
Line
Count
Source
332
374
    {                                                                  \
333
374
        CTX_TYPE *sctx = (CTX_TYPE *)src;                              \
334
374
        CTX_TYPE *dctx = (CTX_TYPE *)dst;                              \
335
374
                                                                       \
336
374
        *dctx = *sctx;                                                 \
337
374
        dst->ks = &dctx->ks.ks;                                        \
338
374
    }
339
340
#define CIPHER_DEFAULT_GETTABLE_CTX_PARAMS_START(name)                  \
341
    static const OSSL_PARAM name##_known_gettable_ctx_params[] = {      \
342
        OSSL_PARAM_size_t(OSSL_CIPHER_PARAM_KEYLEN, NULL),              \
343
        OSSL_PARAM_size_t(OSSL_CIPHER_PARAM_IVLEN, NULL),               \
344
        OSSL_PARAM_uint(OSSL_CIPHER_PARAM_PADDING, NULL),               \
345
        OSSL_PARAM_uint(OSSL_CIPHER_PARAM_NUM, NULL),                   \
346
        OSSL_PARAM_octet_string(OSSL_CIPHER_PARAM_IV, NULL, 0),         \
347
        OSSL_PARAM_octet_string(OSSL_CIPHER_PARAM_UPDATED_IV, NULL, 0), \
348
        CIPHER_FIPS_IND_GETTABLE_CTX_PARAM()
349
350
#define CIPHER_DEFAULT_GETTABLE_CTX_PARAMS_END(name)                     \
351
    OSSL_PARAM_END                                                       \
352
    }                                                                    \
353
    ;                                                                    \
354
    const OSSL_PARAM *name##_gettable_ctx_params(ossl_unused void *cctx, \
355
        ossl_unused void *provctx)                                       \
356
8.30k
    {                                                                    \
357
8.30k
        return name##_known_gettable_ctx_params;                         \
358
8.30k
    }
cipher_aes.c:aes_cbc_cts_gettable_ctx_params
Line
Count
Source
356
159
    {                                                                    \
357
159
        return name##_known_gettable_ctx_params;                         \
358
159
    }
cipher_camellia.c:camellia_cbc_cts_gettable_ctx_params
Line
Count
Source
356
159
    {                                                                    \
357
159
        return name##_known_gettable_ctx_params;                         \
358
159
    }
ossl_tdes_gettable_ctx_params
Line
Count
Source
356
935
    {                                                                    \
357
935
        return name##_known_gettable_ctx_params;                         \
358
935
    }
ossl_cipher_generic_gettable_ctx_params
Line
Count
Source
356
7.05k
    {                                                                    \
357
7.05k
        return name##_known_gettable_ctx_params;                         \
358
7.05k
    }
359
360
#define CIPHER_DEFAULT_SETTABLE_CTX_PARAMS_START(name)             \
361
    static const OSSL_PARAM name##_known_settable_ctx_params[] = { \
362
        OSSL_PARAM_uint(OSSL_CIPHER_PARAM_PADDING, NULL),          \
363
        OSSL_PARAM_uint(OSSL_CIPHER_PARAM_NUM, NULL),
364
#define CIPHER_DEFAULT_SETTABLE_CTX_PARAMS_END(name)                     \
365
    OSSL_PARAM_END                                                       \
366
    }                                                                    \
367
    ;                                                                    \
368
    const OSSL_PARAM *name##_settable_ctx_params(ossl_unused void *cctx, \
369
        ossl_unused void *provctx)                                       \
370
461
    {                                                                    \
371
461
        return name##_known_settable_ctx_params;                         \
372
461
    }
cipher_aes.c:aes_cbc_cts_settable_ctx_params
Line
Count
Source
370
9
    {                                                                    \
371
9
        return name##_known_settable_ctx_params;                         \
372
9
    }
cipher_camellia.c:camellia_cbc_cts_settable_ctx_params
Line
Count
Source
370
7
    {                                                                    \
371
7
        return name##_known_settable_ctx_params;                         \
372
7
    }
ossl_tdes_settable_ctx_params
Line
Count
Source
370
76
    {                                                                    \
371
76
        return name##_known_settable_ctx_params;                         \
372
76
    }
ossl_cipher_generic_settable_ctx_params
Line
Count
Source
370
369
    {                                                                    \
371
369
        return name##_known_settable_ctx_params;                         \
372
369
    }
Unexecuted instantiation: ossl_cipher_var_keylen_settable_ctx_params
373
374
int ossl_cipher_generic_initiv(PROV_CIPHER_CTX *ctx, const unsigned char *iv,
375
    size_t ivlen);
376
377
size_t ossl_cipher_fillblock(unsigned char *buf, size_t *buflen,
378
    size_t blocksize,
379
    const unsigned char **in, size_t *inlen);
380
int ossl_cipher_trailingdata(unsigned char *buf, size_t *buflen,
381
    size_t blocksize,
382
    const unsigned char **in, size_t *inlen);
383
384
#endif