/third_party/wpa_supplicant/wpa_supplicant-2.9/src/crypto/ |
D | aes-ccm.c | 29 const u8 *aad, size_t aad_len, size_t plain_len, in aes_ccm_auth_start() argument 37 b[0] = aad_len ? 0x40 : 0 /* Adata */; in aes_ccm_auth_start() 46 if (!aad_len) in aes_ccm_auth_start() 49 WPA_PUT_BE16(aad_buf, aad_len); in aes_ccm_auth_start() 50 os_memcpy(aad_buf + 2, aad, aad_len); in aes_ccm_auth_start() 51 os_memset(aad_buf + 2 + aad_len, 0, sizeof(aad_buf) - 2 - aad_len); in aes_ccm_auth_start() 56 if (aad_len > AES_BLOCK_SIZE - 2) { in aes_ccm_auth_start() 150 const u8 *aad, size_t aad_len, u8 *crypt, u8 *auth) in aes_ccm_ae() argument 156 if (aad_len > 30 || M > AES_BLOCK_SIZE) in aes_ccm_ae() 163 aes_ccm_auth_start(aes, M, L, nonce, aad, aad_len, plain_len, x); in aes_ccm_ae() [all …]
|
D | aes-gcm.c | 229 static void aes_gcm_ghash(const u8 *H, const u8 *aad, size_t aad_len, in aes_gcm_ghash() argument 241 ghash(H, aad, aad_len, S); in aes_gcm_ghash() 243 WPA_PUT_BE64(len_buf, aad_len * 8); in aes_gcm_ghash() 256 const u8 *aad, size_t aad_len, u8 *crypt, u8 *tag) in aes_gcm_ae() argument 272 aes_gcm_ghash(H, aad, aad_len, crypt, plain_len, S); in aes_gcm_ae() 290 const u8 *aad, size_t aad_len, const u8 *tag, u8 *plain) in aes_gcm_ad() argument 306 aes_gcm_ghash(H, aad, aad_len, crypt, crypt_len, S); in aes_gcm_ad() 323 const u8 *aad, size_t aad_len, u8 *tag) in aes_gmac() argument 325 return aes_gcm_ae(key, key_len, iv, iv_len, NULL, 0, aad, aad_len, NULL, in aes_gmac()
|
D | aes_wrap.h | 55 const u8 *aad, size_t aad_len, 60 const u8 *aad, size_t aad_len, const u8 *tag, 64 const u8 *aad, size_t aad_len, u8 *tag); 67 const u8 *aad, size_t aad_len, u8 *crypt, u8 *auth); 70 const u8 *aad, size_t aad_len, const u8 *auth,
|
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/crypto/ |
D | aes-ccm.c | 29 const u8 *aad, size_t aad_len, size_t plain_len, in aes_ccm_auth_start() argument 37 b[0] = aad_len ? 0x40 : 0 /* Adata */; in aes_ccm_auth_start() 46 if (!aad_len) in aes_ccm_auth_start() 49 WPA_PUT_BE16(aad_buf, aad_len); in aes_ccm_auth_start() 50 os_memcpy(aad_buf + 2, aad, aad_len); in aes_ccm_auth_start() 51 os_memset(aad_buf + 2 + aad_len, 0, sizeof(aad_buf) - 2 - aad_len); in aes_ccm_auth_start() 56 if (aad_len > AES_BLOCK_SIZE - 2) { in aes_ccm_auth_start() 150 const u8 *aad, size_t aad_len, u8 *crypt, u8 *auth) in aes_ccm_ae() argument 156 if (aad_len > 30 || M > AES_BLOCK_SIZE) in aes_ccm_ae() 163 aes_ccm_auth_start(aes, M, L, nonce, aad, aad_len, plain_len, x); in aes_ccm_ae() [all …]
|
D | aes-gcm.c | 229 static void aes_gcm_ghash(const u8 *H, const u8 *aad, size_t aad_len, in aes_gcm_ghash() argument 241 ghash(H, aad, aad_len, S); in aes_gcm_ghash() 243 WPA_PUT_BE64(len_buf, aad_len * 8); in aes_gcm_ghash() 256 const u8 *aad, size_t aad_len, u8 *crypt, u8 *tag) in aes_gcm_ae() argument 272 aes_gcm_ghash(H, aad, aad_len, crypt, plain_len, S); in aes_gcm_ae() 290 const u8 *aad, size_t aad_len, const u8 *tag, u8 *plain) in aes_gcm_ad() argument 306 aes_gcm_ghash(H, aad, aad_len, crypt, crypt_len, S); in aes_gcm_ad() 323 const u8 *aad, size_t aad_len, u8 *tag) in aes_gmac() argument 325 return aes_gcm_ae(key, key_len, iv, iv_len, NULL, 0, aad, aad_len, NULL, in aes_gmac()
|
D | aes_wrap.h | 55 const u8 *aad, size_t aad_len, 60 const u8 *aad, size_t aad_len, const u8 *tag, 64 const u8 *aad, size_t aad_len, u8 *tag); 67 const u8 *aad, size_t aad_len, u8 *crypt, u8 *auth); 70 const u8 *aad, size_t aad_len, const u8 *auth,
|
/third_party/mbedtls/library/ |
D | chachapoly.c | 47 uint32_t partial_block_len = (uint32_t) (ctx->aad_len % 16U); in chachapoly_pad_aad() 85 ctx->aad_len = 0U; in mbedtls_chachapoly_init() 99 ctx->aad_len = 0U; in mbedtls_chachapoly_free() 143 ctx->aad_len = 0U; in mbedtls_chachapoly_starts() 156 size_t aad_len) in mbedtls_chachapoly_update_aad() argument 162 ctx->aad_len += aad_len; in mbedtls_chachapoly_update_aad() 164 return mbedtls_poly1305_update(&ctx->poly1305_ctx, aad, aad_len); in mbedtls_chachapoly_update_aad() 242 MBEDTLS_PUT_UINT64_LE(ctx->aad_len, len_block, 0); in mbedtls_chachapoly_finish() 260 size_t aad_len, in chachapoly_crypt_and_tag() argument 272 ret = mbedtls_chachapoly_update_aad(ctx, aad, aad_len); in chachapoly_crypt_and_tag() [all …]
|
/third_party/libwebsockets/lib/jose/jwe/ |
D | private-lib-jose-jwe.h | 40 uint8_t *aad, int aad_len); 47 uint8_t *aad, int aad_len); 54 uint8_t *enc_cek, uint8_t *aad, int aad_len); 76 uint8_t *aad, int aad_len); 80 uint8_t *cek, uint8_t *aad, int aad_len);
|
/third_party/mbedtls/tests/suites/ |
D | test_suite_chachapoly.function | 89 size_t aad_len = sizeof(aad); 106 TEST_ASSERT(mbedtls_chachapoly_update_aad(&ctx, aad, aad_len) 117 TEST_ASSERT(mbedtls_chachapoly_update_aad(&ctx, aad, aad_len) 129 TEST_ASSERT(mbedtls_chachapoly_update_aad(&ctx, aad, aad_len) 141 TEST_ASSERT(mbedtls_chachapoly_update_aad(&ctx, aad, aad_len) 147 TEST_ASSERT(mbedtls_chachapoly_update_aad(&ctx, aad, aad_len) 149 TEST_ASSERT(mbedtls_chachapoly_update_aad(&ctx, aad, aad_len)
|
/third_party/mbedtls/include/mbedtls/ |
D | chachapoly.h | 63 …uint64_t MBEDTLS_PRIVATE(aad_len); /**< The length (bytes) of the Additional… 211 size_t aad_len); 301 size_t aad_len, 335 size_t aad_len,
|
/third_party/openssl/providers/implementations/ciphers/ |
D | ciphercommon_gcm_hw.c | 21 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()
|
D | cipher_rc4_hmac_md5_hw.c | 166 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()
|
D | ciphercommon_gcm.c | 19 static int gcm_tls_init(PROV_GCM_CTX *dat, unsigned char *aad, size_t aad_len); 446 static int gcm_tls_init(PROV_GCM_CTX *dat, unsigned char *aad, size_t aad_len) in gcm_tls_init() argument 451 if (!ossl_prov_is_running() || aad_len != EVP_AEAD_TLS1_AAD_LEN) in gcm_tls_init() 456 memcpy(buf, aad, aad_len); in gcm_tls_init() 457 dat->tls_aad_len = aad_len; in gcm_tls_init() 459 len = buf[aad_len - 2] << 8 | buf[aad_len - 1]; in gcm_tls_init() 471 buf[aad_len - 2] = (unsigned char)(len >> 8); in gcm_tls_init() 472 buf[aad_len - 1] = (unsigned char)(len & 0xff); in gcm_tls_init()
|
D | cipher_aes_cbc_hmac_sha1_hw.c | 664 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()
|
D | cipher_aes_cbc_hmac_sha256_hw.c | 717 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()
|
D | cipher_rc4_hmac_md5.h | 27 int (*tls_init)(PROV_CIPHER_CTX *ctx, unsigned char *aad, size_t aad_len);
|
/third_party/node/deps/openssl/openssl/providers/implementations/ciphers/ |
D | ciphercommon_gcm_hw.c | 21 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()
|
D | cipher_rc4_hmac_md5_hw.c | 166 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()
|
D | ciphercommon_gcm.c | 19 static int gcm_tls_init(PROV_GCM_CTX *dat, unsigned char *aad, size_t aad_len); 446 static int gcm_tls_init(PROV_GCM_CTX *dat, unsigned char *aad, size_t aad_len) in gcm_tls_init() argument 451 if (!ossl_prov_is_running() || aad_len != EVP_AEAD_TLS1_AAD_LEN) in gcm_tls_init() 456 memcpy(buf, aad, aad_len); in gcm_tls_init() 457 dat->tls_aad_len = aad_len; in gcm_tls_init() 459 len = buf[aad_len - 2] << 8 | buf[aad_len - 1]; in gcm_tls_init() 471 buf[aad_len - 2] = (unsigned char)(len >> 8); in gcm_tls_init() 472 buf[aad_len - 1] = (unsigned char)(len & 0xff); in gcm_tls_init()
|
D | cipher_aes_cbc_hmac_sha1_hw.c | 664 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()
|
D | cipher_aes_cbc_hmac_sha256_hw.c | 717 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()
|
/third_party/libwebsockets/lib/jose/jwe/enc/ |
D | aescbc.c | 30 uint8_t *aad, int aad_len) in lws_jwe_encrypt_cbc_hs() argument 116 lws_jwe_be64((unsigned int)aad_len * 8, al); in lws_jwe_encrypt_cbc_hs() 137 if (lws_genhmac_update(&hmacctx, aad, (unsigned int)aad_len) || in lws_jwe_encrypt_cbc_hs() 163 uint8_t *aad, int aad_len) in lws_jwe_auth_and_decrypt_cbc_hs() argument 200 lws_jwe_be64((unsigned int)aad_len * 8, al); in lws_jwe_auth_and_decrypt_cbc_hs() 209 if (lws_genhmac_update(&hmacctx, aad, (unsigned int)aad_len) || in lws_jwe_auth_and_decrypt_cbc_hs()
|
D | aesgcm.c | 54 uint8_t *enc_cek, uint8_t *aad, int aad_len) in lws_jwe_encrypt_gcm() argument 89 n = lws_genaes_crypt(&aesctx, aad, (unsigned int)aad_len, NULL, in lws_jwe_encrypt_gcm() 118 uint8_t *enc_cek, uint8_t *aad, int aad_len) in lws_jwe_auth_and_decrypt_gcm() argument 152 n = lws_genaes_crypt(&aesctx, aad, (unsigned int)aad_len, in lws_jwe_auth_and_decrypt_gcm()
|
/third_party/node/deps/openssl/openssl/providers/implementations/include/prov/ |
D | ciphercommon_gcm.h | 92 size_t aad_len, const unsigned char *in, 116 size_t aad_len); 118 int ossl_gcm_one_shot(PROV_GCM_CTX *ctx, unsigned char *aad, size_t aad_len,
|
/third_party/openssl/providers/implementations/include/prov/ |
D | ciphercommon_gcm.h | 92 size_t aad_len, const unsigned char *in, 116 size_t aad_len); 118 int ossl_gcm_one_shot(PROV_GCM_CTX *ctx, unsigned char *aad, size_t aad_len,
|