title: AES 128 in Python
body: <p>I don't know why when I encrypt in AES a text with the PyCrypto (Crypto.Cipher- AES), the result isn't the same as the ciphertext generate by a code in C.</p>
  
  <p>For example, the following code gives me </p>
  
  <pre><code>99756ed0115f676cef45ae25937bfd63247358a80803dde3fc1eae4953ee7277
  </code></pre>
  
  <p>instead of </p>
  
  <pre><code>CC613A0BDC930DABEA7A26126CE489EA
  </code></pre>
  
  <p>here is my code:</p>
  
  <pre><code>key = '1F61ECB5ED5D6BAF8D7A7068B28DCC8E'
  IV = 16 * '\x00'
  mode = AES.MODE_CBC
  encryptor = AES.new(key, mode, IV=IV)
  text = '020ABC00ABCDEFf8d500000123456789'
  ciphertext = encryptor.encrypt(text)
  print binascii.hexlify(ciphertext)
  </code></pre>