title: What block cipher mode to use? CFB adequate?
body: <p>I want to use AES to encrypt some data of arbitrary length, and I'm wondering what block cipher mode I should use. <a href="http://www.daemonology.net/blog/2009-06-11-cryptographic-right-answers.html" rel="nofollow noreferrer">http://www.daemonology.net/blog/2009-06-11-cryptographic-right-answers.html</a> recommends AES in CTR mode. I'm writing a Ruby on Rails plugin, and unfortunately OpenSSL (which Ruby has standard bindings for) doesn't support CTR. I want my code to work out of the box for everybody without requiring them to install a third-party crypto library, so for now I'm using CFB. Is CFB acceptable? How does it compare to CTR or other modes (with the exception of ECB, which I know is insecure)?</p>