/openssl/util/ |
H A D | cavs-to-evptest.pl | 25 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 D | aesgcmtest.c | 97 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 D | tls13_meth.c | 21 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 D | ktls_meth.c | 32 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 D | dtls_meth.c | 630 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 D | recmethod_local.h | 105 size_t taglen, 346 size_t taglen; member 442 const EVP_CIPHER *ciph, size_t taglen,
|
/openssl/providers/implementations/ciphers/ |
H A D | ciphercommon_ccm_hw.c | 33 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 D | cipher_aes_ocb.c | 52 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 D | ciphercommon_gcm_hw.c | 43 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 D | ciphercommon_gcm.c | 38 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 D | cipher_aes_gcm_hw_vaes_avx512.inc | 183 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 D | cipher_aes_siv.c | 40 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 D | cipher_aes_gcm_hw_s390x.inc | 103 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 D | cipher_aes_ocb.h | 31 size_t taglen; member
|
H A D | cipher_aes_siv.h | 28 size_t taglen; /* the taglen is the same as the sivlen */ member
|
/openssl/providers/implementations/include/prov/ |
H A D | ciphercommon_ccm.h | 64 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 D | ciphercommon_gcm.h | 55 size_t taglen; member 97 unsigned char *tag, size_t taglen));
|
/openssl/crypto/hpke/ |
H A D | hpke.c | 149 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 D | tls13_enc.c | 357 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 D | t1_enc.c | 130 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 D | e_aria.c | 39 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 D | e_aes.c | 54 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 D | ocb128.c | 214 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 D | cms_enc.c | 108 if (ec->taglen > 0 in ossl_cms_EncryptedContent_init_bio() 110 ec->taglen, ec->tag) <= 0) { in ossl_cms_EncryptedContent_init_bio()
|
H A D | cms_env.c | 1226 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()
|