| /freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/crypto/ |
| H A D | aes_ccm_test.txt | 11 aad: 22 aad: 33 aad: 44 aad: 55 aad: 66 aad: 77 aad: 88 aad: 99 aad: 110 aad: [all …]
|
| H A D | aes_gcm_test.txt | 11 aad: 22 aad: 00112233445566778899aabbccddeeff 33 aad: aac39231129872a2 44 aad: 55 aad: 66 aad: 77 aad: 88 aad: 99 aad: 110 aad: [all …]
|
| /freebsd/crypto/openssl/providers/implementations/ciphers/ |
| H A D | cipher_chacha20_poly1305_hw.c | 16 unsigned char *aad, size_t alen) in chacha_poly1305_tls_init() argument 24 memcpy(ctx->tls_aad, aad, EVP_AEAD_TLS1_AAD_LEN); in chacha_poly1305_tls_init() 25 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() 31 aad[EVP_AEAD_TLS1_AAD_LEN - 2] = (unsigned char)(len >> 8); in chacha_poly1305_tls_init() 32 aad[EVP_AEAD_TLS1_AAD_LEN - 1] = (unsigned char)len; in chacha_poly1305_tls_init() 38 ctx->chacha.counter[2] = ctx->nonce[1] ^ CHACHA_U8TOU32(aad); in chacha_poly1305_tls_init() 39 ctx->chacha.counter[3] = ctx->nonce[2] ^ CHACHA_U8TOU32(aad + 4); in chacha_poly1305_tls_init() 63 ctx->len.aad = 0; in chacha20_poly1305_initkey() 65 ctx->aad = 0; in chacha20_poly1305_initkey() [all …]
|
| H A D | cipher_aes_gcm_siv_hw.c | 108 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 D | ciphercommon_gcm_hw.c | 19 int ossl_gcm_aad_update(PROV_GCM_CTX *ctx, const unsigned char *aad, in ossl_gcm_aad_update() argument 22 return CRYPTO_gcm128_aad(&ctx->gcm, aad, aad_len) == 0; in ossl_gcm_aad_update() 50 int ossl_gcm_one_shot(PROV_GCM_CTX *ctx, unsigned char *aad, size_t aad_len, in ossl_gcm_one_shot() argument 57 if (!ctx->hw->aadupdate(ctx, aad, aad_len)) in ossl_gcm_one_shot()
|
| H A D | cipher_chacha20_poly1305.h | 26 uint64_t aad, text; member 28 unsigned int aad : 1; member 40 int (*tls_init)(PROV_CIPHER_CTX *ctx, unsigned char *aad, size_t alen);
|
| H A D | cipher_rc4_hmac_md5_hw.c | 166 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 D | cipher_aes_gcm_hw_s390x.inc | 113 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];
|
| /freebsd/crypto/openssl/crypto/evp/ |
| H A D | e_chacha20_poly1305.c | 160 uint64_t aad, text; member 162 int aad, mac_inited, tag_len, nonce_len; member 179 actx->len.aad = 0; in chacha20_poly1305_init_key() 181 actx->aad = 0; in chacha20_poly1305_init_key() 240 actx->len.aad = EVP_AEAD_TLS1_AAD_LEN; in chacha20_poly1305_tls_cipher() 265 actx->len.aad = EVP_AEAD_TLS1_AAD_LEN; in chacha20_poly1305_tls_cipher() 299 actx->len.aad = EVP_AEAD_TLS1_AAD_LEN; in chacha20_poly1305_tls_cipher() 322 ctr[0] = (unsigned char)(actx->len.aad); in chacha20_poly1305_tls_cipher() 323 ctr[1] = (unsigned char)(actx->len.aad >> 8); in chacha20_poly1305_tls_cipher() 324 ctr[2] = (unsigned char)(actx->len.aad >> 16); in chacha20_poly1305_tls_cipher() [all …]
|
| /freebsd/sys/net80211/ |
| H A D | ieee80211_crypto.c | 1018 ieee80211_crypto_init_aad(const struct ieee80211_frame *wh, uint8_t *aad, in ieee80211_crypto_init_aad() argument 1023 memset(aad, 0, len); in ieee80211_crypto_init_aad() 1034 aad[0] = 0; /* AAD length >> 8 */ in ieee80211_crypto_init_aad() 1036 aad[2] = wh->i_fc[0] & 0x8f; /* see above for bitfields */ in ieee80211_crypto_init_aad() 1037 aad[3] = wh->i_fc[1] & 0xc7; /* see above for bitfields */ in ieee80211_crypto_init_aad() 1040 aad[3] &= 0x7f; in ieee80211_crypto_init_aad() 1043 memcpy(aad + 4, wh->i_addr1, 3 * IEEE80211_ADDR_LEN); in ieee80211_crypto_init_aad() 1044 aad[22] = wh->i_seq[0] & IEEE80211_SEQ_FRAG_MASK; in ieee80211_crypto_init_aad() 1045 aad[23] = 0; /* all bits masked */ in ieee80211_crypto_init_aad() 1053 IEEE80211_ADDR_COPY(aad + 24, in ieee80211_crypto_init_aad() [all …]
|
| H A D | ieee80211_crypto_gcm.c | 286 aes_gcm_ghash(const uint8_t *H, const uint8_t *aad, size_t aad_len, in aes_gcm_ghash() argument 298 ghash(H, aad, aad_len, S); in aes_gcm_ghash() 311 const uint8_t *aad, size_t aad_len, uint8_t *crypt, uint8_t *tag) in ieee80211_crypto_aes_gcm_ae() argument 324 aes_gcm_ghash(H, aad, aad_len, crypt, plain_len, S); in ieee80211_crypto_aes_gcm_ae() 340 const uint8_t *aad, size_t aad_len, const uint8_t *tag, uint8_t *plain) in ieee80211_crypto_aes_gcm_ad() argument 353 aes_gcm_ghash(H, aad, aad_len, crypt, crypt_len, S); in ieee80211_crypto_aes_gcm_ad()
|
| /freebsd/crypto/openssl/ssl/record/methods/ |
| H A D | tls_multib.c | 71 unsigned char aad[13]; in tls_write_records_multiblock_int() local 120 memcpy(aad, rl->sequence, 8); in tls_write_records_multiblock_int() 121 aad[8] = templates[0].type; in tls_write_records_multiblock_int() 122 aad[9] = (unsigned char)(templates[0].version >> 8); in tls_write_records_multiblock_int() 123 aad[10] = (unsigned char)(templates[0].version); in tls_write_records_multiblock_int() 124 aad[11] = 0; in tls_write_records_multiblock_int() 125 aad[12] = 0; in tls_write_records_multiblock_int() 127 mb_param.inp = aad; in tls_write_records_multiblock_int()
|
| /freebsd/tests/sys/opencrypto/ |
| H A D | cryptodev.py | 255 def _doaead(self, op, src, aad, iv, tag=None): argument 266 aad = str_to_ascii(aad) 267 caead.aadlen = len(aad) 268 saad = array.array('B', aad) 269 caead.aad = saad.buffer_info()[0] 338 def encrypt(self, data, iv, aad=None): argument 339 if aad is None: 342 return self._doaead(COP_ENCRYPT, data, aad, 345 def decrypt(self, data, iv, aad=None, tag=None): argument 346 if aad is None: [all …]
|
| H A D | cryptotest.py | 112 aad = binascii.unhexlify(data['AAD']) 134 rct, rtag = c.encrypt(pt, iv, aad) 148 args = (ct, iv, aad, tag) 251 aad = binascii.unhexlify(data['Adata']) 253 aad = None 266 nonce, aad) 291 aad = binascii.unhexlify(data['Adata']) 293 aad = None 313 c.decrypt, payload, nonce, aad, tag) 316 aad, tag)
|
| /freebsd/contrib/libfido2/src/ |
| H A D | aes256.c | 116 const fido_blob_t *aad, const fido_blob_t *in, fido_blob_t *out, in aes256_gcm() argument 126 if (nonce->len != 12 || key->len != 32 || aad->len > UINT_MAX) { in aes256_gcm() 128 nonce->len, key->len, aad->len); in aes256_gcm() 163 if (EVP_Cipher(ctx, NULL, aad->ptr, (u_int)aad->len) < 0 || in aes256_gcm() 206 const fido_blob_t *aad, const fido_blob_t *in, fido_blob_t *out) in aes256_gcm_enc() argument 208 return aes256_gcm(key, nonce, aad, in, out, 1); in aes256_gcm_enc() 213 const fido_blob_t *aad, const fido_blob_t *in, fido_blob_t *out) in aes256_gcm_dec() argument 215 return aes256_gcm(key, nonce, aad, in, out, 0); in aes256_gcm_dec()
|
| /freebsd/sys/crypto/ |
| H A D | chacha20_poly1305.h | 39 const size_t src_len, const uint8_t *aad, const size_t aad_len, 43 const size_t src_len, const uint8_t *aad, const size_t aad_len, 47 const size_t src_len, const uint8_t *aad, const size_t aad_len, 51 const size_t src_len, const uint8_t *aad, const size_t aad_len,
|
| H A D | chacha20_poly1305.c | 39 const size_t src_len, const uint8_t *aad, const size_t aad_len, in chacha20_poly1305_encrypt() argument 52 exf->update(ctx, aad, aad_len); in chacha20_poly1305_encrypt() 86 const size_t src_len, const uint8_t *aad, const size_t aad_len, in chacha20_poly1305_decrypt() argument 107 exf->update(ctx, aad, aad_len); in chacha20_poly1305_decrypt() 142 const size_t src_len, const uint8_t *aad, const size_t aad_len, in xchacha20_poly1305_encrypt() argument 155 exf->update(ctx, aad, aad_len); in xchacha20_poly1305_encrypt() 189 const size_t src_len, const uint8_t *aad, const size_t aad_len, in xchacha20_poly1305_decrypt() argument 210 exf->update(ctx, aad, aad_len); in xchacha20_poly1305_decrypt()
|
| /freebsd/crypto/openssl/util/ |
| H A D | cavs-to-evptest.pl | 19 my $aad = ""; 70 $aad = $2; 96 print " $aad"; 116 $aad = "";
|
| /freebsd/sys/crypto/openssl/amd64/ |
| H A D | ossl_aes_gcm_avx512.c | 54 void ossl_aes_gcm_update_aad_avx512(void *gcm128ctx, const unsigned char *aad, 90 gcm_aad_avx512(struct ossl_gcm_context *ctx, const unsigned char *aad, in gcm_aad_avx512() argument 115 ctx->gcm.Xi.c[15 - ares] ^= *(aad++); in gcm_aad_avx512() 131 ossl_aes_gcm_update_aad_avx512(ctx, aad, lenblks); in gcm_aad_avx512() 132 aad += lenblks; in gcm_aad_avx512() 140 ctx->gcm.Xi.c[15 - i] ^= aad[i]; in gcm_aad_avx512() 213 .aad = gcm_aad_avx512,
|
| /freebsd/contrib/wpa/src/crypto/ |
| H A 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() 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()
|
| H A 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,
|
| H A D | aes-ccm.c | 29 const u8 *aad, size_t aad_len, size_t plain_len, in aes_ccm_auth_start() argument 50 os_memcpy(aad_buf + 2, aad, aad_len); in aes_ccm_auth_start() 150 const u8 *aad, size_t aad_len, u8 *crypt, u8 *auth) in aes_ccm_ae() argument 163 aes_ccm_auth_start(aes, M, L, nonce, aad, aad_len, plain_len, x); in aes_ccm_ae() 180 const u8 *aad, size_t aad_len, const u8 *auth, u8 *plain) in aes_ccm_ad() argument 201 aes_ccm_auth_start(aes, M, L, nonce, aad, aad_len, crypt_len, x); in aes_ccm_ad()
|
| H A D | crypto_module_tests.c | 2207 const char *aad; member 2222 .aad = "436f756e742d30", 2237 .aad = "436f756e742d30", 2252 .aad = "436f756e742d30", 2267 .aad = "436f756e742d30", 2282 .aad = "436f756e742d30", 2297 .aad = "436f756e742d30", 2312 .aad = "436f756e742d30", 2320 struct wpabuf *info, *pk_r, *sk_r, *enc, *pt, *aad, *ct; in run_hpke_test() local 2333 aad = wpabuf_parse_bin(test->aad); in run_hpke_test() [all …]
|
| /freebsd/crypto/openssl/providers/implementations/include/prov/ |
| H A D | ciphercommon_gcm.h | 86 PROV_CIPHER_FUNC(int, GCM_aadupdate, (PROV_GCM_CTX * ctx, const unsigned char *aad, size_t aadlen)); 89 PROV_CIPHER_FUNC(int, GCM_oneshot, (PROV_GCM_CTX * ctx, unsigned char *aad, size_t aad_len, const u… 110 int ossl_gcm_aad_update(PROV_GCM_CTX *ctx, const unsigned char *aad, 113 int ossl_gcm_one_shot(PROV_GCM_CTX *ctx, unsigned char *aad, size_t aad_len,
|
| /freebsd/tests/sys/kern/ |
| H A D | ktls_test.c | 365 compute_hash(const EVP_MD *md, const void *key, size_t key_len, const void *aad, in compute_hash() argument 383 if (HMAC_Update(ctx, aad, aad_len) != 1) { in compute_hash() 384 warnx("HMAC_Update (aad) failed: %s", in compute_hash() 406 verify_hash(const EVP_MD *md, const void *key, size_t key_len, const void *aad, in verify_hash() argument 412 if (!compute_hash(md, key, key_len, aad, aad_len, buffer, len, digest2, in verify_hash() 424 const void *aad, size_t aad_len, const char *input, char *output, in aead_encrypt() argument 444 if (aad != NULL) { in aead_encrypt() 445 if (EVP_EncryptUpdate(ctx, NULL, &outl, (const u_char *)aad, in aead_encrypt() 486 const void *aad, size_t aad_len, const char *input, char *output, in aead_decrypt() argument 507 if (aad ! in aead_decrypt() 797 struct tls_mac_data aad; decrypt_tls_aes_cbc_mte() local 863 struct tls_aead_data aad; decrypt_tls_12_aead() local 898 struct tls_aead_data_13 aad; decrypt_tls_13_aead() local 993 struct tls_mac_data aad; encrypt_tls_aes_cbc_mte() local 1054 struct tls_aead_data aad; encrypt_tls_12_aead() local 1095 struct tls_aead_data_13 aad; encrypt_tls_13_aead() local [all...] |