Home
last modified time | relevance | path

Searched refs:aad (Results 1 – 25 of 42) sorted by relevance

12

/openssl/providers/implementations/ciphers/
H A Dcipher_chacha20_poly1305_hw.c25 len = aad[EVP_AEAD_TLS1_AAD_LEN - 2] << 8 | aad[EVP_AEAD_TLS1_AAD_LEN - 1]; in chacha_poly1305_tls_init()
26 aad = ctx->tls_aad; in chacha_poly1305_tls_init()
63 ctx->len.aad = 0; in chacha20_poly1305_initkey()
65 ctx->aad = 0; in chacha20_poly1305_initkey()
82 ctx->len.aad = 0; in chacha20_poly1305_initiv()
84 ctx->aad = 0; in chacha20_poly1305_initiv()
299 ctx->aad = 1; in chacha20_poly1305_aead_cipher()
306 ctx->len.aad += inl; in chacha20_poly1305_aead_cipher()
307 ctx->aad = 1; in chacha20_poly1305_aead_cipher()
313 ctx->aad = 0; in chacha20_poly1305_aead_cipher()
[all …]
H A Dcipher_aes_gcm_siv_hw.c108 const unsigned char *aad, size_t len) in aes_gcm_siv_aad() argument
116 OPENSSL_free(ctx->aad); in aes_gcm_siv_aad()
117 ctx->aad = NULL; in aes_gcm_siv_aad()
126 ptr = OPENSSL_realloc(ctx->aad, to_alloc); in aes_gcm_siv_aad()
129 ctx->aad = ptr; in aes_gcm_siv_aad()
130 memcpy(&ctx->aad[ctx->aad_len], 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()
178 if (ctx->aad != NULL) { 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()
243 if (ctx->aad != NULL) { in aes_gcm_siv_decrypt()
[all …]
H A Dciphercommon_gcm_hw.c20 int ossl_gcm_aad_update(PROV_GCM_CTX *ctx, const unsigned char *aad, 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_chacha20_poly1305.h25 struct { uint64_t aad, text; } len; member
26 unsigned int aad : 1; member
38 int (*tls_init)(PROV_CIPHER_CTX *ctx, unsigned char *aad, size_t alen);
H A Dcipher_rc4_hmac_md5_hw.c166 unsigned char *aad, size_t aad_len) in cipher_hw_rc4_hmac_md5_tls_init() argument
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 Dcipher_aes_gcm_hw_vaes_avx512.inc38 void ossl_aes_gcm_update_aad_avx512(void *gcm128ctx, const unsigned char *aad,
85 const unsigned char *aad,
112 gcmctx->Xi.c[15 - ares] ^= *(aad++);
128 ossl_aes_gcm_update_aad_avx512(gcmctx, aad, lenBlks);
129 aad += lenBlks;
137 gcmctx->Xi.c[15 - i] ^= aad[i];
H A Dcipher_aes_gcm_hw_s390x.inc113 unsigned char *aad, size_t aad_len,
126 s390x_kma(aad, aad_len, in, in_len, out, fc, kma);
142 const unsigned char *aad, size_t len)
154 /* update the total aad length */
160 /* check if there is any existing aad data from a previous add */
165 actx->plat.s390x.ares[n] = *aad;
166 ++aad;
185 s390x_kma(aad, len, NULL, 0, NULL, fc, kma);
187 aad += len;
195 actx->plat.s390x.ares[rem] = aad[rem];
H A Dcipher_aes_gcm_siv.c51 OPENSSL_clear_free(ctx->aad, ctx->aad_len); in ossl_aes_gcm_siv_freectx()
71 ret->aad = NULL; in ossl_aes_gcm_siv_dupctx()
74 if (in->aad != NULL) { in ossl_aes_gcm_siv_dupctx()
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 Dciphercommon_ccm_hw.c19 int ossl_ccm_generic_setaad(PROV_CCM_CTX *ctx, const unsigned char *aad, in ossl_ccm_generic_setaad() argument
22 CRYPTO_ccm128_aad(&ctx->ccm_ctx, aad, alen); in ossl_ccm_generic_setaad()
H A Dcipher_aes_ccm_hw_s390x.inc49 const unsigned char *aad, size_t alen)
78 sctx->ccm.s390x.buf.b[i] = *aad;
79 ++aad;
97 s390x_kmac(aad, alen, sctx->ccm.s390x.fc, &sctx->ccm.s390x.kmac);
99 aad += alen;
103 sctx->ccm.s390x.kmac.icv.b[i] ^= aad[i];
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_gcm_siv.h36 uint8_t *aad; /* Allocated, rounded up to 16 bytes, from user */ member
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
482 memcpy(buf, aad, aad_len); in gcm_tls_init()
/openssl/crypto/evp/
H A De_chacha20_poly1305.c158 struct { uint64_t aad, text; } len; member
176 actx->len.aad = 0; in chacha20_poly1305_init_key()
178 actx->aad = 0; in chacha20_poly1305_init_key()
387 actx->aad = 1; in chacha20_poly1305_cipher()
394 actx->len.aad += len; in chacha20_poly1305_cipher()
395 actx->aad = 1; in chacha20_poly1305_cipher()
402 actx->aad = 0; in chacha20_poly1305_cipher()
435 actx->aad = 0; in chacha20_poly1305_cipher()
510 actx->len.aad = 0; in chacha20_poly1305_ctrl()
512 actx->aad = 0; in chacha20_poly1305_ctrl()
[all …]
/openssl/ssl/record/methods/
H A Dtls_multib.c73 unsigned char aad[13]; in tls_write_records_multiblock_int() local
122 memcpy(aad, rl->sequence, 8); in tls_write_records_multiblock_int()
123 aad[8] = templates[0].type; in tls_write_records_multiblock_int()
124 aad[9] = (unsigned char)(templates[0].version >> 8); in tls_write_records_multiblock_int()
125 aad[10] = (unsigned char)(templates[0].version); in tls_write_records_multiblock_int()
126 aad[11] = 0; in tls_write_records_multiblock_int()
127 aad[12] = 0; in tls_write_records_multiblock_int()
129 mb_param.inp = aad; in tls_write_records_multiblock_int()
/openssl/util/
H A Dcavs-to-evptest.pl19 my $aad = "";
70 $aad = $2;
96 print " $aad";
116 $aad = "";
/openssl/providers/implementations/include/prov/
H A Dciphercommon_gcm.h89 const unsigned char *aad, size_t aadlen));
94 PROV_CIPHER_FUNC(int, GCM_oneshot, (PROV_GCM_CTX *ctx, unsigned char *aad,
118 int ossl_gcm_aad_update(PROV_GCM_CTX *ctx, const unsigned char *aad,
121 int ossl_gcm_one_shot(PROV_GCM_CTX *ctx, unsigned char *aad, size_t aad_len,
H A Dciphercommon_ccm.h60 const unsigned char *aad, size_t aadlen));
96 int ossl_ccm_generic_setaad(PROV_CCM_CTX *ctx, const unsigned char *aad,
/openssl/include/openssl/
H A Dhpke.h118 const unsigned char *aad, size_t aadlen,
131 const unsigned char *aad, size_t aadlen,
H A Dmodes.h120 int CRYPTO_gcm128_aad(GCM128_CONTEXT *ctx, const unsigned char *aad,
146 void CRYPTO_ccm128_aad(CCM128_CONTEXT *ctx, const unsigned char *aad,
203 int CRYPTO_ocb128_aad(OCB128_CONTEXT *ctx, const unsigned char *aad,
/openssl/crypto/hpke/
H A Dhpke.c142 const unsigned char *aad, size_t aadlen, in hpke_aead_dec() argument
175 if (aadlen != 0 && aad != NULL) { in hpke_aead_dec()
176 if (EVP_DecryptUpdate(ctx, NULL, &len, aad, aadlen) != 1) { in hpke_aead_dec()
218 const unsigned char *aad, size_t aadlen, in hpke_aead_enc() argument
256 if (aadlen != 0 && aad != NULL) { in hpke_aead_enc()
257 if (EVP_EncryptUpdate(ctx, NULL, &len, aad, aadlen) != 1) { in hpke_aead_enc()
1154 const unsigned char *aad, size_t aadlen, in OSSL_HPKE_seal() argument
1183 if (hpke_aead_enc(ctx, seqbuf, aad, aadlen, pt, ptlen, ct, ctlen) != 1) { in OSSL_HPKE_seal()
1196 const unsigned char *aad, size_t aadlen, in OSSL_HPKE_open() argument
1225 if (hpke_aead_dec(ctx, seqbuf, aad, aadlen, ct, ctlen, pt, ptlen) != 1) { in OSSL_HPKE_open()
/openssl/crypto/modes/
H A Docb128.c264 int CRYPTO_ocb128_aad(OCB128_CONTEXT *ctx, const unsigned char *aad, in CRYPTO_ocb128_aad() argument
285 memcpy(tmp.c, aad, 16); in CRYPTO_ocb128_aad()
286 aad += 16; in CRYPTO_ocb128_aad()
307 memcpy(tmp.c, aad, last_len); in CRYPTO_ocb128_aad()
/openssl/include/crypto/
H A Dsiv.h21 int ossl_siv128_aad(SIV128_CONTEXT *ctx, const unsigned char *aad, size_t len);
/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 …]
/openssl/crypto/
H A Ds390xcpuid.pl429 my ($aad,$alen,$in,$len,$out) = map("%r$_",(2..6));
438 .long 0xb9292064 # kma $out,$aad,$in

Completed in 238 milliseconds

12