> Eventhough AES128 counts as secure today computers are getting more and more powerful. To ensure that our code will stay secure for a longer period we will use AES256 for our following examples.<p>Debatable. AES-256 is more a hedge against the most optimistic views of quantum computers. Its not like a classical computer is going to get fast enough to actually need that.<p>> The different modes of encryption algorithms is out of the scope of this blog post so we will not take a deeper look at them<p>Danger! Danger! The mode is one of the most important parameters. If you do this wrong it will not be secure.<p>> [a bunch of examples using CBC mode without authentication]<p>And this is why discussing modes is important. The examples are insecure because they are using CBC mode incorrectly.
This desperately needs a disclaimer: unless you are only experimenting/learning, keep away from this code. If you're looking for something that you can use in a real project, use SimpleBox from the rbnacl gem.