|
Hi to all,
I am trying to implement Brian Gladman's AES Encryption in my program. But as i am new to Encryption, please guide which mode is good to use.
AES_RETURN aes_ecb_encrypt(const unsigned char *ibuf, unsigned char *obuf,
int len, const aes_encrypt_ctx cx[1]);
AES_RETURN aes_cbc_encrypt(const unsigned char *ibuf, unsigned char *obuf,
int len, unsigned char *iv, const aes_encrypt_ctx cx[1]);
AES_RETURN aes_mode_reset(aes_encrypt_ctx cx[1]);
AES_RETURN aes_cfb_encrypt(const unsigned char *ibuf, unsigned char *obuf,
int len, unsigned char *iv, aes_encrypt_ctx cx[1]);
#define aes_ofb_encrypt aes_ofb_crypt
AES_RETURN aes_ofb_crypt(const unsigned char *ibuf, unsigned char *obuf,
and i am confused on *iv what is this? I had to encrypt files as well as strings.
Regards,
Vishal
|
|
|
|
|
Try asking Brian Gladman, we cannot guess which of the above is the right choice.
|
|
|
|
|
perhaps you had not understand my question, my question was related to modes and iv. Anyways thanks.
Regards,
Vishal
|
|
|
|
|
vishalgpt wrote: perhaps you had not understand my question, my question was related to modes and iv. I understand your question perfectly well. The problem is that you are referring to someone else's code and we do not have access to it, so how can we tell you which function to use? Those function definitions on their own provide no useful information. All I can tell you is that iv is a pointer to a character string, but how that fits in with these functions is anyone's guess.
|
|
|
|