OpenSSL 为 AES-256-ECB 给出“iv undefined”

use*_*795 5 openssl aes

谁能发现为什么这个命令给出“iv undefined”?

>openssl.exe enc -d -aes-256-ecb -K 8000000000000000000000000000000000000000000000000000000000000001 -in ex3.8_C.bin -out plaintext.bin -nopad
iv undefined
Run Code Online (Sandbox Code Playgroud)

另请参阅基本 AES 解密问题

小智 1

正如它所说,你没有定义iv

尝试这样:-iv 0

openssl enc -aes-128-cbc -e -in test.txt -out output.txt -K 1234567812346578 -iv 0 -p
Run Code Online (Sandbox Code Playgroud)

  • 谢谢你,但我使用的是 ECB(不是 CBC),我知道它不会(也不能)使用初始向量。(正如这里讨论的http://stackoverflow.com/questions/1789709/is-it-possible-to-use-aes-with-an-iv-in-ecb-mode) (3认同)