

I found during my testing that if you only have one copy of the IV and use it in multiple locations that it 'gets corrupted' (for lack of a better term). When working with the AES_* APIs (such as AES_cbc_encrypt ), be sure to pass in a copy of your Initialization Vector (IV) if you plan on using it elsewhere in your program.Without it you won't be able to successfully build an application that leverages OpenSSL

If you are starting a crypto project that fits into a smaller box, the other options (Like NaCL or GnuTLS) may do what you need them to do. That's not to say that the other libraries are 'bad', I just found that for my goals the other libraries either had too many dependencies, didn't work on all the platforms I thought I would be working on or were too limited in functionality for my needs. At the end of the day I wanted to learn a crypto library that was cross platform, well used and secure so I ended up where I started with OpenSSL. Was there anything else available? I found quite a few different libraries that have different levels of capability. I wouldn't be getting anything productive done anytime soon.Īfter my initial taste of OpenSSL I decided to look at other cryptographic libraries. Upon investigating the API documentation and trying out some sample code it quickly became apparent that OpenSSL has a steep learning curve. I figured that mastering this library would help me make better, more secure software. I started my journey into OpenSSL with energy and optimism- I was going to learn how to work with the worlds most commonly used cryptographic library. Some AES Ciphers are only available via EVP (like XTS).AES encryption/decryption demo program using OpenSSL EVP apis.AES CBC encrypt/decrypt only decrypts the first 16 bytes.How to do encryption using AES in Openssl.AES Encryption -Key Generation with OpenSSL (Get Random Bytes for Key).How to choose an AES encryption mode (CBC ECB CTR OCB CFB)?.NaCL: Networking and Cryptographic Library.Reddit Commentary: OpenSSL is written by monkeys.While I hope what I write here can be useful to someone investigating one facet OpenSSL I hope to come back here in the future to refresh my memory when working with AES in OpenSSL in the future. As I'm interested in applying cryptography in the software I create I decidd to look at how I can operate OpenSSL.Īs with my previous foray into the world of Bouncy Castle (a C# Cryptographic library) I have found the documentation surrounding OpenSSL to be inadequate. While I may not make any contributions in cryptology in my career, I can certainly appreciate the mathematics, mathematicians and engineers who have helped make encryption more mainstream. Cryptography is a fascinating subject that I would like to learn more about.
