title: Test Vectors for AES-128-ECB and OpenSSL
body: <p>I am running one of the test vectors for AES-128-ECB given at <a href="http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf" rel="nofollow">http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf</a> .  I am storing the plain text in "plain" file and resultant encrypted text in "cipher" file.  OpenSSL being used by me is not build with FIPS support.  I am unable to get results given in the test vector. Am I doing something wrong or is this expected result for OpenSSL without FIPS support ? Thanks, </p>
  
  <p><strong>Test Vector</strong></p>
  
  <p>Key            2b7e151628aed2a6abf7158809cf4f3c &lt;===Key</p>
  
  <p>Block #1 </p>
  
  <p>Plaintext      6bc1bee22e409f96e93d7e117393172a &lt;==Plaintext</p>
  
  <p>Input Block    6bc1bee22e409f96e93d7e117393172a </p>
  
  <p>Output Block   3ad77bb40d7a3660a89ecaf32466ef97 </p>
  
  <p>Ciphertext     3ad77bb40d7a3660a89ecaf324 &lt;== Ciphertext</p>
  
  <p><strong>My Results</strong></p>
  
  <p><strong>[root@fn]</strong> echo 6bc1bee22e409f96e93d7e117393172a > plain</p>
  
  <p><strong>[root@fn]</strong> cat plain</p>
  
  <p>6bc1bee22e409f96e93d7e117393172a</p>
  
  <p><strong>[root@fn]</strong> openssl enc -aes-128-ecb -p -nosalt -K 2b7e151628aed2a6abf7158809cf4f3c -in plain -out cipher</p>
  
  <p>key=2B7E151628AED2A6ABF7158809CF4F3C</p>
  
  <p><strong>[root@fn]</strong> cat cipher</p>
  
  <p>�w*E�苅�Pg���</p>
  
  <p><strong>[root@fn]</strong> hexdump -C cipher</p>
  
  <p>00000000  cc fd 74 a0 75 78 42 23  4c cb ef 59 85 af 68 b1 &lt;===</p>
  
  <p>00000010  5f c0 01 83 c0 e8 73 8b  e4 6a 73 e8 58 36 9b 4d  </p>
  
  <p>00000020  cb 77 1e 2a 45 1b 61 dd  85 1a f0 50 67 ab cf fc </p>
  
  <p>00000030</p>