Home
last modified time | relevance | path

Searched refs:taglen (Results 1 – 25 of 41) sorted by relevance

12

/openssl/util/
H A Dcavs-to-evptest.pl25 my $taglen = 0;
55 $taglen = $2;
72 $ct = substr($2, 0, length($2) - ($taglen * 2));
73 $tag = substr($2, $taglen * -2);
85 $taglen = $2;
99 if ($taglen > 0) {
/openssl/test/
H A Daesgcmtest.c97 int ctlen = 0, taglen = 0; in kat_test() local
99 return do_encrypt(NULL, ct, &ctlen, tag, &taglen) in kat_test()
101 && TEST_mem_eq(gcm_tag, sizeof(gcm_tag), tag, taglen) in kat_test()
102 && do_decrypt(gcm_iv, ct, ctlen, tag, taglen); in kat_test()
124 int ctlen = 0, taglen = 0; in ivgen_test() local
126 return do_encrypt(iv_gen, ct, &ctlen, tag, &taglen) in ivgen_test()
127 && do_decrypt(iv_gen, ct, ctlen, tag, taglen); in ivgen_test()
/openssl/ssl/record/methods/
H A Dtls13_meth.c21 size_t taglen, in tls13_set_crypto_state() argument
92 size_t nonce_len, offset, loop, hdrlen, taglen; in tls13_cipher() local
149 if (rec->length < rl->taglen + 1) in tls13_cipher()
151 rec->length -= rl->taglen; in tls13_cipher()
174 || !WPACKET_put_bytes_u16(&wpkt, rec->length + rl->taglen) in tls13_cipher()
190 || !EVP_MAC_final(mac_ctx, tag, &taglen, rl->taglen)) { in tls13_cipher()
196 memcpy(rec->data + rec->length, tag, rl->taglen); in tls13_cipher()
197 rec->length += rl->taglen; in tls13_cipher()
199 rl->taglen) != 0) { in tls13_cipher()
217 rl->taglen, in tls13_cipher()
[all …]
H A Dktls_meth.c32 size_t taglen) in ktls_int_check_supported_cipher() argument
132 size_t taglen) in ktls_int_check_supported_cipher() argument
150 if (taglen != EVP_CCM_TLS_TAG_LEN) in ktls_int_check_supported_cipher()
294 size_t taglen, in ktls_set_crypto_state() argument
315 if (!ktls_int_check_supported_cipher(rl, ciph, md, taglen)) in ktls_set_crypto_state()
408 const EVP_CIPHER *ciph, size_t taglen, in ktls_new_record_layer() argument
420 ciph, taglen, md, comp, prev, in ktls_new_record_layer()
431 taglen, mactype, md, comp); in ktls_new_record_layer()
H A Ddtls_meth.c630 const EVP_CIPHER *ciph, size_t taglen, in dtls_new_record_layer() argument
642 ciph, taglen, md, comp, prev, in dtls_new_record_layer()
682 taglen, mactype, md, comp); in dtls_new_record_layer()
754 && rl->taglen > 0)); in dtls_get_max_record_overhead()
755 assert(rl->md == NULL || (int)rl->taglen == EVP_MD_size(rl->md)); in dtls_get_max_record_overhead()
768 return DTLS1_RT_HEADER_LENGTH + rl->eivlen + blocksize + rl->taglen; in dtls_get_max_record_overhead()
H A Drecmethod_local.h105 size_t taglen,
346 size_t taglen; member
442 const EVP_CIPHER *ciph, size_t taglen,
/openssl/providers/implementations/ciphers/
H A Dciphercommon_ccm_hw.c33 unsigned char *tag, size_t taglen) in ossl_ccm_generic_auth_encrypt() argument
44 rv = (CRYPTO_ccm128_tag(&ctx->ccm_ctx, tag, taglen) > 0); in ossl_ccm_generic_auth_encrypt()
50 unsigned char *expected_tag, size_t taglen) in ossl_ccm_generic_auth_decrypt() argument
62 if (!CRYPTO_ccm128_tag(&ctx->ccm_ctx, tag, taglen) in ossl_ccm_generic_auth_decrypt()
63 || CRYPTO_memcmp(tag, expected_tag, taglen) != 0) in ossl_ccm_generic_auth_decrypt()
H A Dcipher_aes_ocb.c52 size_t ivlen, size_t taglen) in aes_generic_ocb_setiv() argument
54 return (CRYPTO_ocb128_setiv(&ctx->ocb, iv, ivlen, taglen) == 1); in aes_generic_ocb_setiv()
224 ctx->taglen)) in update_iv()
292 if (!aes_generic_ocb_gettag(ctx, ctx->tag, ctx->taglen)) in aes_ocb_block_final()
296 if (ctx->taglen == 0) in aes_ocb_block_final()
318 ctx->taglen = OCB_DEFAULT_TAG_LEN; in aes_ocb_newctx()
374 ctx->taglen = p->data_size; in aes_ocb_set_ctx_params()
380 if (p->data_size != ctx->taglen) { in aes_ocb_set_ctx_params()
434 if (!OSSL_PARAM_set_size_t(p, ctx->taglen)) { in aes_ocb_get_ctx_params()
470 if (!ctx->base.enc || p->data_size != ctx->taglen) { in aes_ocb_get_ctx_params()
[all …]
H A Dciphercommon_gcm_hw.c43 ctx->taglen = GCM_TAG_MAX_SIZE; in ossl_gcm_cipher_final()
45 if (CRYPTO_gcm128_finish(&ctx->gcm, tag, ctx->taglen) != 0) in ossl_gcm_cipher_final()
62 ctx->taglen = GCM_TAG_MAX_SIZE; in ossl_gcm_one_shot()
H A Dciphercommon_gcm.c38 ctx->taglen = UNINITIALISED_SIZET; in ossl_gcm_initctx()
173 size_t taglen = (ctx->taglen != UNINITIALISED_SIZET) ? ctx->taglen : in ossl_gcm_get_ctx_params() local
176 if (!OSSL_PARAM_set_size_t(p, taglen)) { in ossl_gcm_get_ctx_params()
223 || ctx->taglen == UNINITIALISED_SIZET) { in ossl_gcm_get_ctx_params()
274 ctx->taglen = sz; in ossl_gcm_set_ctx_params()
457 if (!ctx->enc && ctx->taglen == UNINITIALISED_SIZET) in gcm_cipher_internal()
H A Dcipher_aes_gcm_hw_vaes_avx512.inc183 ctx->taglen = GCM_TAG_MAX_SIZE;
185 ctx->taglen <= sizeof(gcmctx->Xi.c) ? ctx->taglen :
189 return !CRYPTO_memcmp(gcmctx->Xi.c, tag, ctx->taglen);
H A Dcipher_aes_siv.c40 ctx->taglen = SIV_LEN; in aes_siv_newctx()
168 || p->data_size != ctx->taglen in aes_siv_get_ctx_params()
169 || !OSSL_PARAM_set_octet_string(p, &sctx->tag.byte, ctx->taglen)) { in aes_siv_get_ctx_params()
175 if (p != NULL && !OSSL_PARAM_set_size_t(p, ctx->taglen)) { in aes_siv_get_ctx_params()
H A Dcipher_aes_gcm_hw_s390x.inc103 ctx->taglen = GCM_TAG_MAX_SIZE;
104 memcpy(tag, kma->t.b, ctx->taglen);
107 rc = (CRYPTO_memcmp(tag, kma->t.b, ctx->taglen) == 0);
116 unsigned char *tag, size_t taglen)
129 memcpy(tag, kma->t.b, taglen);
132 rc = (CRYPTO_memcmp(tag, kma->t.b, taglen) == 0);
H A Dcipher_aes_ocb.h31 size_t taglen; member
H A Dcipher_aes_siv.h28 size_t taglen; /* the taglen is the same as the sivlen */ member
/openssl/providers/implementations/include/prov/
H A Dciphercommon_ccm.h64 unsigned char *tag, size_t taglen));
68 unsigned char *tag, size_t taglen));
70 unsigned char *tag, size_t taglen));
101 unsigned char *tag, size_t taglen);
104 unsigned char *expected_tag, size_t taglen);
H A Dciphercommon_gcm.h55 size_t taglen; member
97 unsigned char *tag, size_t taglen));
/openssl/crypto/hpke/
H A Dhpke.c149 size_t taglen; in hpke_aead_dec() local
151 taglen = hctx->aead_info->taglen; in hpke_aead_dec()
152 if (ctlen <= taglen || *ptlen < ctlen - taglen) { in hpke_aead_dec()
187 taglen, (void *)(ct + ctlen - taglen))) { in hpke_aead_dec()
225 size_t taglen = 0; in hpke_aead_enc() local
228 taglen = hctx->aead_info->taglen; in hpke_aead_enc()
229 if (*ctlen <= taglen || ptlen > *ctlen - taglen) { in hpke_aead_enc()
233 if (!ossl_assert(taglen <= sizeof(tag))) { in hpke_aead_enc()
278 memcpy(ct + *ctlen, tag, taglen); in hpke_aead_enc()
279 *ctlen += taglen; in hpke_aead_enc()
[all …]
/openssl/ssl/
H A Dtls13_enc.c357 size_t *taglen) in derive_secret_key_and_iv() argument
386 *ivlen = *taglen = (size_t)mac_mdleni; in derive_secret_key_and_iv()
410 *taglen = EVP_CCM8_TLS_TAG_LEN; in derive_secret_key_and_iv()
412 *taglen = EVP_CCM_TLS_TAG_LEN; in derive_secret_key_and_iv()
417 *taglen = EVP_GCM_TLS_TAG_LEN; in derive_secret_key_and_iv()
420 *taglen = EVP_CHACHAPOLY_TLS_TAG_LEN; in derive_secret_key_and_iv()
483 size_t keylen, ivlen = EVP_MAX_IV_LENGTH, taglen; in tls13_change_cipher_state() local
681 &keylen, &iv, &ivlen, &taglen)) { in tls13_change_cipher_state()
734 ivlen, NULL, 0, cipher, taglen, in tls13_change_cipher_state()
765 size_t keylen, ivlen, taglen; in tls13_update_key() local
[all …]
H A Dt1_enc.c130 size_t taglen = 0; in tls1_change_cipher_state() local
176 taglen = EVP_GCM_TLS_TAG_LEN; in tls1_change_cipher_state()
181 taglen = EVP_CCM8_TLS_TAG_LEN; in tls1_change_cipher_state()
183 taglen = EVP_CCM_TLS_TAG_LEN; in tls1_change_cipher_state()
187 taglen = EVP_CHACHAPOLY_TLS_TAG_LEN; in tls1_change_cipher_state()
190 taglen = s->s3.tmp.new_mac_secret_size; in tls1_change_cipher_state()
237 mac_secret_size, c, taglen, mac_type, in tls1_change_cipher_state()
/openssl/crypto/evp/
H A De_aria.c39 int taglen; member
266 gctx->taglen = -1; in aria_gcm_ctrl()
292 gctx->taglen = arg; in aria_gcm_ctrl()
297 || gctx->taglen < 0) in aria_gcm_ctrl()
482 if (gctx->taglen < 0) in aria_gcm_cipher()
486 gctx->taglen) != 0) in aria_gcm_cipher()
492 gctx->taglen = 16; in aria_gcm_cipher()
H A De_aes.c54 int taglen; member
115 int taglen; member
942 int taglen; member
1451 gctx->taglen = -1; in s390x_aes_gcm_ctrl()
1489 gctx->taglen = arg; in s390x_aes_gcm_ctrl()
1747 gctx->taglen = 16; in s390x_aes_gcm_cipher()
2659 gctx->taglen = -1; in aes_gcm_ctrl()
2685 gctx->taglen = arg; in aes_gcm_ctrl()
3171 gctx->taglen = 16; in aes_gcm_cipher()
3859 octx->taglen = 16; in aes_ocb_ctrl()
[all …]
/openssl/crypto/modes/
H A Docb128.c214 size_t len, size_t taglen) in CRYPTO_ocb128_setiv() argument
224 if ((len > 15) || (len < 1) || (taglen > 16) || (taglen < 1)) { in CRYPTO_ocb128_setiv()
232 nonce[0] = ((taglen * 8) % 128) << 1; in CRYPTO_ocb128_setiv()
/openssl/crypto/cms/
H A Dcms_enc.c108 if (ec->taglen > 0 in ossl_cms_EncryptedContent_init_bio()
110 ec->taglen, ec->tag) <= 0) { in ossl_cms_EncryptedContent_init_bio()
H A Dcms_env.c1226 ec->taglen = aenv->mac->length; in ossl_cms_AuthEnvelopedData_init_bio()
1300 int taglen, ok = 0; in ossl_cms_AuthEnvelopedData_final() local
1311 taglen = EVP_CIPHER_CTX_get_tag_length(ctx); in ossl_cms_AuthEnvelopedData_final()
1312 if (taglen <= 0 in ossl_cms_AuthEnvelopedData_final()
1313 || (tag = OPENSSL_malloc(taglen)) == NULL in ossl_cms_AuthEnvelopedData_final()
1314 || EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_GET_TAG, taglen, in ossl_cms_AuthEnvelopedData_final()
1320 if (!ASN1_OCTET_STRING_set(cms->d.authEnvelopedData->mac, tag, taglen)) in ossl_cms_AuthEnvelopedData_final()

Completed in 50 milliseconds

12