C# TripleDES Provider without an Initialization Vector?

社会主义新天地 提交于 2019-12-03 12:49:08

Trying to answer each point:

  • The Initialization Vector is required in CBC mode. It is not required to be a secret (unlike the key) so it should be sent from the remote system.
  • Since you need the IV, null is not the right thing to pass.
  • Padding mode. You need to know which padding mode is used.
  • TransformFinalBlock probably fails because the Padding mode is wrong.

Edit

The difference between ECB (Electronic Code Book) and CBC (Cipher Block Chaining) is illustrated below:

As you can see no IV is used in ECB mode. So even if you provide one it will be ignored.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!