Does AES/CBC really requires IV parameter?

后端 未结 2 1970
失恋的感觉
失恋的感觉 2021-01-01 03:47

I am writing a simple app to encrypt my message using AES / CBC (mode). As my understanding CBC mode requires IV parameter but I don\'t know why my code work without IV para

2条回答
  •  庸人自扰
    2021-01-01 03:51

    When it is used without an IV, for certain types of ciphers including AES, it implicitly uses 0 IV. See Cipher class documentation.

    The disadvantage of a null IV (or a deterministic IV) is that it is vulnerable to dictionary attacks. The requirement for IV is to prevent the same plain text block producing the same cipher text every time.

提交回复
热议问题