title: Sequential .NET DESCryptoServiceProvider encryption and decryption produces wrong bytes after 96th
body: <p>Basically, here is the code:</p>
  
  <pre><code>        DES des = new DESCryptoServiceProvider();
          PasswordDeriveBytes pdb = new PasswordDeriveBytes(new byte[]{123}, new byte[0]);
          des.IV = new byte[8];
          des.Key = pdb.CryptDeriveKey("DES", "MD5", 0, des.IV);
  
          byte[] A = Enumerable.Range(1, 100).Select(i =&gt; (byte)i).Concat(new byte[4]).ToArray();
          byte[] B = new byte[A.Length];
          byte[] C = new byte[A.Length];
  
          using (var encryptor = des.CreateEncryptor())
              encryptor.TransformBlock(A, 0, A.Length, B, 0);
  
          using (var decryptor = des.CreateDecryptor())
              decryptor.TransformBlock(B, 0, B.Length, C, 0);
  
          for (int i = 0; i &lt; A.Length; i++)
              if (A[i] != C[i])
                  Debugger.Break();
  </code></pre>
  
  <p>It breaks at <code>i == 96</code>. Why?</p>
  
  <p>Another small question: omitting of <code>.Concat(new byte[4])</code> causes first TransformBlock to throw an ArgumentException. Why can't it encrypt an array of sorted bytes without 4 zeroes at the end?</p>