According to everything I researched and with the help of @bigown I came to the conclusion:
"End-to-end encryption is done when only the connection's points have access to the key that will decrypt the content, that is, the data can UP or DOWN on the server, but they should be there in an encrypted way in such a way that they are illegible and null data for the others. "I honestly think this is incredible and I'm very excited to adapt my application to this type of encryption, I currently use an internal global key to encrypt the data in my database using the AES-128 ECB algorithm .
I will not be able to adapt my entire project to this type of encryption because if not a good part of it would be dismantled, "searching for users" would be practically impossible to do ... anyway it's not the focus of the question, p>
I have a chat where at the moment all your data is encrypted in the database and I would like to adapt it to the end-to-end . Given that a key must be created for each point (user to receive and send), my three questions are:
- Is there a specification for creating these keys?
- How will I tell the user at the other end of my key to decrypt my messages that I will send?
- My biggest question is: What kind of communication can I use between websockets users?