/openssl/providers/implementations/include/prov/ |
H A D | ciphercommon_aead.h | 18 # define IMPLEMENT_aead_cipher(alg, lc, UCMODE, flags, kbits, blkbits, ivbits) \ argument 19 static OSSL_FUNC_cipher_get_params_fn alg##_##kbits##_##lc##_get_params; \ 20 static int alg##_##kbits##_##lc##_get_params(OSSL_PARAM params[]) \ 23 flags, kbits, blkbits, ivbits); \ 25 static OSSL_FUNC_cipher_newctx_fn alg##kbits##lc##_newctx; \ 26 static void * alg##kbits##lc##_newctx(void *provctx) \ 28 return alg##_##lc##_newctx(provctx, kbits); \ 30 static void * alg##kbits##lc##_dupctx(void *src) \ 34 const OSSL_DISPATCH ossl_##alg##kbits##lc##_functions[] = { \ 35 { OSSL_FUNC_CIPHER_NEWCTX, (void (*)(void))alg##kbits##lc##_newctx }, \ [all …]
|
H A D | ciphercommon.h | 128 size_t kbits, size_t blkbits, size_t ivbits); 129 void ossl_cipher_generic_initkey(void *vctx, size_t kbits, size_t blkbits, 134 # define IMPLEMENT_generic_cipher_func(alg, UCALG, lcmode, UCMODE, flags, kbits,\ argument 136 const OSSL_DISPATCH ossl_##alg##kbits##lcmode##_functions[] = { \ 138 (void (*)(void)) alg##_##kbits##_##lcmode##_newctx }, \ 147 (void (*)(void)) alg##_##kbits##_##lcmode##_get_params }, \ 162 kbits, blkbits, ivbits, typ) \ argument 163 const OSSL_DISPATCH ossl_##alg##kbits##lcmode##_functions[] = { \ 165 (void (*)(void)) alg##_##kbits##_##lcmode##_newctx }, \ 174 (void (*)(void)) alg##_##kbits##_##lcmode##_get_params }, \ [all …]
|
/openssl/providers/implementations/ciphers/ |
H A D | cipher_rc4.c | 71 #define IMPLEMENT_cipher(alg, UCALG, flags, kbits, blkbits, ivbits, typ) \ argument 72 static OSSL_FUNC_cipher_get_params_fn alg##_##kbits##_get_params; \ 73 static int alg##_##kbits##_get_params(OSSL_PARAM params[]) \ 76 kbits, blkbits, ivbits); \ 78 static OSSL_FUNC_cipher_newctx_fn alg##_##kbits##_newctx; \ 79 static void *alg##_##kbits##_newctx(void *provctx) \ 86 ossl_cipher_generic_initkey(ctx, kbits, blkbits, ivbits, 0, flags, \ 87 ossl_prov_cipher_hw_##alg(kbits), NULL); \ 91 const OSSL_DISPATCH ossl_##alg##kbits##_functions[] = { \ 93 (void (*)(void)) alg##_##kbits##_newctx }, \ [all …]
|
H A D | cipher_cts.h | 13 #define IMPLEMENT_cts_cipher(alg, UCALG, lcmode, UCMODE, flags, kbits, \ argument 15 static OSSL_FUNC_cipher_get_params_fn alg##_##kbits##_##lcmode##_get_params; \ 16 static int alg##_cts_##kbits##_##lcmode##_get_params(OSSL_PARAM params[]) \ 19 flags, kbits, blkbits, ivbits); \ 21 const OSSL_DISPATCH ossl_##alg##kbits##lcmode##_cts_functions[] = { \ 23 (void (*)(void)) alg##_##kbits##_##lcmode##_newctx }, \ 34 (void (*)(void)) alg##_cts_##kbits##_##lcmode##_get_params }, \
|
H A D | cipher_rc5.c | 130 #define IMPLEMENT_cipher(alg, UCALG, lcmode, UCMODE, flags, kbits, \ argument 132 static OSSL_FUNC_cipher_get_params_fn alg##_##kbits##_##lcmode##_get_params; \ 133 static int alg##_##kbits##_##lcmode##_get_params(OSSL_PARAM params[]) \ 136 flags, kbits, blkbits, ivbits); \ 138 static OSSL_FUNC_cipher_newctx_fn alg##_##kbits##_##lcmode##_newctx; \ 139 static void *alg##_##kbits##_##lcmode##_newctx(void *provctx) \ 146 ossl_cipher_generic_initkey(ctx, kbits, blkbits, ivbits, \ 148 ossl_prov_cipher_hw_##alg##_##lcmode(kbits),\ 154 const OSSL_DISPATCH ossl_##alg##kbits##lcmode##_functions[] = { \ 156 (void (*)(void)) alg##_##kbits##_##lcmode##_newctx }, \ [all …]
|
H A D | cipher_aes_xts.c | 124 size_t kbits, size_t blkbits, size_t ivbits) in aes_xts_newctx() argument 133 ossl_cipher_generic_initkey(&ctx->base, kbits, blkbits, ivbits, mode, in aes_xts_newctx() 134 flags, ossl_prov_cipher_hw_aes_xts(kbits), in aes_xts_newctx() 279 #define IMPLEMENT_cipher(lcmode, UCMODE, kbits, flags) \ argument 280 static OSSL_FUNC_cipher_get_params_fn aes_##kbits##_##lcmode##_get_params; \ 281 static int aes_##kbits##_##lcmode##_get_params(OSSL_PARAM params[]) \ 284 flags, 2 * kbits, AES_XTS_BLOCK_BITS, \ 287 static OSSL_FUNC_cipher_newctx_fn aes_##kbits##_xts_newctx; \ 288 static void *aes_##kbits##_xts_newctx(void *provctx) \ 290 return aes_xts_newctx(provctx, EVP_CIPH_##UCMODE##_MODE, flags, 2 * kbits, \ [all …]
|
H A D | cipher_sm4_xts.c | 78 size_t kbits, size_t blkbits, size_t ivbits) in sm4_xts_newctx() argument 83 ossl_cipher_generic_initkey(&ctx->base, kbits, blkbits, ivbits, mode, in sm4_xts_newctx() 84 flags, ossl_prov_cipher_hw_sm4_xts(kbits), in sm4_xts_newctx() 243 #define IMPLEMENT_cipher(lcmode, UCMODE, kbits, flags) \ argument 244 static OSSL_FUNC_cipher_get_params_fn sm4_##kbits##_##lcmode##_get_params; \ 245 static int sm4_##kbits##_##lcmode##_get_params(OSSL_PARAM params[]) \ 248 flags, 2 * kbits, SM4_XTS_BLOCK_BITS,\ 251 static OSSL_FUNC_cipher_newctx_fn sm4_##kbits##_xts_newctx; \ 252 static void *sm4_##kbits##_xts_newctx(void *provctx) \ 254 return sm4_xts_newctx(provctx, EVP_CIPH_##UCMODE##_MODE, flags, 2 * kbits, \ [all …]
|
H A D | cipher_aes_cbc_hmac_sha.c | 27 # define IMPLEMENT_CIPHER(nm, sub, kbits, blkbits, ivbits, flags) \ argument 28 const OSSL_DISPATCH ossl_##nm##kbits##sub##_functions[] = { \ 311 size_t kbits, size_t blkbits, size_t ivbits, in base_init() argument 314 ossl_cipher_generic_initkey(&ctx->base, kbits, blkbits, ivbits, in base_init() 320 static void *aes_cbc_hmac_sha1_newctx(void *provctx, size_t kbits, in aes_cbc_hmac_sha1_newctx() argument 332 ossl_prov_cipher_hw_aes_cbc_hmac_sha1(), kbits, blkbits, in aes_cbc_hmac_sha1_newctx() 360 static void *aes_cbc_hmac_sha256_newctx(void *provctx, size_t kbits, in aes_cbc_hmac_sha256_newctx() argument 372 ossl_prov_cipher_hw_aes_cbc_hmac_sha256(), kbits, blkbits, in aes_cbc_hmac_sha256_newctx() 397 # define IMPLEMENT_CIPHER(nm, sub, kbits, blkbits, ivbits, flags) \ argument 398 static OSSL_FUNC_cipher_newctx_fn nm##_##kbits##_##sub##_newctx; \ [all …]
|
H A D | cipher_rc2.c | 234 #define IMPLEMENT_cipher(alg, UCALG, lcmode, UCMODE, flags, kbits, blkbits, \ argument 236 static OSSL_FUNC_cipher_get_params_fn alg##_##kbits##_##lcmode##_get_params; \ 237 static int alg##_##kbits##_##lcmode##_get_params(OSSL_PARAM params[]) \ 240 flags, kbits, blkbits, ivbits); \ 242 static OSSL_FUNC_cipher_newctx_fn alg##_##kbits##_##lcmode##_newctx; \ 243 static void *alg##_##kbits##_##lcmode##_newctx(void *provctx) \ 250 ossl_cipher_generic_initkey(ctx, kbits, blkbits, ivbits, \ 252 ossl_prov_cipher_hw_##alg##_##lcmode(kbits), \ 254 ctx->key_bits = kbits; \ 258 const OSSL_DISPATCH ossl_##alg##kbits##lcmode##_functions[] = { \ [all …]
|
H A D | cipher_aes_wrp.c | 50 static void *aes_wrap_newctx(size_t kbits, size_t blkbits, in aes_wrap_newctx() argument 62 ossl_cipher_generic_initkey(ctx, kbits, blkbits, ivbits, mode, flags, in aes_wrap_newctx() 286 #define IMPLEMENT_cipher(mode, fname, UCMODE, flags, kbits, blkbits, ivbits) \ argument 287 static OSSL_FUNC_cipher_get_params_fn aes_##kbits##_##fname##_get_params; \ 288 static int aes_##kbits##_##fname##_get_params(OSSL_PARAM params[]) \ 291 flags, kbits, blkbits, ivbits); \ 293 static OSSL_FUNC_cipher_newctx_fn aes_##kbits##fname##_newctx; \ 294 static void *aes_##kbits##fname##_newctx(void *provctx) \ 296 return aes_##mode##_newctx(kbits, blkbits, ivbits, \ 299 const OSSL_DISPATCH ossl_##aes##kbits##fname##_functions[] = { \ [all …]
|
H A D | cipher_aes_siv.c | 253 #define IMPLEMENT_cipher(alg, lc, UCMODE, flags, kbits, blkbits, ivbits) \ argument 254 static OSSL_FUNC_cipher_newctx_fn alg##kbits##lc##_newctx; \ 262 static OSSL_FUNC_cipher_get_params_fn alg##_##kbits##_##lc##_get_params; \ 269 static int alg##_##kbits##_##lc##_get_params(OSSL_PARAM params[]) \ 272 flags, 2*kbits, blkbits, ivbits); \ 274 static void *alg##kbits##lc##_newctx(void *provctx) \ 276 return alg##_##lc##_newctx(provctx, 2*kbits, EVP_CIPH_##UCMODE##_MODE, \ 279 const OSSL_DISPATCH ossl_##alg##kbits##lc##_functions[] = { \ 280 { OSSL_FUNC_CIPHER_NEWCTX, (void (*)(void))alg##kbits##lc##_newctx }, \ 289 (void (*)(void)) alg##_##kbits##_##lc##_get_params }, \
|
H A D | cipher_tdes.h | 34 kbits, blkbits, ivbits, block) \ argument 38 return ossl_tdes_newctx(provctx, EVP_CIPH_##UCMODE##_MODE, kbits, blkbits, \ 46 flags, kbits, blkbits, ivbits); \ 75 void *ossl_tdes_newctx(void *provctx, int mode, size_t kbits, size_t blkbits, 78 size_t kbits, size_t blkbits, size_t ivbits);
|
H A D | cipher_aes_gcm_siv.c | 280 #define IMPLEMENT_cipher(alg, lc, UCMODE, flags, kbits, blkbits, ivbits) … argument 281 static OSSL_FUNC_cipher_newctx_fn ossl_##alg##kbits##_##lc##_newctx; … 289 static OSSL_FUNC_cipher_get_params_fn ossl_##alg##_##kbits##_##lc##_get_params; … 294 static int ossl_##alg##_##kbits##_##lc##_get_params(OSSL_PARAM params[]) … 297 … flags, kbits, blkbits, ivbits); \ 299 static void *ossl_##alg##kbits##_##lc##_newctx(void *provctx) … 301 …return ossl_##alg##_##lc##_newctx(provctx, kbits); … 303 const OSSL_DISPATCH ossl_##alg##kbits##lc##_functions[] = { … 304 …{ OSSL_FUNC_CIPHER_NEWCTX, (void (*)(void))ossl_##alg##kbits##_##lc##_newctx }, … 312 …{ OSSL_FUNC_CIPHER_GET_PARAMS, (void (*)(void))ossl_##alg##_##kbits##_##lc##_get_params }…
|
H A D | cipher_aes_ocb.c | 306 static void *aes_ocb_newctx(void *provctx, size_t kbits, size_t blkbits, in aes_ocb_newctx() argument 316 ossl_cipher_generic_initkey(ctx, kbits, blkbits, ivbits, mode, flags, in aes_ocb_newctx() 317 ossl_prov_cipher_hw_aes_ocb(kbits), NULL); in aes_ocb_newctx() 528 #define IMPLEMENT_cipher(mode, UCMODE, flags, kbits, blkbits, ivbits) \ argument 529 static OSSL_FUNC_cipher_get_params_fn aes_##kbits##_##mode##_get_params; \ 530 static int aes_##kbits##_##mode##_get_params(OSSL_PARAM params[]) \ 533 flags, kbits, blkbits, ivbits); \ 535 static OSSL_FUNC_cipher_newctx_fn aes_##kbits##_##mode##_newctx; \ 536 static void *aes_##kbits##_##mode##_newctx(void *provctx) \ 538 return aes_##mode##_newctx(provctx, kbits, blkbits, ivbits, \ [all …]
|
H A D | cipher_des.c | 31 static void *des_newctx(void *provctx, size_t kbits, size_t blkbits, in des_newctx() argument 42 ossl_cipher_generic_initkey(ctx, kbits, blkbits, ivbits, mode, flags, in des_newctx() 151 kbits, blkbits, ivbits, block) \ argument 155 return des_newctx(provctx, kbits, blkbits, ivbits, \ 163 flags, kbits, blkbits, ivbits); \
|
H A D | cipher_tdes_common.c | 23 void *ossl_tdes_newctx(void *provctx, int mode, size_t kbits, size_t blkbits, in ossl_tdes_newctx() argument 34 ossl_cipher_generic_initkey(tctx, kbits, blkbits, ivbits, mode, flags, in ossl_tdes_newctx() 189 size_t kbits, size_t blkbits, size_t ivbits) in ossl_tdes_get_params() argument 205 kbits, blkbits, ivbits); in ossl_tdes_get_params()
|
H A D | cipher_tdes_wrap.c | 170 # define IMPLEMENT_WRAP_CIPHER(flags, kbits, blkbits, ivbits) \ argument 174 return ossl_tdes_newctx(provctx, EVP_CIPH_WRAP_MODE, kbits, blkbits, \ 182 kbits, blkbits, ivbits); \
|
H A D | ciphercommon.c | 43 size_t kbits, size_t blkbits, size_t ivbits) in ossl_cipher_generic_get_params() argument 83 if (p != NULL && !OSSL_PARAM_set_size_t(p, kbits / 8)) { in ossl_cipher_generic_get_params() 692 void ossl_cipher_generic_initkey(void *vctx, size_t kbits, size_t blkbits, in ossl_cipher_generic_initkey() argument 705 ctx->keylen = ((kbits) / 8); in ossl_cipher_generic_initkey()
|