With DES, is ECB encryption mode equivalent to CBC with null IV for short data blocks?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I got to this by experimentation, but can someone maybe provide an explanation for this?










share|improve this question

























    up vote
    1
    down vote

    favorite












    I got to this by experimentation, but can someone maybe provide an explanation for this?










    share|improve this question























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I got to this by experimentation, but can someone maybe provide an explanation for this?










      share|improve this question













      I got to this by experimentation, but can someone maybe provide an explanation for this?







      cbc des ecb






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 4 hours ago









      bbozo

      1625




      1625




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote



          accepted










          • The CBC mode processed as $c_i = E_k(p_i oplus c_i-1)$ with $c_0 = IV$


          • The ECB mode processed as $c_i = E_k(p_i)$


          If you set the first block with $c_o = IV = 0$ in the CBC mode, than it is calculated as $c_1 = E_k(p_1)$. This is exactly ECB mode.



          The next blocks, however, will not be equal;



          in ECB mode $c_i = E_k(p_i)$ whereas in CBC mode $c_i = E_k(p_i oplus c_i-1) neq E_k(p_i)$ for $1 < i < m$ where $m$ is the number of blocks.



          Equality is only valid for first block.






          share|improve this answer






















          • Exactly as I suspected, thank you for a more formal explanation <3
            – bbozo
            19 mins ago










          Your Answer




          StackExchange.ifUsing("editor", function ()
          return StackExchange.using("mathjaxEditing", function ()
          StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
          StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
          );
          );
          , "mathjax-editing");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "281"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          noCode: true, onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcrypto.stackexchange.com%2fquestions%2f63122%2fwith-des-is-ecb-encryption-mode-equivalent-to-cbc-with-null-iv-for-short-data-b%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          2
          down vote



          accepted










          • The CBC mode processed as $c_i = E_k(p_i oplus c_i-1)$ with $c_0 = IV$


          • The ECB mode processed as $c_i = E_k(p_i)$


          If you set the first block with $c_o = IV = 0$ in the CBC mode, than it is calculated as $c_1 = E_k(p_1)$. This is exactly ECB mode.



          The next blocks, however, will not be equal;



          in ECB mode $c_i = E_k(p_i)$ whereas in CBC mode $c_i = E_k(p_i oplus c_i-1) neq E_k(p_i)$ for $1 < i < m$ where $m$ is the number of blocks.



          Equality is only valid for first block.






          share|improve this answer






















          • Exactly as I suspected, thank you for a more formal explanation <3
            – bbozo
            19 mins ago














          up vote
          2
          down vote



          accepted










          • The CBC mode processed as $c_i = E_k(p_i oplus c_i-1)$ with $c_0 = IV$


          • The ECB mode processed as $c_i = E_k(p_i)$


          If you set the first block with $c_o = IV = 0$ in the CBC mode, than it is calculated as $c_1 = E_k(p_1)$. This is exactly ECB mode.



          The next blocks, however, will not be equal;



          in ECB mode $c_i = E_k(p_i)$ whereas in CBC mode $c_i = E_k(p_i oplus c_i-1) neq E_k(p_i)$ for $1 < i < m$ where $m$ is the number of blocks.



          Equality is only valid for first block.






          share|improve this answer






















          • Exactly as I suspected, thank you for a more formal explanation <3
            – bbozo
            19 mins ago












          up vote
          2
          down vote



          accepted







          up vote
          2
          down vote



          accepted






          • The CBC mode processed as $c_i = E_k(p_i oplus c_i-1)$ with $c_0 = IV$


          • The ECB mode processed as $c_i = E_k(p_i)$


          If you set the first block with $c_o = IV = 0$ in the CBC mode, than it is calculated as $c_1 = E_k(p_1)$. This is exactly ECB mode.



          The next blocks, however, will not be equal;



          in ECB mode $c_i = E_k(p_i)$ whereas in CBC mode $c_i = E_k(p_i oplus c_i-1) neq E_k(p_i)$ for $1 < i < m$ where $m$ is the number of blocks.



          Equality is only valid for first block.






          share|improve this answer














          • The CBC mode processed as $c_i = E_k(p_i oplus c_i-1)$ with $c_0 = IV$


          • The ECB mode processed as $c_i = E_k(p_i)$


          If you set the first block with $c_o = IV = 0$ in the CBC mode, than it is calculated as $c_1 = E_k(p_1)$. This is exactly ECB mode.



          The next blocks, however, will not be equal;



          in ECB mode $c_i = E_k(p_i)$ whereas in CBC mode $c_i = E_k(p_i oplus c_i-1) neq E_k(p_i)$ for $1 < i < m$ where $m$ is the number of blocks.



          Equality is only valid for first block.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 40 mins ago

























          answered 3 hours ago









          kelalaka

          1,086217




          1,086217











          • Exactly as I suspected, thank you for a more formal explanation <3
            – bbozo
            19 mins ago
















          • Exactly as I suspected, thank you for a more formal explanation <3
            – bbozo
            19 mins ago















          Exactly as I suspected, thank you for a more formal explanation <3
          – bbozo
          19 mins ago




          Exactly as I suspected, thank you for a more formal explanation <3
          – bbozo
          19 mins ago

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcrypto.stackexchange.com%2fquestions%2f63122%2fwith-des-is-ecb-encryption-mode-equivalent-to-cbc-with-null-iv-for-short-data-b%23new-answer', 'question_page');

          );

          Post as a guest













































































          Comments

          Popular posts from this blog

          What does second last employer means? [closed]

          List of Gilmore Girls characters

          Confectionery