title: Output block size with AES
body: <p>I'm trying to use the Racket <a href="http://planet.plt-scheme.org/package-source/vyzo/crypto.plt/2/3/planet-docs/manual/index.html" rel="nofollow">Crypto library</a> to <a href="http://planet.plt-scheme.org/package-source/vyzo/crypto.plt/2/3/planet-docs/manual/index.html#%28def._%28/home/vyzo/data/src/mzcrypto/dist/crypto/cipher..ss._encrypt%29%29" rel="nofollow">encrypt</a> blocks of 16 bytes with a 16-byte key. I'm expecting to have a 16-bytes output block but I get a 32-byte one.
  A 15-byte input block give a 16-bit output.</p>
  
  <pre><code>#lang racket
  
  (require (planet vyzo/crypto))
  
  (bytes-length (encrypt cipher:aes-128-ecb
                         (string-&gt;bytes/latin-1 "0123456789ABCDEF") ; 16-byte key
                         (make-bytes 16) ; IV
                         (string-&gt;bytes/latin-1 "0123456789ABCDEF"))) ; 16-byte data
  ; -&gt; 32
  
  (bytes-length (encrypt cipher:aes-128-ecb
                         (string-&gt;bytes/latin-1 "0123456789ABCDEF") ; 16-byte key
                         (make-bytes 16)
                         (string-&gt;bytes/latin-1 "0123456789ABCDE"))) ; 15-byte data
  ; -&gt; 16
  </code></pre>
  
  <p>Am I wrong somewhere? Is this due to padding?</p>
  
  <p>Note: I'm aware of the problems with ECB mode, My goal is to implement CBC mode.</p>