diff --git a/include/polarssl/aes.h b/include/polarssl/aes.h index bb5d161ba..0910479ba 100644 --- a/include/polarssl/aes.h +++ b/include/polarssl/aes.h @@ -129,6 +129,14 @@ int aes_crypt_ecb( aes_context *ctx, * Length should be a multiple of the block * size (16 bytes) * + * \note Upon exit, the content of the IV is updated so that you can + * call the function same function again on the following + * block(s) of data and get the same result as if it was + * encrypted in one call. This allows a "streaming" usage. + * If on the other hand you need to retain the contents of the + * IV, you should either save it manually or use the cipher + * module instead. + * * \param ctx AES context * \param mode AES_ENCRYPT or AES_DECRYPT * \param length length of the input data @@ -154,6 +162,14 @@ int aes_crypt_cbc( aes_context *ctx, * both encryption and decryption. So a context initialized with * aes_setkey_enc() for both AES_ENCRYPT and AES_DECRYPT. * + * \note Upon exit, the content of the IV is updated so that you can + * call the function same function again on the following + * block(s) of data and get the same result as if it was + * encrypted in one call. This allows a "streaming" usage. + * If on the other hand you need to retain the contents of the + * IV, you should either save it manually or use the cipher + * module instead. + * * \param ctx AES context * \param mode AES_ENCRYPT or AES_DECRYPT * \param length length of the input data @@ -179,6 +195,14 @@ int aes_crypt_cfb128( aes_context *ctx, * both encryption and decryption. So a context initialized with * aes_setkey_enc() for both AES_ENCRYPT and AES_DECRYPT. * + * \note Upon exit, the content of the IV is updated so that you can + * call the function same function again on the following + * block(s) of data and get the same result as if it was + * encrypted in one call. This allows a "streaming" usage. + * If on the other hand you need to retain the contents of the + * IV, you should either save it manually or use the cipher + * module instead. + * * \param ctx AES context * \param mode AES_ENCRYPT or AES_DECRYPT * \param length length of the input data diff --git a/include/polarssl/blowfish.h b/include/polarssl/blowfish.h index e1d25cfa8..f91b38da6 100644 --- a/include/polarssl/blowfish.h +++ b/include/polarssl/blowfish.h @@ -114,6 +114,14 @@ int blowfish_crypt_ecb( blowfish_context *ctx, * Length should be a multiple of the block * size (8 bytes) * + * \note Upon exit, the content of the IV is updated so that you can + * call the function same function again on the following + * block(s) of data and get the same result as if it was + * encrypted in one call. This allows a "streaming" usage. + * If on the other hand you need to retain the contents of the + * IV, you should either save it manually or use the cipher + * module instead. + * * \param ctx Blowfish context * \param mode BLOWFISH_ENCRYPT or BLOWFISH_DECRYPT * \param length length of the input data @@ -136,6 +144,14 @@ int blowfish_crypt_cbc( blowfish_context *ctx, /** * \brief Blowfish CFB buffer encryption/decryption. * + * \note Upon exit, the content of the IV is updated so that you can + * call the function same function again on the following + * block(s) of data and get the same result as if it was + * encrypted in one call. This allows a "streaming" usage. + * If on the other hand you need to retain the contents of the + * IV, you should either save it manually or use the cipher + * module instead. + * * \param ctx Blowfish context * \param mode BLOWFISH_ENCRYPT or BLOWFISH_DECRYPT * \param length length of the input data diff --git a/include/polarssl/camellia.h b/include/polarssl/camellia.h index 2023775d2..47e9f8192 100644 --- a/include/polarssl/camellia.h +++ b/include/polarssl/camellia.h @@ -122,6 +122,14 @@ int camellia_crypt_ecb( camellia_context *ctx, * Length should be a multiple of the block * size (16 bytes) * + * \note Upon exit, the content of the IV is updated so that you can + * call the function same function again on the following + * block(s) of data and get the same result as if it was + * encrypted in one call. This allows a "streaming" usage. + * If on the other hand you need to retain the contents of the + * IV, you should either save it manually or use the cipher + * module instead. + * * \param ctx CAMELLIA context * \param mode CAMELLIA_ENCRYPT or CAMELLIA_DECRYPT * \param length length of the input data @@ -148,6 +156,14 @@ int camellia_crypt_cbc( camellia_context *ctx, * both encryption and decryption. So a context initialized with * camellia_setkey_enc() for both CAMELLIA_ENCRYPT and CAMELLIE_DECRYPT. * + * \note Upon exit, the content of the IV is updated so that you can + * call the function same function again on the following + * block(s) of data and get the same result as if it was + * encrypted in one call. This allows a "streaming" usage. + * If on the other hand you need to retain the contents of the + * IV, you should either save it manually or use the cipher + * module instead. + * * \param ctx CAMELLIA context * \param mode CAMELLIA_ENCRYPT or CAMELLIA_DECRYPT * \param length length of the input data diff --git a/include/polarssl/des.h b/include/polarssl/des.h index 86e6b1de9..998ae4603 100644 --- a/include/polarssl/des.h +++ b/include/polarssl/des.h @@ -214,6 +214,14 @@ int des_crypt_ecb( des_context *ctx, /** * \brief DES-CBC buffer encryption/decryption * + * \note Upon exit, the content of the IV is updated so that you can + * call the function same function again on the following + * block(s) of data and get the same result as if it was + * encrypted in one call. This allows a "streaming" usage. + * If on the other hand you need to retain the contents of the + * IV, you should either save it manually or use the cipher + * module instead. + * * \param ctx DES context * \param mode DES_ENCRYPT or DES_DECRYPT * \param length length of the input data @@ -246,6 +254,14 @@ int des3_crypt_ecb( des3_context *ctx, /** * \brief 3DES-CBC buffer encryption/decryption * + * \note Upon exit, the content of the IV is updated so that you can + * call the function same function again on the following + * block(s) of data and get the same result as if it was + * encrypted in one call. This allows a "streaming" usage. + * If on the other hand you need to retain the contents of the + * IV, you should either save it manually or use the cipher + * module instead. + * * \param ctx 3DES context * \param mode DES_ENCRYPT or DES_DECRYPT * \param length length of the input data