I am trying to read from a file and encrypt data using AES in CFB mode without padding
AES / CFB / NoPadding . IV is 16 bytes.
Given that AES works with 16-byte blocks by default, I would consider using a padding scheme if I used CBC or any other mode, but CFB. CFB essentially does not require filling for plain text.
So, the problem is that if my file contains data less than 16 bytes in size, then nothing is encrypted. If it is more than 16 bytes, then only the first 16 bytes are encrypted.
This clearly indicates that the block size is starting, and if overflow or byte overflow occurs, wrt block size, then data / bytes are discarded.
What I do not understand is to use CFB, I do not need to write data. Then why does the default block size of 16 bytes of AES come into effect and truncate the data?
source share