| /freebsd/sys/dev/sfxge/common/ |
| H A D | efx_vpd.c | 480 uint16_t taglen; in efx_vpd_hunk_length() local 487 &tag, &taglen)) != 0) in efx_vpd_hunk_length() 489 offset += taglen; in efx_vpd_hunk_length() 515 uint16_t taglen; in efx_vpd_hunk_verify() local 529 &tag, &taglen)) != 0) in efx_vpd_hunk_verify() 536 for (pos = 0; pos != taglen; pos += 3 + keylen) { in efx_vpd_hunk_verify() 544 taglen, pos, &keyword, &keylen)) != 0) in efx_vpd_hunk_verify() 562 offset += taglen; in efx_vpd_hunk_verify() 668 uint16_t taglen; in efx_vpd_hunk_next() local 677 &tag, &taglen)) != 0) in efx_vpd_hunk_next() [all …]
|
| /freebsd/crypto/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) {
|
| /freebsd/crypto/openssl/ssl/record/methods/ |
| H A D | tls13_meth.c | 21 size_t taglen, in tls13_set_crypto_state() argument 76 && EVP_CIPHER_CTX_ctrl(ciph_ctx, EVP_CTRL_AEAD_SET_TAG, taglen, in tls13_set_crypto_state() 94 size_t nonce_len, offset, loop, hdrlen, taglen; in tls13_cipher() local 151 if (rec->length < rl->taglen + 1) in tls13_cipher() 153 rec->length -= rl->taglen; in tls13_cipher() 176 || !WPACKET_put_bytes_u16(&wpkt, rec->length + rl->taglen) in tls13_cipher() 192 || !EVP_MAC_final(mac_ctx, tag, &taglen, rl->taglen)) { in tls13_cipher() 198 memcpy(rec->data + rec->length, tag, rl->taglen); in tls13_cipher() 199 rec->length += rl->taglen; in tls13_cipher() 201 rl->taglen) in tls13_cipher() [all …]
|
| H A D | ktls_meth.c | 32 size_t taglen) in ktls_int_check_supported_cipher() argument 131 size_t taglen) in ktls_int_check_supported_cipher() argument 149 if (taglen != EVP_CCM_TLS_TAG_LEN) in ktls_int_check_supported_cipher() 291 size_t taglen, in ktls_set_crypto_state() argument 312 if (!ktls_int_check_supported_cipher(rl, ciph, md, taglen)) 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() 427 taglen, mactype, md, comp); in ktls_new_record_layer()
|
| H A D | dtls_meth.c | 579 const EVP_CIPHER *ciph, size_t taglen, in dtls_new_record_layer() argument 591 ciph, taglen, md, comp, prev, in dtls_new_record_layer() 629 taglen, mactype, md, comp); in dtls_new_record_layer() 699 assert(rl->enc_ctx == NULL || ((blocksize == 0 || rl->eivlen > 0) && rl->taglen > 0)); in dtls_get_max_record_overhead() 700 assert(rl->md == NULL || (int)rl->taglen == EVP_MD_size(rl->md)); in dtls_get_max_record_overhead() 713 return DTLS1_RT_HEADER_LENGTH + rl->eivlen + blocksize + rl->taglen; in dtls_get_max_record_overhead()
|
| /freebsd/crypto/openssl/test/ |
| H A D | aesgcmtest.c | 106 int ctlen = 0, taglen = 0; in kat_test() local 108 return do_encrypt(NULL, ct, &ctlen, tag, &taglen) in kat_test() 110 && TEST_mem_eq(gcm_tag, sizeof(gcm_tag), tag, taglen) in kat_test() 111 && do_decrypt(gcm_iv, ct, ctlen, tag, taglen); in kat_test() 133 int ctlen = 0, taglen = 0; in ivgen_test() local 135 return do_encrypt(iv_gen, ct, &ctlen, tag, &taglen) in ivgen_test() 136 && do_decrypt(iv_gen, ct, ctlen, tag, taglen); in ivgen_test()
|
| H A D | fake_pipelineprov.c | 180 size_t taglen, i; in fake_pipeline_aead_get_ctx_params() local 205 if (!OSSL_PARAM_get_octet_ptr(p, (const void **)&aead_tags, &taglen)) { in fake_pipeline_aead_get_ctx_params() 212 taglen); in fake_pipeline_aead_get_ctx_params() 227 size_t taglen, i; in fake_pipeline_aead_set_ctx_params() local 233 if (!OSSL_PARAM_get_octet_ptr(p, (const void **)&aead_tags, &taglen)) { in fake_pipeline_aead_set_ctx_params() 240 taglen); in fake_pipeline_aead_set_ctx_params()
|
| /freebsd/crypto/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 45 rv = (CRYPTO_ccm128_tag(&ctx->ccm_ctx, tag, taglen) > 0); in ossl_ccm_generic_auth_encrypt() 51 unsigned char *expected_tag, size_t taglen) in ossl_ccm_generic_auth_decrypt() argument 64 if (!CRYPTO_ccm128_tag(&ctx->ccm_ctx, tag, taglen) in ossl_ccm_generic_auth_decrypt() 65 || CRYPTO_memcmp(tag, expected_tag, taglen) != 0) in ossl_ccm_generic_auth_decrypt()
|
| H A D | cipher_aes_ocb.c | 50 size_t ivlen, size_t taglen) in aes_generic_ocb_setiv() argument 52 return (CRYPTO_ocb128_setiv(&ctx->ocb, iv, ivlen, taglen) == 1); in aes_generic_ocb_setiv() 70 return (CRYPTO_ocb128_finish(&ctx->ocb, ctx->tag, ctx->taglen) == 0); in aes_generic_ocb_final() 222 ctx->taglen)) in update_iv() 290 if (!aes_generic_ocb_gettag(ctx, ctx->tag, ctx->taglen)) in aes_ocb_block_final() 294 if (ctx->taglen == 0) in aes_ocb_block_final() 316 ctx->taglen = OCB_DEFAULT_TAG_LEN; in aes_ocb_newctx() 372 ctx->taglen = p->data_size; in aes_ocb_set_ctx_params() 378 if (p->data_size != ctx->taglen) { in aes_ocb_set_ctx_params() 432 if (!OSSL_PARAM_set_size_t(p, ctx->taglen)) { in aes_ocb_get_ctx_params() [all …]
|
| H A D | ciphercommon_gcm_hw.c | 42 ctx->taglen = GCM_TAG_MAX_SIZE; in ossl_gcm_cipher_final() 44 if (CRYPTO_gcm128_finish(&ctx->gcm, tag, ctx->taglen) != 0) in ossl_gcm_cipher_final() 61 ctx->taglen = GCM_TAG_MAX_SIZE; in ossl_gcm_one_shot()
|
| H A D | ciphercommon_gcm.c | 31 static int gcm_fips_taglen_approved(size_t taglen) 33 return taglen == UNINITIALISED_SIZET || taglen == 4 || taglen == 8 in ossl_gcm_initctx() 34 || (taglen >= 12 && taglen <= GCM_TAG_MAX_SIZE); in ossl_gcm_initctx() 47 ctx->taglen = UNINITIALISED_SIZET; 181 size_t taglen = (ctx->taglen != UNINITIALISED_SIZET) ? ctx->taglen in ossl_gcm_get_ctx_params() 172 size_t taglen = (ctx->taglen != UNINITIALISED_SIZET) ? ctx->taglen : GCM_TAG_MAX_SIZE; ossl_gcm_get_ctx_params() local [all...] |
| 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() 159 || p->data_size != ctx->taglen in aes_siv_get_ctx_params() 160 || !OSSL_PARAM_set_octet_string(p, &sctx->tag.byte, ctx->taglen)) { in aes_siv_get_ctx_params() 166 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);
|
| /freebsd/crypto/openssl/providers/implementations/include/prov/ |
| H A D | ciphercommon_ccm.h | 55 …*ctx, const unsigned char *in, unsigned char *out, size_t len, unsigned char *tag, size_t taglen)); 56 …*ctx, const unsigned char *in, unsigned char *out, size_t len, unsigned char *tag, size_t taglen)); 57 PROV_CIPHER_FUNC(int, CCM_gettag, (PROV_CCM_CTX *ctx, unsigned char *tag, size_t taglen)); 88 unsigned char *tag, size_t taglen); 91 unsigned char *expected_tag, size_t taglen);
|
| H A D | ciphercommon_gcm.h | 55 size_t taglen; member 89 …n, const unsigned char *in, size_t in_len, unsigned char *out, unsigned char *tag, size_t taglen));
|
| /freebsd/sys/netgraph/ |
| H A D | ng_tag.h | 64 #define NG_TAG_HOOKIN_SIZE(taglen) \ argument 65 (sizeof(struct ng_tag_hookin) + (taglen)) 67 #define NG_TAG_HOOKOUT_SIZE(taglen) \ argument 68 (sizeof(struct ng_tag_hookout) + (taglen))
|
| /freebsd/crypto/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() 182 if (EVP_DecryptUpdate(ctx, pt, &len, ct, ctlen - taglen) != 1) { in hpke_aead_dec() 188 taglen, (void *)(ct + ctlen - taglen))) { in hpke_aead_dec() 226 size_t taglen = 0; in hpke_aead_enc() local 229 taglen = hctx->aead_info->taglen; in hpke_aead_enc() 230 if (*ctlen <= taglen || ptlen > *ctlen - taglen) { in hpke_aead_enc() 234 if (!ossl_assert(taglen <= sizeof(tag))) { in hpke_aead_enc() 276 if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_GET_TAG, taglen, tag) != 1) { in hpke_aead_enc() [all …]
|
| /freebsd/crypto/openssl/ssl/ |
| H A D | tls13_enc.c | 358 size_t *taglen) in derive_secret_key_and_iv() argument 387 *ivlen = *taglen = (size_t)mac_mdleni; in derive_secret_key_and_iv() 411 *taglen = EVP_CCM8_TLS_TAG_LEN; in derive_secret_key_and_iv() 413 *taglen = EVP_CCM_TLS_TAG_LEN; in derive_secret_key_and_iv() 418 *taglen = EVP_GCM_TLS_TAG_LEN; in derive_secret_key_and_iv() 421 *taglen = EVP_CHACHAPOLY_TLS_TAG_LEN; in derive_secret_key_and_iv() 509 size_t keylen, ivlen = EVP_MAX_IV_LENGTH, taglen; in tls13_change_cipher_state() local 697 &keylen, &iv, &ivlen, &taglen)) { in tls13_change_cipher_state() 750 ivlen, NULL, 0, cipher, taglen, in tls13_change_cipher_state() 781 size_t keylen, ivlen, taglen; in tls13_update_key() local [all …]
|
| H A D | t1_enc.c | 131 size_t taglen = 0; in tls1_change_cipher_state() local 176 taglen = EVP_GCM_TLS_TAG_LEN; in tls1_change_cipher_state() 182 taglen = EVP_CCM8_TLS_TAG_LEN; in tls1_change_cipher_state() 184 taglen = EVP_CCM_TLS_TAG_LEN; in tls1_change_cipher_state() 188 taglen = EVP_CHACHAPOLY_TLS_TAG_LEN; in tls1_change_cipher_state() 191 taglen = s->s3.tmp.new_mac_secret_size; in tls1_change_cipher_state() 238 mac_secret_size, c, taglen, mac_type, in tls1_change_cipher_state()
|
| /freebsd/contrib/unbound/services/ |
| H A D | localzone.h | 161 size_t taglen; member 280 uint8_t* taglist, size_t taglen, int ignoretags, int foradd); 341 size_t taglen, uint8_t* tagactions, size_t tagactionssize, 500 size_t taglen, const uint8_t* taglist2, size_t taglen2,
|
| /freebsd/contrib/less/ |
| H A D | tags.c | 258 size_t taglen; in findctag() local 276 taglen = strlen(tag); in findctag() 286 if (strncmp(tag, tline, taglen) != 0 || !WHITESP(tline[taglen])) in findctag() 302 p = skipsp(tline+taglen); in findctag()
|
| /freebsd/sys/contrib/openzfs/tests/zfs-tests/cmd/ |
| H A D | crypto_test.c | 606 size_t msglen, size_t taglen, in init_mech() argument 619 p->ulTagBits = taglen << 3; in init_mech() 630 p->ulMACSize = taglen; in init_mech() 635 p->ulDataSize = msglen + (decrypt ? taglen : 0); in init_mech() 714 const uint8_t *tag, size_t taglen, in decrypt_one() argument 726 memcpy(inbuf + ctlen, tag, taglen); in decrypt_one() 730 .cd_length = ctlen + taglen, in decrypt_one() 733 .iov_len = ctlen + taglen, in decrypt_one()
|
| /freebsd/crypto/openssl/crypto/evp/ |
| H A D | e_aria.c | 39 int taglen; member 269 gctx->taglen = -1; in aria_gcm_ctrl() 295 gctx->taglen = arg; in aria_gcm_ctrl() 300 || gctx->taglen < 0) in aria_gcm_ctrl() 482 if (gctx->taglen < 0) in aria_gcm_cipher() 486 gctx->taglen) in aria_gcm_cipher() 493 gctx->taglen = 16; in aria_gcm_cipher()
|
| /freebsd/crypto/openssl/crypto/cms/ |
| H A D | cms_enc.c | 113 if (ec->taglen < 4 || ec->taglen > 16 in ossl_cms_EncryptedContent_init_bio() 114 || EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG, (int)ec->taglen, ec->tag) <= 0) { in ossl_cms_EncryptedContent_init_bio()
|