AEAD
এইইএডি
Authenticated Encryption with Associated Data — encryption ও authentication এক পাসে দেয়, tag mismatch হলে plaintext কখনো release হয় না।
also: authenticated-encryption, gcm, chacha20-poly1305
encrypt(key, nonce, plaintext, AAD) -> (ciphertext, tag)
decrypt(key, nonce, ciphertext, AAD, tag) -> plaintext | REJECT
(tag mismatch হলে কিছুই বেরোয় না)
- GCM = CTR-mode encryption + GHASH authentication — সবচেয়ে সাধারণ AEAD, TLS 1.3-এর default
- Associated Data (AAD) এনক্রিপ্ট হয় না কিন্তু authenticate হয় — header/metadata tamper-protect করতে কাজে লাগে
- Encrypt-then-MAC হাতে জোড়া লাগানোর (CBC+HMAC) বদলে AEAD একটাই call — জোড়া-লাগানোর ভুলের সুযোগ কমায়