- Clarified use of AES and Camellia in CFB and CTR modes
diff --git a/include/polarssl/aes.h b/include/polarssl/aes.h
index efc13da..80fd6d9 100644
--- a/include/polarssl/aes.h
+++ b/include/polarssl/aes.h
@@ -111,6 +111,11 @@
/**
* \brief AES-CFB128 buffer encryption/decryption.
*
+ * Note: Due to the nature of CFB you should use the same key schedule for
+ * both encryption and decryption. So a context initialized with
+ * aes_setkey_enc() for both AES_ENCRYPT and AES_DECRYPT.
+ *
+ * both
* \param ctx AES context
* \param mode AES_ENCRYPT or AES_DECRYPT
* \param length length of the input data
@@ -134,6 +139,10 @@
*
* Warning: You have to keep the maximum use of your counter in mind!
*
+ * Note: Due to the nature of CTR you should use the same key schedule for
+ * both encryption and decryption. So a context initialized with
+ * aes_setkey_enc() for both AES_ENCRYPT and AES_DECRYPT.
+ *
* \param length The length of the data
* \param nc_off The offset in the current stream_block (for resuming
* within current cipher stream). The offset pointer to