<div dir="ltr"><div dir="ltr">First question:<br><br>How should AAD data be supplied to ciphers like EVP_aes_256_cbc_hmac_sha256() and EVP_rc4_hmac_md5()?<br><br>If I understand correctly, these are AEAD ciphers (the EVP_CIPH_FLAG_AEAD_CIPHER flag is set), so it should be possible to provide AAD data?<br><br>The following seems to work for AEAD ciphers generally but crashes with the ciphers I just mentioned:<br><br>EVP_EncryptUpdate(ctx, NULL, &len, aad, aad_len))<br><br>I call this after key and IV setting and before ciphertext input, in fact exactly like described here for GCM AEAD ciphers: <a href="https://wiki.openssl.org/index.php/EVP_Authenticated_Encryption_and_Decryption#Authenticated_Encryption_using_GCM_mode">https://wiki.openssl.org/index.php/EVP_Authenticated_Encryption_and_Decryption#Authenticated_Encryption_using_GCM_mode</a><br><br>Am I doing something wrong?<br><br>Second question:<br><br>The comments around AES_decrypt() and AES_encrypt() in crypto/aes/aes_core.c state: "in and out can overlap".<br>Does this only apply to the pure C version of AES, or to any or all assembly implementations as well?<br><br>Thanks<br><br>Guido<br></div></div>