CFB, OFB and other modes are meant for streaming and don't require padding. Are there still limitations such as the text needs to be greater than key length?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
These modes do indeed turn a block cipher into a stream cipher. The output will always be a multiple of the block size, but you can easily truncate the last block of output to match the plaintext size, but any size plaintext will work. In that manner, no padding is required.
CFB does require padding unless you use a segment size of 1 bit (or 8 bits if your message is byte oriented). Check Section 5.2 in NIST 800-38A:
OFB indeed does not require any padding.
There are no other limitations on the plaintext (but read very well the requirements about Initialization Vectors!).