Home
last modified time | relevance | path

Searched refs:ciph (Results 1 – 25 of 43) sorted by relevance

12

/freebsd/crypto/openssl/test/
H A Dcipher_overhead_test.c14 static int cipher_enabled(const SSL_CIPHER *ciph) in cipher_enabled() argument
20 if ((ciph->algorithm_mac & SSL_AEAD) != 0) in cipher_enabled()
23 if (ciph->algorithm_enc != SSL_eNULL in cipher_enabled()
24 && EVP_get_cipherbynid(SSL_CIPHER_get_cipher_nid(ciph)) == NULL) in cipher_enabled()
27 if (EVP_get_digestbynid(SSL_CIPHER_get_digest_nid(ciph)) == NULL) in cipher_enabled()
36 const SSL_CIPHER *ciph; in cipher_overhead() local
40 ciph = ssl3_get_cipher(i); in cipher_overhead()
41 if (!ciph->min_dtls) in cipher_overhead()
43 if (!cipher_enabled(ciph)) { in cipher_overhead()
44 TEST_skip("Skipping disabled cipher %s", ciph->name); in cipher_overhead()
[all …]
H A Dtls13encryptiontest.c285 const EVP_CIPHER *ciph = EVP_aes_128_gcm(); in test_tls13_encryption() local
302 ivlen = EVP_CIPHER_get_iv_length(ciph); in test_tls13_encryption()
/freebsd/usr.sbin/fwcontrol/
H A Dfwmpegts.c151 struct ciphdr *ciph; in mpegtsrecv() local
210 ciph = (struct ciphdr *)(ptr + 1); /* skip iso header */ in mpegtsrecv()
211 if (ciph->fmt != CIP_FMT_MPEG) in mpegtsrecv()
212 errx(1, "unknown format 0x%x", ciph->fmt); in mpegtsrecv()
213 if (ciph->fn != 3) { in mpegtsrecv()
216 ciph->fn); in mpegtsrecv()
218 ptr = (uint32_t *) (ciph + 1); /* skip cip header */ in mpegtsrecv()
231 ciph->len, ciph->len * 4); in mpegtsrecv()
234 ciph->fn, (1<<ciph->fn) ); in mpegtsrecv()
235 fprintf(stderr, "QCP (CIP header): %d\n", ciph->qpc ); in mpegtsrecv()
[all …]
H A Dfwdv.c96 struct ciphdr *ciph; in dvrecv() local
171 ciph = (struct ciphdr *)(ptr + 1); /* skip iso header */ in dvrecv()
172 if (ciph->fmt != CIP_FMT_DVCR) in dvrecv()
173 errx(1, "unknown format 0x%x", ciph->fmt); in dvrecv()
174 ptr = (u_int32_t *) (ciph + 1); /* skip cip header */ in dvrecv()
176 if (ciph->fdf.dv.cyc != 0xffff && k == 0) { in dvrecv()
177 fprintf(stderr, "0x%04x\n", ntohs(ciph->fdf.dv.cyc)); in dvrecv()
184 (char *)dv < (char *)(ptr + ciph->len); in dvrecv()
192 system = ciph->fdf.dv.fs; in dvrecv()
263 struct ciphdr *ciph; in dvsend() local
[all …]
H A Dfwcontrol.c673 struct ciphdr *ciph; in detect_recv_fn() local
710 ciph = (struct ciphdr *)(ptr + 1); in detect_recv_fn()
712 switch(ciph->fmt) { in detect_recv_fn()
722 errx(1, "Unsupported format for receiving: fmt=0x%x", ciph->fmt); in detect_recv_fn()
/freebsd/crypto/openssl/crypto/evp/
H A Dpmeth_lib.c148 && ctx->op.ciph.algctx != NULL) in evp_pkey_ctx_state()
379 if (ctx->op.ciph.algctx != NULL && ctx->op.ciph.cipher != NULL) in evp_pkey_ctx_free_old_ops()
380 ctx->op.ciph.cipher->freectx(ctx->op.ciph.algctx); in evp_pkey_ctx_free_old_ops()
381 EVP_ASYM_CIPHER_free(ctx->op.ciph.cipher); in evp_pkey_ctx_free_old_ops()
382 ctx->op.ciph.algctx = NULL; in evp_pkey_ctx_free_old_ops()
383 ctx->op.ciph.cipher = NULL; in evp_pkey_ctx_free_old_ops()
531 if (pctx->op.ciph.cipher != NULL) { in EVP_PKEY_CTX_dup()
532 rctx->op.ciph.cipher = pctx->op.ciph.cipher; in EVP_PKEY_CTX_dup()
533 if (!EVP_ASYM_CIPHER_up_ref(rctx->op.ciph.cipher)) in EVP_PKEY_CTX_dup()
536 if (pctx->op.ciph.algctx != NULL) { in EVP_PKEY_CTX_dup()
[all …]
H A Dasymcipher.c154 ctx->op.ciph.cipher = cipher; in evp_pkey_asym_cipher_init()
155 ctx->op.ciph.algctx = cipher->newctx(ossl_provider_ctx(cipher->prov)); in evp_pkey_asym_cipher_init()
156 if (ctx->op.ciph.algctx == NULL) { in evp_pkey_asym_cipher_init()
171 ret = cipher->encrypt_init(ctx->op.ciph.algctx, provkey, params); in evp_pkey_asym_cipher_init()
180 ret = cipher->decrypt_init(ctx->op.ciph.algctx, provkey, params); in evp_pkey_asym_cipher_init()
258 if (ctx->op.ciph.algctx == NULL) in EVP_PKEY_encrypt()
261 cipher = ctx->op.ciph.cipher; in EVP_PKEY_encrypt()
264 ret = cipher->encrypt(ctx->op.ciph.algctx, out, outlen, (out == NULL ? 0 : *outlen), in, inlen); in EVP_PKEY_encrypt()
307 if (ctx->op.ciph.algctx == NULL) in EVP_PKEY_decrypt()
310 cipher = ctx->op.ciph.cipher; in EVP_PKEY_decrypt()
[all …]
H A Dnames.c199 void (*fn)(const EVP_CIPHER *ciph,
212 void EVP_CIPHER_do_all(void (*fn)(const EVP_CIPHER *ciph, in EVP_CIPHER_do_all() argument
226 void EVP_CIPHER_do_all_sorted(void (*fn)(const EVP_CIPHER *ciph, in EVP_CIPHER_do_all_sorted() argument
243 void (*fn)(const EVP_MD *ciph,
H A Devp_local.h374 int evp_do_ciph_getparams(const EVP_CIPHER *ciph, OSSL_PARAM params[]);
375 int evp_do_ciph_ctx_getparams(const EVP_CIPHER *ciph, void *provctx,
377 int evp_do_ciph_ctx_setparams(const EVP_CIPHER *ciph, void *provctx,
/freebsd/crypto/openssl/ssl/record/methods/
H A Dtls1_meth.c23 const EVP_CIPHER *ciph, in tls1_set_crypto_state() argument
62 if ((EVP_CIPHER_get_flags(ciph) & EVP_CIPH_FLAG_AEAD_CIPHER) == 0) { in tls1_set_crypto_state()
88 if (EVP_CIPHER_get_mode(ciph) == EVP_CIPH_GCM_MODE) { in tls1_set_crypto_state()
89 if (!EVP_CipherInit_ex(ciph_ctx, ciph, NULL, key, NULL, enc) in tls1_set_crypto_state()
96 } else if (EVP_CIPHER_get_mode(ciph) == EVP_CIPH_CCM_MODE) { in tls1_set_crypto_state()
97 if (!EVP_CipherInit_ex(ciph_ctx, ciph, NULL, NULL, NULL, enc) in tls1_set_crypto_state()
112 if (!EVP_CipherInit_ex(ciph_ctx, ciph, NULL, key, iv, enc)) { in tls1_set_crypto_state()
118 if ((EVP_CIPHER_get_flags(ciph) & EVP_CIPH_FLAG_AEAD_CIPHER) != 0 in tls1_set_crypto_state()
132 && !ossl_set_tls_provider_parameters(rl, ciph_ctx, ciph, md)) { in tls1_set_crypto_state()
H A Dktls_meth.c290 const EVP_CIPHER *ciph, in ktls_set_crypto_state() argument
312 if (!ktls_int_check_supported_cipher(rl, ciph, md, taglen)) in ktls_set_crypto_state()
325 if (!ktls_configure_crypto(rl->libctx, rl->version, ciph, md, rl->sequence, in ktls_set_crypto_state()
404 const EVP_CIPHER *ciph, size_t taglen, in ktls_new_record_layer() argument
416 ciph, taglen, md, comp, prev, in ktls_new_record_layer()
426 ivlen, mackey, mackeylen, ciph, in ktls_new_record_layer()
H A Dtls13_meth.c20 const EVP_CIPHER *ciph, in tls13_set_crypto_state() argument
44 if (EVP_CIPHER_is_a(ciph, "NULL") && mactype == NID_hmac && md != NULL) { in tls13_set_crypto_state()
69 mode = EVP_CIPHER_get_mode(ciph); in tls13_set_crypto_state()
71 if (EVP_CipherInit_ex(ciph_ctx, ciph, NULL, NULL, NULL, enc) <= 0 in tls13_set_crypto_state()
H A Dssl3_meth.c21 const EVP_CIPHER *ciph, in ssl3_set_crypto_state() argument
62 if (!EVP_CipherInit_ex(ciph_ctx, ciph, NULL, key, iv, enc)) { in ssl3_set_crypto_state()
72 && !ossl_set_tls_provider_parameters(rl, ciph_ctx, ciph, md)) { in ssl3_set_crypto_state()
H A Drecmethod_local.h103 const EVP_CIPHER *ciph,
408 const EVP_CIPHER *ciph,
440 const EVP_CIPHER *ciph, size_t taglen,
H A Dtls_common.c62 const EVP_CIPHER *ciph, in ossl_set_tls_provider_parameters() argument
73 if ((EVP_CIPHER_get_flags(ciph) & EVP_CIPH_FLAG_AEAD_CIPHER) == 0 in ossl_set_tls_provider_parameters()
1255 const EVP_CIPHER *ciph, size_t taglen, in tls_int_new_record_layer() argument
1375 && !EVP_CIPHER_is_a(ciph, "NULL") in tls_int_new_record_layer()
1376 && !EVP_CIPHER_is_a(ciph, "RC4")) { in tls_int_new_record_layer()
1397 const EVP_CIPHER *ciph, size_t taglen, in tls_new_record_layer() argument
1409 ciph, taglen, md, comp, prev, in tls_new_record_layer()
1439 ivlen, mackey, mackeylen, ciph, in tls_new_record_layer()
H A Ddtls_meth.c636 const EVP_CIPHER *ciph, size_t taglen, in dtls_new_record_layer() argument
648 ciph, taglen, md, comp, prev, in dtls_new_record_layer()
687 ivlen, mackey, mackeylen, ciph, in dtls_new_record_layer()
H A Dtlsany_meth.c21 const EVP_CIPHER *ciph, in tls_any_set_crypto_state() argument
/freebsd/crypto/openssl/crypto/cms/
H A Dcms_enc.c226 int CMS_EncryptedData_set1_key(CMS_ContentInfo *cms, const EVP_CIPHER *ciph, in CMS_EncryptedData_set1_key() argument
235 if (ciph) { in CMS_EncryptedData_set1_key()
236 if ((EVP_CIPHER_get_flags(ciph) & EVP_CIPH_FLAG_AEAD_CIPHER) != 0) { in CMS_EncryptedData_set1_key()
256 return ossl_cms_EncryptedContent_init(ec, ciph, key, keylen, in CMS_EncryptedData_set1_key()
/freebsd/crypto/openssl/doc/man3/
H A DCMS_EncryptedData_set1_key.pod12 int CMS_EncryptedData_set1_key(CMS_ContentInfo *cms, const EVP_CIPHER *ciph,
18 the appropriate attributes to I<ciph>, it makes a copy of the symmetric I<key>
/freebsd/crypto/openssl/ssl/
H A Ds3_enc.c96 const EVP_CIPHER *ciph; in ssl3_change_cipher_state() local
104 ciph = s->s3.tmp.new_sym_enc; in ssl3_change_cipher_state()
122 key_len = EVP_CIPHER_get_key_length(ciph); in ssl3_change_cipher_state()
123 iv_len = EVP_CIPHER_get_iv_length(ciph); in ssl3_change_cipher_state()
151 md_len, ciph, 0, NID_undef, md, comp, NULL)) { in ssl3_change_cipher_state()
H A Dtls13_enc.c349 const EVP_CIPHER *ciph, in derive_secret_key_and_iv() argument
378 if (EVP_CIPHER_is_a(ciph, "NULL") in derive_secret_key_and_iv()
391 *keylen = EVP_CIPHER_get_key_length(ciph); in derive_secret_key_and_iv()
393 mode = EVP_CIPHER_get_mode(ciph); in derive_secret_key_and_iv()
423 iivlen = EVP_CIPHER_get_iv_length(ciph); in derive_secret_key_and_iv()
H A Dd1_lib.c927 const SSL_CIPHER *ciph = SSL_get_current_cipher(ssl); in DTLS_get_data_mtu() local
936 if (ciph == NULL) in DTLS_get_data_mtu()
939 if (!ssl_cipher_get_overhead(ciph, &mac_overhead, &int_overhead, in DTLS_get_data_mtu()
/freebsd/crypto/openssl/ssl/quic/
H A Dquic_tls.c104 const EVP_CIPHER *ciph, size_t taglen, in quic_new_record_layer() argument
161 if (EVP_CIPHER_is_a(ciph, "AES-128-GCM")) { in quic_new_record_layer()
163 } else if (EVP_CIPHER_is_a(ciph, "AES-256-GCM")) { in quic_new_record_layer()
165 } else if (EVP_CIPHER_is_a(ciph, "CHACHA20-POLY1305")) { in quic_new_record_layer()
/freebsd/crypto/openssl/providers/implementations/ciphers/
H A Dcipher_aes_ocb.c161 size_t inl, OSSL_ocb_cipher_fn ciph) in aes_ocb_block_update_internal() argument
176 if (!ciph(ctx, buf, out, AES_BLOCK_SIZE)) { in aes_ocb_block_update_internal()
191 if (!ciph(ctx, in, out, nextblocks)) { in aes_ocb_block_update_internal()
/freebsd/crypto/openssl/include/internal/
H A Drecordmethod.h126 const EVP_CIPHER *ciph,

12