Stephan van Hulst wrote:Welcome to CodeRanch!
Are you sure that the order in which you pass the nonce and the key to the encryption function is correct?
I'm curious, what's the reason you're not relying on just TLS?
Thank you for your response and your welcome.
I'm pretty sure I passed the arguments in the right order (otherwise I would have received an error on the type of my arguments), as for the reasons for using the library in addition to the certificate, here they are:
Laws have recently been passed in France, and they will greatly reduce freedom of expression and anonymity online.
My site will include a proxy system in the browser (the idea is to pass traffic from the active tab through the servers hosting my site, they are located in the Russian Federation, and therefore are not restricted in the same way ) as well as end-to-end encrypted messaging.
In order to ensure the security of messages transmitted and the anonymity of activities carried out, I need to add additional encryption managed by my systems.
This helps avoid an advanced MITM scenario with impersonation of my server.