Hello,

Looking at test/evp_test.c and the test data test/evptests.txt for encryption/decryption, I don't understand how the initialisation vector ('iv' variable) is used.

The test data in evptests.txt is expressed as Hex strings which are then translated to bit patterns before use:

cipher:key:iv:plain text:cipher text:encrypt/decrypt indicator

eg.
AES-128-ECB:000102030405060708090A0B0C0D0E0F::00112233445566778899AABBCCDDEEFF:69C4E0D86A7B0430D8CDB78070B4C55A:1

Each Hex string is overwritten by its binary transformation.

As above, some of the test data in evptests.txt specify empty ivec strings, which translates to a pointer to a NULL byte which will then be followed by the translation of the plain text.

As an ivec can include NULLs, I think the first N bytes of the translated plain text will be used as the ivec.

Should the caller specify an empty ivec (to the correct length) in this case or am I missing something?

(The test program checks that the specified key field is of the correct length.)

Thanks,

Bob Doncaster



--
.....................................................................................................................................................................................................
Bob Doncaster
Electronic Data Processing Plc.
Direct Dial +44 (0) 1908 249781
Email b...@edp.co.uk

Visit our website at www.edp.co.uk to find out more about how the EDP Group can 
help your Company.

Registered Office | Beauchief Hall |  Sheffield | South Yorkshire |S8 7BA  | 
Tel +44 (0) 114 2621621 | Fax +44 (0) 114 2621126 | Registered Number 853560

Confidentiality Notice: This email is intended for the addressee named above 
and may contain information that is privileged, confidential or otherwise 
protected from disclosure. If you are not the intended recipient then you must 
not copy it, forward it, use it for any purpose, or disclose it to another 
person. Instead, please return to the sender immediately and delete the email 
from your system.   The EDP Group of Companies undertakes their own virus 
checks. We do not accept responsibility for any viruses transmitted with this 
email and it is the recipient's responsibility to carry out such virus or other 
checks as are considered appropriate.
.....................................................................................................................................................................................................

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to