Why is AES encrypted cipher of the same string with the same key always different?

后端 未结 4 1199
我寻月下人不归
我寻月下人不归 2021-01-21 14:21

I have a file called plain.txt. Inside the file I have:

Hello Hello Hello Hello

I am using this command to encrypt it:

openssl          


        
4条回答
  •  孤独总比滥情好
    2021-01-21 14:59

    The reason you are getting different encrypted string is " enc -aes-128-cbc". CBC stands for Cipher Block Chaining. So, for 2nd block, the encrypted output of first block acts ac IV, so each time you get different string. for more details google "AES in CBC mode"

提交回复
热议问题