title: Why must all inputs to AES be multiples of 16?
body: <p>I'm using the PyCrypto implementation of AES and I'm trying to encrypt some text (24 bytes) using a 24 byte key.  </p>
  
  <pre><code>aes_ecb = AES.new('\x00'*24, AES.MODE_ECB)
  aes_ecb.encrypt("123456"*4)
  </code></pre>
  
  <p>I get this surprising error <code>ValueError: Input strings must be a multiple of 16 in length</code><br>
  So why is it that my input must be a multiple of 16? It would make more sense to me that the input string length must be a multiple of my key size, because this would allow nice bitwise operations between the key and blocks of plaintext.</p>