title: openssl -aes-128-ecb encryption doesn't match python Crypto.Cipher AES encryption
body: <p>I am trying to encrypt the string of 16 bytes "Attack at dawn!!" using AES-128 with the password "yellow submarine". </p>
  
  <p>In python :</p>
  
  <pre><code>from Crypto.Cipher import AES
  from base64 import b64encode
  
  plaintext = 'Attack at dawn!!'
  obj = AES.new("yellow submarine", AES.MODE_ECB)
  ciphertext = obj.encrypt(plaintext)
  
  print(b64encode(ciphertext).decode())
  </code></pre>
  
  <p>This gives the ciphertext as 'kBKTLPWpU7Dpf/TiGo6p3w=='</p>
  
  <p>Now using openssl in terminal. plain.txt is a text file containing the string 'Attack at dawn!!':</p>
  
  <pre><code>openssl enc -aes-128-ecb -nosalt -nopad -pass pass:"yellow submarine" -in plain.txt -out cipher.txt -a
  </code></pre>
  
  <p>This returns 'X+fHjd97VRZLbH+BCgu6Xw==' as the ciphertext. </p>
  
  <p>Why are they not the same? </p>
  
  <p>I've tried reading documentation or examples, but haven't found anything useful on the internet. I've tried changing the options in the openssl command. I don't know how else to approach this problem. </p>