[cs631apue] How to use iv xor with first block of text

Kun Yao kyao at stevens.edu
Sun Dec 8 13:24:35 EST 2013


Hi, I have following problem in initialisation vector(IV) XOR with first
block of text,

The assignment ask us for aes-256-cbc mode, that's means we encrypt/de 32
bytes of block text each time, but I got 16 bytes of IV by using
EVP_BytesToKey with SHA1, the SHA1 could generate 160bit, witch is also not
enough for XOR with 256bit of text. SHA256 is just fit. but assignment ask
us use SHA1.
After searching online, I found that the evp.h define the EVP_MAX_IV_LENGTH
is 16 bytes, even when I used SHA256, EVP_BytesToKey still generate 16
bytes. so I don't know how to XOR between IV and text with different length
now.

Any ideas?
Thank you.
Kun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.stevens.edu/pipermail/cs631apue/attachments/20131208/4746ce80/attachment.html>


More information about the cs631apue mailing list