Writing your own encryption code is "not recommended." Itβs easy enough to make a simple mistake when using one of these libraries, not to mention when you try to write it yourself.
What you really want to use is OpenSSL with Boost.ASIO on top of it. If you cannot do this, your next best alternative is to use the Internet Explorer COM object. It's not that flexible, but it can work just fine, depending on your specific needs. You can also learn the Win32 API. Recently, I looked that cryptographic APIs are not enough for this. The last way to handle this is to wrap the .NET API so that you can use them from your own C ++.
Only if none of this works for you, you should even think about it. You will make mistakes, and as a result, your application will be less secure. So, before you start writing your own cryptocode, you can also try to look at SOCKS tunneling through SSH and use some kind of SSH implementation. The next thing I would look at is to buy the code, and not write it yourself. The code will not be as good as the open source suggestions, because it will be less used, so it will have more security problems, but it will still be better than anything you write when you first work.
Only if you have exhausted all of these options, consider writing it yourself. After you think about it, you should try all the other options again to make sure that you have not missed, so that one of them works for you for the first time.
If you are still writing your own implementation, discard it and use one of the other options before putting it into production, as there will be errors that jeopardize security to the extent that you probably couldn't worry too .
I apologize for all this, but the correct implementation of these rules is very difficult, and not what you can do just by looking at the implementation of someone else.
source share