Why AEAD is not supported in command enc? (openssl/openssl/issues#12220)

2023-07-08

https://github.com/openssl/openssl/issues/12220

Openssl で AES を GCM モードで使おうと思ったら enc does not support AEAD ciphers というエラーが出てきた時に検索して出てきた GitHub Issue。

コマンドは、こんなイメージ。

$ openssl aes-256-gcm -e -pass "pass:${SECRET_KEY}" -iv "${IV}" -in "${INPUT_FILE}" -out "${OUTPUT_FILE}"
enc does not support AEAD ciphers

ざっくり言えば、認証タグを検証する前に復号したデータを出力しちゃうと、未検証のデータを使われる可能性があるのでサポートしない、ということっぽい。