Home
last modified time | relevance | path

Searched refs:aad_len (Results 1 – 19 of 19) sorted by relevance

/openssl/providers/implementations/ciphers/
H A Dcipher_aes_gcm_siv_hw.c118 ctx->aad_len = 0; in aes_gcm_siv_aad()
121 to_alloc = UP16(ctx->aad_len + len); in aes_gcm_siv_aad()
130 memcpy(&ctx->aad[ctx->aad_len], aad, len); in aes_gcm_siv_aad()
131 ctx->aad_len += len; in aes_gcm_siv_aad()
132 if (to_alloc > ctx->aad_len) in aes_gcm_siv_aad()
133 memset(&ctx->aad[ctx->aad_len], 0, to_alloc - ctx->aad_len); in aes_gcm_siv_aad()
169 len_blk[0] = (uint64_t)ctx->aad_len * 8; in aes_gcm_siv_encrypt()
172 len_blk[0] = GSWAP8((uint64_t)ctx->aad_len * 8); in aes_gcm_siv_encrypt()
180 ossl_polyval_ghash_hash(ctx->Htable, S_s, ctx->aad, UP16(ctx->aad_len)); in aes_gcm_siv_encrypt()
235 len_blk[0] = (uint64_t)ctx->aad_len * 8; in aes_gcm_siv_decrypt()
[all …]
H A Dcipher_aes_gcm_hw_vaes_avx512.inc86 size_t aad_len)
97 alen += aad_len;
99 if ((alen > (U64(1) << 61)) || (alen < aad_len))
111 while (ares > 0 && aad_len > 0) {
113 --aad_len;
126 lenBlks = aad_len & ((size_t)(-AES_BLOCK_SIZE));
130 aad_len -= lenBlks;
134 if (aad_len > 0) {
135 ares = aad_len;
136 for (i = 0; i < aad_len; i++)
H A Dciphercommon_gcm_hw.c21 size_t aad_len) in ossl_gcm_aad_update() argument
23 return CRYPTO_gcm128_aad(&ctx->gcm, aad, aad_len) == 0; in ossl_gcm_aad_update()
51 int ossl_gcm_one_shot(PROV_GCM_CTX *ctx, unsigned char *aad, size_t aad_len, in ossl_gcm_one_shot() argument
58 if (!ctx->hw->aadupdate(ctx, aad, aad_len)) in ossl_gcm_one_shot()
H A Dcipher_rc4_hmac_md5_hw.c166 unsigned char *aad, size_t aad_len) in cipher_hw_rc4_hmac_md5_tls_init() argument
171 if (aad_len != EVP_AEAD_TLS1_AAD_LEN) in cipher_hw_rc4_hmac_md5_tls_init()
174 len = aad[aad_len - 2] << 8 | aad[aad_len - 1]; in cipher_hw_rc4_hmac_md5_tls_init()
180 aad[aad_len - 2] = len >> 8; in cipher_hw_rc4_hmac_md5_tls_init()
181 aad[aad_len - 1] = len; in cipher_hw_rc4_hmac_md5_tls_init()
185 MD5_Update(&ctx->md, aad, aad_len); in cipher_hw_rc4_hmac_md5_tls_init()
H A Dciphercommon_gcm.c20 static int gcm_tls_init(PROV_GCM_CTX *dat, unsigned char *aad, size_t aad_len);
472 static int gcm_tls_init(PROV_GCM_CTX *dat, unsigned char *aad, size_t aad_len) in gcm_tls_init() argument
477 if (!ossl_prov_is_running() || aad_len != EVP_AEAD_TLS1_AAD_LEN) in gcm_tls_init()
482 memcpy(buf, aad, aad_len); in gcm_tls_init()
483 dat->tls_aad_len = aad_len; in gcm_tls_init()
485 len = buf[aad_len - 2] << 8 | buf[aad_len - 1]; in gcm_tls_init()
497 buf[aad_len - 2] = (unsigned char)(len >> 8); in gcm_tls_init()
498 buf[aad_len - 1] = (unsigned char)(len & 0xff); in gcm_tls_init()
H A Dcipher_aes_cbc_hmac_sha1_hw.c664 unsigned char *aad_rec, int aad_len) in aesni_cbc_hmac_sha1_set_tls1_aad() argument
671 if (aad_len != EVP_AEAD_TLS1_AAD_LEN) in aesni_cbc_hmac_sha1_set_tls1_aad()
674 len = p[aad_len - 2] << 8 | p[aad_len - 1]; in aesni_cbc_hmac_sha1_set_tls1_aad()
679 p[aad_len - 4] << 8 | p[aad_len - 3]) >= TLS1_1_VERSION) { in aesni_cbc_hmac_sha1_set_tls1_aad()
683 p[aad_len - 2] = len >> 8; in aesni_cbc_hmac_sha1_set_tls1_aad()
684 p[aad_len - 1] = len; in aesni_cbc_hmac_sha1_set_tls1_aad()
687 sha1_update(&sctx->md, p, aad_len); in aesni_cbc_hmac_sha1_set_tls1_aad()
693 memcpy(ctx->aux.tls_aad, aad_rec, aad_len); in aesni_cbc_hmac_sha1_set_tls1_aad()
694 ctx->payload_length = aad_len; in aesni_cbc_hmac_sha1_set_tls1_aad()
H A Dcipher_aes_cbc_hmac_sha256_hw.c717 unsigned char *aad_rec, int aad_len) in aesni_cbc_hmac_sha256_set_tls1_aad() argument
724 if (aad_len != EVP_AEAD_TLS1_AAD_LEN) in aesni_cbc_hmac_sha256_set_tls1_aad()
727 len = p[aad_len - 2] << 8 | p[aad_len - 1]; in aesni_cbc_hmac_sha256_set_tls1_aad()
732 p[aad_len - 4] << 8 | p[aad_len - 3]) >= TLS1_1_VERSION) { in aesni_cbc_hmac_sha256_set_tls1_aad()
736 p[aad_len - 2] = len >> 8; in aesni_cbc_hmac_sha256_set_tls1_aad()
737 p[aad_len - 1] = len; in aesni_cbc_hmac_sha256_set_tls1_aad()
740 sha256_update(&sctx->md, p, aad_len); in aesni_cbc_hmac_sha256_set_tls1_aad()
746 memcpy(ctx->aux.tls_aad, p, aad_len); in aesni_cbc_hmac_sha256_set_tls1_aad()
747 ctx->payload_length = aad_len; in aesni_cbc_hmac_sha256_set_tls1_aad()
H A Dcipher_rc4_hmac_md5.h27 int (*tls_init)(PROV_CIPHER_CTX *ctx, unsigned char *aad, size_t aad_len);
H A Dcipher_aes_cbc_hmac_sha.h19 int (*set_tls1_aad)(void *ctx, unsigned char *aad_rec, int aad_len);
H A Dcipher_aes_gcm_siv.c51 OPENSSL_clear_free(ctx->aad, ctx->aad_len); in ossl_aes_gcm_siv_freectx()
75 if ((ret->aad = OPENSSL_memdup(in->aad, UP16(ret->aad_len))) == NULL) in ossl_aes_gcm_siv_dupctx()
85 OPENSSL_clear_free(ret->aad, ret->aad_len); in ossl_aes_gcm_siv_dupctx()
H A Dcipher_aes_gcm_siv.h39 size_t aad_len; /* actual AAD length */ member
H A Dcipher_aes_gcm_hw_s390x.inc113 unsigned char *aad, size_t aad_len,
123 kma->taadl = aad_len << 3;
126 s390x_kma(aad, aad_len, in, in_len, out, fc, kma);
/openssl/providers/implementations/include/prov/
H A Dciphercommon_gcm.h95 size_t aad_len, const unsigned char *in,
119 size_t aad_len);
121 int ossl_gcm_one_shot(PROV_GCM_CTX *ctx, unsigned char *aad, size_t aad_len,
/openssl/ssl/quic/
H A Dquic_record_rx.c662 const unsigned char *aad, size_t aad_len, in qrx_decrypt_pkt_body() argument
674 if (src_len > INT_MAX || aad_len > INT_MAX) in qrx_decrypt_pkt_body()
732 if (EVP_CipherUpdate(cctx, NULL, &l, aad, aad_len) != 1) in qrx_decrypt_pkt_body()
788 size_t i, aad_len = 0, dec_len = 0; in qrx_process_pkt() local
972 aad_len = rxe->hdr.data - sop; in qrx_process_pkt()
1000 &dec_len, sop, aad_len, rxe->pn, enc_level, in qrx_process_pkt()
/openssl/test/
H A Dacvp_test.c918 const unsigned char *aad, size_t aad_len, in aes_ccm_enc_dec() argument
942 || !TEST_true(EVP_CipherUpdate(ctx, NULL, &len, aad, aad_len)) in aes_ccm_enc_dec()
987 tst->iv, tst->iv_len, tst->aad, tst->aad_len, in aes_ccm_enc_dec_test()
991 tst->iv, tst->iv_len, tst->aad, tst->aad_len, in aes_ccm_enc_dec_test()
996 tst->iv, tst->iv_len, tst->aad, tst->aad_len, in aes_ccm_enc_dec_test()
1005 const unsigned char *aad, size_t aad_len, in aes_gcm_enc_dec() argument
1039 || !TEST_true(EVP_CipherUpdate(ctx, NULL, &len, aad, aad_len)) in aes_gcm_enc_dec()
1100 tst->iv, tst->iv_len, tst->aad, tst->aad_len, in aes_gcm_enc_dec_test()
1105 tst->iv, tst->iv_len, tst->aad, tst->aad_len, in aes_gcm_enc_dec_test()
1127 NULL, tst->iv_len, tst->aad, tst->aad_len, in aes_gcm_gen_iv_internal_test()
[all …]
H A Devp_test.c885 size_t aad_len[AAD_NUM]; member
1280 size_t aad_len = expected->aad_len[i]; in cipher_test_enc() local
1287 current_aad_len = aad_len; in cipher_test_enc()
1293 aad_len -= current_aad_len; in cipher_test_enc()
1294 } while (aad_len > 0); in cipher_test_enc()
1299 if (expected->aad_len[i] > 0) { in cipher_test_enc()
1304 if (expected->aad_len[i] > 2) { in cipher_test_enc()
1307 expected->aad_len[i] - 2)) in cipher_test_enc()
1309 donelen += expected->aad_len[i] - 2; in cipher_test_enc()
1311 if (expected->aad_len[i] > 1 in cipher_test_enc()
[all …]
H A Dacvp_test.inc869 size_t aad_len;
883 size_t aad_len;
/openssl/providers/fips/
H A Dself_test_kats.c89 && EVP_CipherUpdate(ctx, NULL, &tmp, t->aad, t->aad_len); in cipher_init()
H A Dself_test_data.inc70 size_t aad_len;

Completed in 102 milliseconds