When I integrate lib sodium, into a c# project, and try to consume, encryption and decryption in a particular way, it works, but the confusion is about, which method to use while encryption or decryption, as it provides various ways to encrypt/decrypt. For example :
Problem Statement 1: Currently, I have multiple applications, in various technologies like, an android App, iOS App (Swift / Objective C), Node Js App, Web API (C#), Web Site (C#), Web Service (Java), Windows Application (C#, C++), there can be more, but these are the first once to be targeted. These application interact with database and my database is encrypted currently with custom aes encryption format (and can only be accessed with C#), moving forward, I think we are finalizing on LibSodium so that same encryption decryption can be implemented in almost all languages.
While exploring Lib Sodium, its confusing to surely know which encryption or decryption, as seen in attached screenshots is the best/the most secured way to go ahead:
- Use a best methodology i.e Stream Encryption, CryptoHash etc. (Any one)
- Use combinations of multiple Methods, Like first use Stream Encryption and then to go for CryptoHash etc. ( this might have some performance issue).
Problem Statement 2: Another problem which I am facing is, to find similar methods in other programming languages, i.e. If I use Stream Encryption in C#, its known as xor in Node Js, and some other name in c++, then how should I find its equivalent every time in other languages ?
P.S. I did go through the documentation of lib sodium so please don't comment the link of lib sodium