On Tue, 2004-05-04 at 09:38, Troy Monaghen wrote: > On Tue, 2004-05-04 at 03:03, Ramon Amat Jimenez wrote: > > Using aes-128-encryption with a testvector from NIST for encryption does > > not match! I have been mostly using code from example > > ./openssl-0.9.7d/crypto/evp/evp_test.c to conduct this test. > > > > #cipher:key:iv:plaintext:ciphertext:0/1(decrypt/encrypt) (from NIST > > test vectors, encrypt) > > #AES-128-CBC:00000000000000000000000000000000:00000000000000000000000000000000: > > > > 00000000000000000000000000000000:8A05FC5E095AF4848A08D328D3688E3D:1 > > > > key: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > > iv: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > > plain =>: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > > cipher=>: 66 e9 4b d4 ef 8a 2c 3b 88 4c fa 59 ca 34 2b 2e <===== does > > not match !!! > > cipher =>:8a 05 fc 5e 09 5a f4 84 8a 08 d3 28 d3 68 8e 3d <==== expected > > > > Decrypting 66 e9 4b d4 ef 8a 2c 3b 88 4c fa 59 ca 34 2b 2e <===== with > > key, iv as stated above > > does give 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00! > > > > Can somebody explain me that ? I have attached below the code used. > > Kind regards > > > I tried your sample with the NIST test vectors found at: > http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf and it > worked fine. Are you sure the test vectors you are using are correct? > Where did you get those vectors?
The test vectors you were using were from a Monte Carlo test which uses a number of iterations of the algorithm. More info can be found at http://csrc.nist.gov/CryptoToolkit/aes/katmct/katmct.pdf Troy ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]