that was some great advice. The problem is I implemented 2 versions I found that way. they both give me the same encrypted string, but it doesn't seem to be correct!!
The RFC 3602 says:
4. Test Vectors
The first 4 test cases test AES-CBC encryption. Each test case
includes the key, the plaintext, and the resulting ciphertext. The
values of keys and data are either hexadecimal numbers (prefixed by
"0x") or ASCII character strings (surrounded by double quotes). If a
value is an ASCII character string, then the AES-CBC computation for
the corresponding test case DOES NOT include the trailing null
character ('\0') of the string. The computed cyphertext values are
all hexadecimal numbers.
The last 4 test cases illustrate sample ESP packets using AES-CBC for
encryption. All data are hexadecimal numbers (not prefixed by "0x").
These test cases were verified using 2 independent implementations:
the NIST AES-CBC reference implementation and an implementation
provided by the authors of the Rijndael algorithm
(
http://csrc.nist.gov/encryption/aes/rijndael/
rijndael-unix-refc.tar).
Case #1: Encrypting 16 bytes (1 block) using AES-CBC with 128-bit key
Key : 0x06a9214036b8a15b512e03d534120006
IV : 0x3dafba429d9eb430b422da802c9fac41
Plaintext : "Single block msg"
Ciphertext: 0xe353779c1079aeb82708942dbe77181a
But when I use that IV and key, both of the programs give me:
CE696893A7170A24D882C6022E3FFA3D
as my encrypted string....this is driving me insane...