It seems your major requirement is that the file size not increase. This is possible, but at the sacrifice of some security (namely integrity and authentication), so it seems you will only be able to provide confidentiality. If the file size can increase slightly (say no more than 300 bits) you should encrypt with an authenticating mode such as GCM.
As Thomas points out, streaming modes will not alter the file size, so use one of those. There are some things you have to realize though if you go this route. Streaming modes are malleable. This means that an attacker (i.e., the 3rd party server storing the data) could make changes to the ciphertext which have a predictable change to the plaintext upon decryption.
In CFB, if the attacker flips one bit of the ciphertext, it will flip the corresponding bit of the plaintext, plus the next block will be completely scrambled. In OFB, if you flip one bit of the ciphertext, upon decryption, the corresponding plaintext bit will be flipped. Same with CTR, change one bit of ciphertext and you will flip the corresponding bit of plaintext.
This could have disasterous consequences. For example, if the attacker knows that the file is a text file of the form Transfer 500.00 dollars to mikeazo
, the attacker (me in this case) could change that to say Transfer 50,000 dollars to mikeazo
.
Another thing to keep in mind is the IV or Nonce required by streaming modes. These have their own requirements and will have to be stored or communicated some how. They can also be tampered with potentially, which results in problems (e.g., perhaps only one block of ciphertext will be unrecoverable, or maybe the entire thing will be unrecoverable).
A final aspect to consider is keying. How will the key be distributed?
My point is, yes, you can use a streaming mode with AES to encrypt a file and not increase the file size. But, there is a plethora of unintended consequences that you (or whoever is mandating this) is not considering. If this is to be used in a production system for a business, you are putting yourselves at great risk, and if that is the case, hire a professional. It will save you money in the long run. If that is not an option, use well established standards/software. I'd recommend something like GPG if the licensing works for the application.