Home
last modified time | relevance | path

Searched refs:enc_ctx (Results 1 – 13 of 13) sorted by relevance

/freebsd/crypto/openssl/ssl/record/methods/
H A Dtls13_meth.c63 ciph_ctx = rl->enc_ctx = EVP_CIPHER_CTX_new(); in tls13_set_crypto_state()
91 EVP_CIPHER_CTX *enc_ctx; in tls13_cipher() local
111 enc_ctx = rl->enc_ctx; /* enc_ctx is ignored when rl->mac_ctx != NULL */ in tls13_cipher()
115 if (enc_ctx == NULL && rl->mac_ctx == NULL) { in tls13_cipher()
136 int ivlen = EVP_CIPHER_CTX_get_iv_length(enc_ctx); in tls13_cipher()
211 cipher = EVP_CIPHER_CTX_get0_cipher(enc_ctx); in tls13_cipher()
218 if (EVP_CipherInit_ex(enc_ctx, NULL, NULL, NULL, nonce, sending) <= 0 in tls13_cipher()
219 …|| (!sending && EVP_CIPHER_CTX_ctrl(enc_ctx, EVP_CTRL_AEAD_SET_TAG, rl->taglen, rec->data + rec->l… in tls13_cipher()
229 && EVP_CipherUpdate(enc_ctx, NULL, &lenu, NULL, in tls13_cipher()
232 || EVP_CipherUpdate(enc_ctx, NULL, &lenu, recheader, in tls13_cipher()
[all …]
H A Dtls_multib.c31 && (EVP_CIPHER_get_flags(EVP_CIPHER_CTX_get0_cipher(rl->enc_ctx)) in tls_is_multiblock_capable()
109 packlen = EVP_CIPHER_CTX_ctrl(rl->enc_ctx, in tls_write_records_multiblock_int()
130 packleni = EVP_CIPHER_CTX_ctrl(rl->enc_ctx, in tls_write_records_multiblock_int()
143 if (EVP_CIPHER_CTX_ctrl(rl->enc_ctx, in tls_write_records_multiblock_int()
H A Dssl3_meth.c35 if ((rl->enc_ctx = EVP_CIPHER_CTX_new()) == NULL) { in ssl3_set_crypto_state()
39 ciph_ctx = rl->enc_ctx; in ssl3_set_crypto_state()
113 ds = rl->enc_ctx; in ssl3_cipher()
238 && EVP_CIPHER_CTX_get_mode(rl->enc_ctx) == EVP_CIPH_CBC_MODE in ssl3_mac()
H A Dtls1_meth.c36 if ((rl->enc_ctx = EVP_CIPHER_CTX_new()) == NULL) { in tls1_set_crypto_state()
41 ciph_ctx = rl->enc_ctx; in tls1_set_crypto_state()
199 ds = rl->enc_ctx; in tls1_cipher()
200 if (!ossl_assert(rl->enc_ctx != NULL)) { in tls1_cipher()
205 enc = EVP_CIPHER_CTX_get0_cipher(rl->enc_ctx); in tls1_cipher()
530 && EVP_CIPHER_CTX_get_mode(rl->enc_ctx) == EVP_CIPH_CBC_MODE in tls1_mac()
H A Ddtls_meth.c219 && (rl->enc_ctx != NULL) in dtls_process_record()
748 if (rl->enc_ctx != NULL && (EVP_CIPHER_CTX_get_mode(rl->enc_ctx) == EVP_CIPH_CBC_MODE)) in dtls_get_max_record_overhead()
749 blocksize = EVP_CIPHER_CTX_get_block_size(rl->enc_ctx); in dtls_get_max_record_overhead()
758 assert(rl->enc_ctx == NULL || ((blocksize == 0 || rl->eivlen > 0) && rl->taglen > 0)); in dtls_get_max_record_overhead()
H A Dtls_common.c736 && rl->enc_ctx != NULL in tls_get_more_records()
737 && (EVP_CIPHER_get_flags(EVP_CIPHER_CTX_get0_cipher(rl->enc_ctx)) in tls_get_more_records()
887 if (rl->enc_ctx != NULL in tls_get_more_records()
1464 EVP_CIPHER_CTX_free(rl->enc_ctx); in tls_int_free()
1536 && rl->enc_ctx != NULL in tls_get_max_records_default()
1537 && (EVP_CIPHER_get_flags(EVP_CIPHER_CTX_get0_cipher(rl->enc_ctx)) in tls_get_max_records_default()
1741 if (rl->version == TLS1_3_VERSION && rl->enc_ctx != NULL) { in tls_post_encryption_processing_default()
H A Drecmethod_local.h293 EVP_CIPHER_CTX *enc_ctx; member
/freebsd/crypto/krb5/src/lib/crypto/builtin/enc_provider/
H A Daes.c40 aes_encrypt_ctx enc_ctx; member
91 k5_iEncExpandKey128(key->keyblock.contents, cache->enc_ctx.ks); in aesni_expand_enc_key()
93 k5_iEncExpandKey256(key->keyblock.contents, cache->enc_ctx.ks); in aesni_expand_enc_key()
94 cache->enc_ctx.inf.l = 1; in aesni_expand_enc_key()
117 d.expanded_key = cache->enc_ctx.ks; in aesni_enc()
172 CACHE(key)->enc_ctx.inf.l = CACHE(key)->dec_ctx.inf.l = 0; in init_key_cache()
180 if (CACHE(key)->enc_ctx.inf.l != 0) in expand_enc_key()
185 &CACHE(key)->enc_ctx) != EXIT_SUCCESS) in expand_enc_key()
211 if (aes_encrypt(data, data, &CACHE(key)->enc_ctx) != EXIT_SUCCESS) in cbc_enc()
H A Dcamellia.c39 camellia_ctx enc_ctx, dec_ctx; member
61 CACHE(key)->enc_ctx.keybitlen = CACHE(key)->dec_ctx.keybitlen = 0; in init_key_cache()
68 if (CACHE(key)->enc_ctx.keybitlen) in expand_enc_key()
71 &CACHE(key)->enc_ctx) != camellia_good) in expand_enc_key()
91 if (camellia_enc_blk(data, data, &CACHE(key)->enc_ctx) != in cbc_enc()
/freebsd/crypto/openssl/test/
H A Dbad_dtls_test.c481 EVP_CIPHER_CTX *enc_ctx = NULL; in send_record() local
530 || !TEST_ptr(enc_ctx = EVP_CIPHER_CTX_new()) in send_record()
531 || !TEST_true(EVP_CipherInit_ex(enc_ctx, EVP_aes_128_cbc(), NULL, in send_record()
533 || !TEST_int_ge(EVP_Cipher(enc_ctx, enc, enc, len), 0)) in send_record()
551 EVP_CIPHER_CTX_free(enc_ctx); in send_record()
/freebsd/sys/crypto/openssl/
H A Dossl.h70 struct ossl_cipher_context enc_ctx; member
H A Dossl_aes.c109 key = s->enc_ctx; in ossl_aes_cbc()
199 memcpy(&ctx, &s->enc_ctx, sizeof(struct ossl_gcm_context)); in ossl_aes_gcm()
H A Dossl.c267 8 * csp->csp_cipher_klen, &s->cipher.enc_ctx); in ossl_newsession_cipher()