Explanation needed with AES_cfb128_encrypt() function

  aes, c++, encryption, linux, ssl

Hey I’m looking for some explanation regarding

void AES_cfb128_encrypt(const unsigned char *in, unsigned char *out, size_t length,
                        const AES_KEY *key, unsigned char *ivec, int *num, int enc)

I understand the straightforward variables like
in is our input buffer
out is our output buffer
length is size of our input/number of bytes of input buffer
key is pointer to our key which we set by AES_set_encrypt_key
enc is the mode we want(whether encryption or decryption)

However, I don’t understand what ivec and num do.
I just know (might be wrong) is that ivec stands for initial vector and another thing in a code that i found online there was a comment:
/* set where on the 128 bit encrypted block to begin encryption*/. At first, I thought this left gaps of unencrypted data in the midst of encrypted one, but that wasn’t the case when I looked at the byte values while debugging and printing values.

Source: Windows Questions C++

LEAVE A COMMENT